mirror of
https://github.com/vcmi/vcmi.git
synced 2024-11-28 08:48:48 +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