Set focus on button when screen keyboard is opened
This commit is contained in:
parent
a05fa23bf3
commit
8737b91cb9
@ -24,6 +24,7 @@
|
|||||||
#include "guiengine/widget.hpp"
|
#include "guiengine/widget.hpp"
|
||||||
#include "guiengine/widgets/button_widget.hpp"
|
#include "guiengine/widgets/button_widget.hpp"
|
||||||
#include "guiengine/widgets/CGUIEditBox.hpp"
|
#include "guiengine/widgets/CGUIEditBox.hpp"
|
||||||
|
#include "states_screens/state_manager.hpp"
|
||||||
#include "utils/log.hpp"
|
#include "utils/log.hpp"
|
||||||
|
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
@ -184,6 +185,9 @@ void ScreenKeyboard::createButtons()
|
|||||||
|
|
||||||
LayoutManager::calculateLayout(m_widgets, this);
|
LayoutManager::calculateLayout(m_widgets, this);
|
||||||
addWidgetsRecursively(m_widgets);
|
addWidgetsRecursively(m_widgets);
|
||||||
|
|
||||||
|
assert(m_buttons.size() > 0);
|
||||||
|
m_buttons[0]->setFocusForPlayer(PLAYER_ID_GAME_MASTER);
|
||||||
} // createButtons
|
} // createButtons
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
|
Loading…
x
Reference in New Issue
Block a user