Fix broken network kart selection for some keyboard configuration

This commit is contained in:
Benau 2018-03-22 14:53:29 +08:00
parent d8b68a2cbc
commit 0599e8c0d7
3 changed files with 6 additions and 7 deletions

View File

@ -376,6 +376,11 @@ void KartSelectionScreen::init()
else */ else */
// For now this is what will happen // For now this is what will happen
input_manager->getDeviceManager()->setAssignMode(DETECT_NEW); input_manager->getDeviceManager()->setAssignMode(DETECT_NEW);
// This flag will cause that a 'fire' event will be mapped to 'select' (if
// 'fire' is not assigned to a GUI event). This is done to support the old
// way of player joining by pressing 'fire' instead of 'select'.
input_manager->getDeviceManager()->mapFireToSelect(true);
if (!NetworkConfig::get()->isNetworking()) if (!NetworkConfig::get()->isNetworking())
{ {
if (!m_multiplayer) if (!m_multiplayer)
@ -396,10 +401,6 @@ void KartSelectionScreen::init()
// Add multiplayer message // Add multiplayer message
addMultiplayerMessage(); addMultiplayerMessage();
} }
// This flag will cause that a 'fire' event will be mapped to 'select' (if
// 'fire' is not assigned to a GUI event). This is done to support the old
// way of player joining by pressing 'fire' instead of 'select'.
input_manager->getDeviceManager()->mapFireToSelect(true);
} }
} // init } // init

View File

@ -36,9 +36,6 @@ void NetworkKartSelectionScreen::init()
m_multiplayer = NetworkConfig::get()->getNetworkPlayers().size() != 1; m_multiplayer = NetworkConfig::get()->getNetworkPlayers().size() != 1;
KartSelectionScreen::init(); KartSelectionScreen::init();
RibbonWidget* tabs = getWidget<RibbonWidget>("kartgroups");
assert(tabs != NULL);
// change the back button image (because it makes the game quit) // change the back button image (because it makes the game quit)
IconButtonWidget* back_button = getWidget<IconButtonWidget>("back"); IconButtonWidget* back_button = getWidget<IconButtonWidget>("back");
back_button->setImage("gui/main_quit.png"); back_button->setImage("gui/main_quit.png");

View File

@ -54,6 +54,7 @@ public:
// ------------------------------------------------------------------------ // ------------------------------------------------------------------------
virtual bool playerQuit(StateManager::ActivePlayer* player) OVERRIDE virtual bool playerQuit(StateManager::ActivePlayer* player) OVERRIDE
{ return true; } { return true; }
// ------------------------------------------------------------------------
/** \brief implement callback from parent class GUIEngine::Screen */ /** \brief implement callback from parent class GUIEngine::Screen */
virtual void tearDown() OVERRIDE virtual void tearDown() OVERRIDE
{ {