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