File tree Expand file tree Collapse file tree 5 files changed +193
-188
lines changed Expand file tree Collapse file tree 5 files changed +193
-188
lines changed Original file line number Diff line number Diff line change @@ -141,10 +141,12 @@ void GUITextPanel::Draw(GUIScreen* Screen) {
141
141
}
142
142
143
143
void GUITextPanel::OnGainFocus () {
144
+ GUIPanel::OnGainFocus ();
144
145
m_Manager->GetInputController ()->StartTextInput ();
145
146
}
146
147
147
148
void GUITextPanel::OnLoseFocus () {
149
+ GUIPanel::OnLoseFocus ();
148
150
m_Manager->GetInputController ()->StopTextInput ();
149
151
}
150
152
Original file line number Diff line number Diff line change @@ -229,7 +229,7 @@ void PollSDLEvents() {
229
229
case SDL_EVENT_JOYSTICK_BUTTON_UP :
230
230
case SDL_EVENT_JOYSTICK_ADDED :
231
231
case SDL_EVENT_JOYSTICK_REMOVED :
232
- g_UInputMan.QueueInputEvent (sdlEvent);
232
+ g_UInputMan.HandleInputEvent (sdlEvent);
233
233
break ;
234
234
default :
235
235
break ;
@@ -273,6 +273,7 @@ void RunMenuLoop() {
273
273
}
274
274
g_ConsoleMan.Update ();
275
275
276
+ g_UInputMan.EndFrame ();
276
277
g_WindowMan.GetScreenBuffer ()->Begin ();
277
278
g_MenuMan.Draw ();
278
279
g_ConsoleMan.Draw (g_FrameMan.GetBackBuffer32 ());
@@ -358,6 +359,7 @@ void RunGameLoop() {
358
359
g_PresetMan.ClearReloadEntityPresetCalledThisUpdate ();
359
360
360
361
g_PerformanceMan.StopPerformanceMeasurement (PerformanceMan::SimTotal);
362
+ g_UInputMan.EndFrame ();
361
363
362
364
if (!g_ActivityMan.IsInActivity ()) {
363
365
g_TimerMan.PauseSim (true );
@@ -379,6 +381,7 @@ void RunGameLoop() {
379
381
g_PerformanceMan.ResetSimUpdateTimer ();
380
382
updateStartTime = g_TimerMan.GetAbsoluteTime ();
381
383
}
384
+
382
385
}
383
386
384
387
updateEndAndDrawStartTime = g_TimerMan.GetAbsoluteTime ();
Original file line number Diff line number Diff line change @@ -295,8 +295,10 @@ void ConsoleMan::Update() {
295
295
}
296
296
297
297
if (!m_ReadOnly) {
298
- m_InputTextBox->SetEnabled (true );
299
- m_InputTextBox->SetFocus ();
298
+ if (!m_InputTextBox->GetEnabled () || !m_InputTextBox->HasFocus ()) {
299
+ m_InputTextBox->SetEnabled (true );
300
+ m_InputTextBox->SetFocus ();
301
+ }
300
302
301
303
if (!m_InputLog.empty () && !g_UInputMan.FlagCtrlState ()) {
302
304
if (g_UInputMan.KeyPressed (SDLK_UP)) {
You can’t perform that action at this time.
0 commit comments