mirror of
https://github.com/vcmi/vcmi.git
synced 2025-08-13 19:54:17 +02:00
prevent showing keyboard automatically in main menu
closes kambala-decapitator/vcmi#10
This commit is contained in:
@@ -428,7 +428,9 @@ CMultiPlayers::CMultiPlayers(const std::string & firstPlayer, ESelectionScreen S
|
|||||||
statusBar = CGStatusBar::create(std::make_shared<CPicture>(Rect(7, 381, 348, 18), 0)); //226, 472
|
statusBar = CGStatusBar::create(std::make_shared<CPicture>(Rect(7, 381, 348, 18), 0)); //226, 472
|
||||||
|
|
||||||
inputNames[0]->setText(firstPlayer, true);
|
inputNames[0]->setText(firstPlayer, true);
|
||||||
|
#ifndef VCMI_IOS
|
||||||
inputNames[0]->giveFocus();
|
inputNames[0]->giveFocus();
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void CMultiPlayers::onChange(std::string newText)
|
void CMultiPlayers::onChange(std::string newText)
|
||||||
@@ -477,7 +479,9 @@ CSimpleJoinScreen::CSimpleJoinScreen(bool host)
|
|||||||
inputPort->filters += std::bind(&CTextInput::numberFilter, _1, _2, 0, 65535);
|
inputPort->filters += std::bind(&CTextInput::numberFilter, _1, _2, 0, 65535);
|
||||||
buttonOk = std::make_shared<CButton>(Point(26, 142), "MUBCHCK.DEF", CGI->generaltexth->zelp[560], std::bind(&CSimpleJoinScreen::connectToServer, this), SDLK_RETURN);
|
buttonOk = std::make_shared<CButton>(Point(26, 142), "MUBCHCK.DEF", CGI->generaltexth->zelp[560], std::bind(&CSimpleJoinScreen::connectToServer, this), SDLK_RETURN);
|
||||||
|
|
||||||
|
#ifndef VCMI_IOS
|
||||||
inputAddress->giveFocus();
|
inputAddress->giveFocus();
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
inputAddress->setText(settings["server"]["server"].String(), true);
|
inputAddress->setText(settings["server"]["server"].String(), true);
|
||||||
inputPort->setText(CServerHandler::getDefaultPortStr(), true);
|
inputPort->setText(CServerHandler::getDefaultPortStr(), true);
|
||||||
|
@@ -420,7 +420,7 @@ CTextInput::CTextInput(const Rect & Pos, EFonts font, const CFunctionList<void(c
|
|||||||
background.reset();
|
background.reset();
|
||||||
addUsedEvents(LCLICK | KEYBOARD | TEXTINPUT);
|
addUsedEvents(LCLICK | KEYBOARD | TEXTINPUT);
|
||||||
|
|
||||||
#ifndef VCMI_ANDROID
|
#if !(defined(VCMI_ANDROID) || defined(VCMI_IOS))
|
||||||
giveFocus();
|
giveFocus();
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
@@ -437,7 +437,7 @@ CTextInput::CTextInput(const Rect & Pos, const Point & bgOffset, const std::stri
|
|||||||
background = std::make_shared<CPicture>(bgName, bgOffset.x, bgOffset.y);
|
background = std::make_shared<CPicture>(bgName, bgOffset.x, bgOffset.y);
|
||||||
addUsedEvents(LCLICK | KEYBOARD | TEXTINPUT);
|
addUsedEvents(LCLICK | KEYBOARD | TEXTINPUT);
|
||||||
|
|
||||||
#ifndef VCMI_ANDROID
|
#if !(defined(VCMI_ANDROID) || defined(VCMI_IOS))
|
||||||
giveFocus();
|
giveFocus();
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
@@ -459,7 +459,7 @@ CTextInput::CTextInput(const Rect & Pos, SDL_Surface * srf)
|
|||||||
background->pos = pos;
|
background->pos = pos;
|
||||||
addUsedEvents(LCLICK | KEYBOARD | TEXTINPUT);
|
addUsedEvents(LCLICK | KEYBOARD | TEXTINPUT);
|
||||||
|
|
||||||
#ifndef VCMI_ANDROID
|
#if !(defined(VCMI_ANDROID) || defined(VCMI_IOS))
|
||||||
giveFocus();
|
giveFocus();
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user