aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorANAND <ClobberXD@gmail.com>2019-08-07 22:45:46 +0530
committerSmallJoker <SmallJoker@users.noreply.github.com>2019-08-07 19:15:46 +0200
commit003af7421352ec1b8ba0d230b807862e1e4cc7e9 (patch)
treee0b3f62a033dcf20003ef63d3dbd292f1c10a447 /src
parentfa6bc699bce5e04b134a990cd6f4e1406f95022e (diff)
downloadminetest-003af7421352ec1b8ba0d230b807862e1e4cc7e9.tar.gz
minetest-003af7421352ec1b8ba0d230b807862e1e4cc7e9.tar.bz2
minetest-003af7421352ec1b8ba0d230b807862e1e4cc7e9.zip
guiConfirmRegistration: Set focus to text field (#8761)
Diffstat (limited to 'src')
-rw-r--r--src/gui/guiConfirmRegistration.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/gui/guiConfirmRegistration.cpp b/src/gui/guiConfirmRegistration.cpp
index 65c062aa5..6fe2a4fc4 100644
--- a/src/gui/guiConfirmRegistration.cpp
+++ b/src/gui/guiConfirmRegistration.cpp
@@ -62,6 +62,7 @@ void GUIConfirmRegistration::removeChildren()
for (gui::IGUIElement *i : children_copy)
i->remove();
}
+
void GUIConfirmRegistration::regenerateGui(v2u32 screensize)
{
acceptInput();
@@ -119,6 +120,7 @@ void GUIConfirmRegistration::regenerateGui(v2u32 screensize)
gui::IGUIEditBox *e = Environment->addEditBox(m_pass_confirm.c_str(),
rect2, true, this, ID_confirmPassword);
e->setPasswordBox(true);
+ Environment->setFocus(e);
}
ypos += 60 * s;
@@ -218,8 +220,7 @@ bool GUIConfirmRegistration::OnEvent(const SEvent &event)
if (event.GUIEvent.EventType == gui::EGET_ELEMENT_FOCUS_LOST && isVisible()) {
if (!canTakeFocus(event.GUIEvent.Element)) {
- dstream << "GUIConfirmRegistration: Not allowing focus "
- "change."
+ dstream << "GUIConfirmRegistration: Not allowing focus change."
<< std::endl;
// Returning true disables focus change
return true;