1
0
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:
Ivan Savenko 2024-05-15 12:45:43 +00:00
parent bbdd2ffb37
commit 0ab23c68f6

View File

@ -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()