Skip to content

Commit a61aa66

Browse files
MetaDuckykahrl
MetaDucky
authored andcommittedMay 31, 2013
Fix editbox default text being pre-selected in some cases
1 parent 7721948 commit a61aa66

File tree

3 files changed

+10
-1
lines changed

3 files changed

+10
-1
lines changed
 

‎src/guiCreateWorld.cpp

+3
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,9 @@ void GUICreateWorld::regenerateGui(v2u32 screensize)
135135
evt.EventType = EET_KEY_INPUT_EVENT;
136136
evt.KeyInput.Key = KEY_END;
137137
evt.KeyInput.PressedDown = true;
138+
evt.KeyInput.Char = 0;
139+
evt.KeyInput.Control = 0;
140+
evt.KeyInput.Shift = 0;
138141
e->OnEvent(evt);
139142
}
140143
{

‎src/guiFormSpecMenu.cpp

+4-1
Original file line numberDiff line numberDiff line change
@@ -418,9 +418,12 @@ void GUIFormSpecMenu::regenerateGui(v2u32 screensize)
418418
e->setTextAlignment(gui::EGUIA_UPPERLEFT, gui::EGUIA_UPPERLEFT);
419419
} else {
420420
irr::SEvent evt;
421-
evt.KeyInput.Key = KEY_END;
422421
evt.EventType = EET_KEY_INPUT_EVENT;
422+
evt.KeyInput.Key = KEY_END;
423423
evt.KeyInput.PressedDown = true;
424+
evt.KeyInput.Char = 0;
425+
evt.KeyInput.Control = 0;
426+
evt.KeyInput.Shift = 0;
424427
e->OnEvent(evt);
425428
}
426429

‎src/guiTextInputMenu.cpp

+3
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,9 @@ void GUITextInputMenu::regenerateGui(v2u32 screensize)
121121
evt.EventType = EET_KEY_INPUT_EVENT;
122122
evt.KeyInput.Key = KEY_END;
123123
evt.KeyInput.PressedDown = true;
124+
evt.KeyInput.Char = 0;
125+
evt.KeyInput.Control = 0;
126+
evt.KeyInput.Shift = 0;
124127
e->OnEvent(evt);
125128
}
126129
changeCtype("");

0 commit comments

Comments
 (0)
Please sign in to comment.