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) {
141141}
142142
143143void GUITextPanel::OnGainFocus () {
144+ GUIPanel::OnGainFocus ();
144145 m_Manager->GetInputController ()->StartTextInput ();
145146}
146147
147148void GUITextPanel::OnLoseFocus () {
149+ GUIPanel::OnLoseFocus ();
148150 m_Manager->GetInputController ()->StopTextInput ();
149151}
150152
Original file line number Diff line number Diff line change @@ -229,7 +229,7 @@ void PollSDLEvents() {
229229 case SDL_EVENT_JOYSTICK_BUTTON_UP :
230230 case SDL_EVENT_JOYSTICK_ADDED :
231231 case SDL_EVENT_JOYSTICK_REMOVED :
232- g_UInputMan.QueueInputEvent (sdlEvent);
232+ g_UInputMan.HandleInputEvent (sdlEvent);
233233 break ;
234234 default :
235235 break ;
@@ -273,6 +273,7 @@ void RunMenuLoop() {
273273 }
274274 g_ConsoleMan.Update ();
275275
276+ g_UInputMan.EndFrame ();
276277 g_WindowMan.GetScreenBuffer ()->Begin ();
277278 g_MenuMan.Draw ();
278279 g_ConsoleMan.Draw (g_FrameMan.GetBackBuffer32 ());
@@ -358,6 +359,7 @@ void RunGameLoop() {
358359 g_PresetMan.ClearReloadEntityPresetCalledThisUpdate ();
359360
360361 g_PerformanceMan.StopPerformanceMeasurement (PerformanceMan::SimTotal);
362+ g_UInputMan.EndFrame ();
361363
362364 if (!g_ActivityMan.IsInActivity ()) {
363365 g_TimerMan.PauseSim (true );
@@ -379,6 +381,7 @@ void RunGameLoop() {
379381 g_PerformanceMan.ResetSimUpdateTimer ();
380382 updateStartTime = g_TimerMan.GetAbsoluteTime ();
381383 }
384+
382385 }
383386
384387 updateEndAndDrawStartTime = g_TimerMan.GetAbsoluteTime ();
Original file line number Diff line number Diff line change @@ -295,8 +295,10 @@ void ConsoleMan::Update() {
295295 }
296296
297297 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+ }
300302
301303 if (!m_InputLog.empty () && !g_UInputMan.FlagCtrlState ()) {
302304 if (g_UInputMan.KeyPressed (SDLK_UP)) {
You can’t perform that action at this time.
0 commit comments