mirror of
https://github.com/vcmi/vcmi.git
synced 2025-11-23 22:37:55 +02:00
Disable text input on window deactivation
This commit is contained in:
@@ -432,6 +432,14 @@ void CGStatusBar::clickLeft(tribool down, bool previousState)
|
||||
}
|
||||
}
|
||||
|
||||
void CGStatusBar::deactivate()
|
||||
{
|
||||
if (enteringText)
|
||||
setEnteringMode(false);
|
||||
|
||||
CIntObject::deactivate();
|
||||
}
|
||||
|
||||
void CGStatusBar::setOnClick(std::function<void()> handler)
|
||||
{
|
||||
onClick = handler;
|
||||
|
||||
@@ -152,6 +152,7 @@ public:
|
||||
void setOnClick(std::function<void()> handler);
|
||||
|
||||
void show(SDL_Surface * to) override;
|
||||
void deactivate() override;
|
||||
|
||||
// IStatusBar interface
|
||||
void write(const std::string & Text) override;
|
||||
|
||||
Reference in New Issue
Block a user