mirror of
https://github.com/vcmi/vcmi.git
synced 2024-11-24 08:32:34 +02:00
Deactivate on-screen keyboard if input is deactivated
This commit is contained in:
parent
bbdd2ffb37
commit
0ab23c68f6
@ -266,19 +266,27 @@ void CTextInput::numberFilter(std::string & text, const std::string & oldText, i
|
||||
void CTextInput::activate()
|
||||
{
|
||||
CFocusable::activate();
|
||||
#if !defined(VCMI_MOBILE)
|
||||
if (hasFocus())
|
||||
{
|
||||
#if defined(VCMI_MOBILE)
|
||||
//giveFocus();
|
||||
#else
|
||||
GH.startTextInput(pos);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
void CTextInput::deactivate()
|
||||
{
|
||||
CFocusable::deactivate();
|
||||
#if !defined(VCMI_MOBILE)
|
||||
if (hasFocus())
|
||||
{
|
||||
#if defined(VCMI_MOBILE)
|
||||
removeFocus();
|
||||
#else
|
||||
GH.stopTextInput();
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
void CTextInput::onFocusGot()
|
||||
|
Loading…
Reference in New Issue
Block a user