Skip to content
Permalink
Browse files

guiConfirmRegistration: Set focus to text field (#8761)

  • Loading branch information...
ClobberXD authored and SmallJoker committed Aug 7, 2019
1 parent fa6bc69 commit 003af7421352ec1b8ba0d230b807862e1e4cc7e9
Showing with 3 additions and 2 deletions.
  1. +3 −2 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;

0 comments on commit 003af74

Please sign in to comment.
You can’t perform that action at this time.