From 93ab5a75c1d2b7145c78498da2c0efdd1a7b0a71 Mon Sep 17 00:00:00 2001 From: Benau Date: Fri, 1 Oct 2021 12:54:54 +0800 Subject: [PATCH] Only handle enter key after buttons are shown in race result screen --- src/states_screens/race_result_gui.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/states_screens/race_result_gui.cpp b/src/states_screens/race_result_gui.cpp index e818d887c..5ad1fcc7b 100644 --- a/src/states_screens/race_result_gui.cpp +++ b/src/states_screens/race_result_gui.cpp @@ -91,6 +91,7 @@ void RaceResultGUI::init() m_timer = 0; + getWidget("operations")->setActive(false); getWidget("left")->setVisible(false); getWidget("middle")->setVisible(false); getWidget("right")->setVisible(false); @@ -243,6 +244,7 @@ void RaceResultGUI::enableAllButtons() GUIEngine::IconButtonWidget *middle = getWidget("middle"); GUIEngine::IconButtonWidget *right = getWidget("right"); GUIEngine::RibbonWidget *operations = getWidget("operations"); + operations->setActive(true); operations->setFocusForPlayer(PLAYER_ID_GAME_MASTER); if (RaceManager::get()->getMajorMode() == RaceManager::MAJOR_MODE_GRAND_PRIX) @@ -377,6 +379,7 @@ void RaceResultGUI::eventCallback(GUIEngine::Widget* widget, { GUIEngine::IconButtonWidget *left = getWidget("left"); left->setVisible(false); + getWidget("operations")->setActive(false); m_all_row_infos = m_all_row_info_waiting; m_animation_state = RR_OLD_GP_RESULTS; m_timer = 0; @@ -1117,6 +1120,7 @@ void RaceResultGUI::unload() m_all_row_infos = prev_infos; GUIEngine::IconButtonWidget *left = getWidget("left"); GUIEngine::RibbonWidget *operations = getWidget("operations"); + operations->setActive(true); operations->setFocusForPlayer(PLAYER_ID_GAME_MASTER); left->setLabel(_("Continue")); left->setImage("gui/icons/green_check.png");