Removed unnecessary parameter from onUpdate calls.
This commit is contained in:
parent
f0365fc7a0
commit
5474b5528f
@ -1195,7 +1195,7 @@ namespace GUIEngine
|
|||||||
if (ModalDialog::isADialogActive())
|
if (ModalDialog::isADialogActive())
|
||||||
ModalDialog::getCurrent()->onUpdate(dt);
|
ModalDialog::getCurrent()->onUpdate(dt);
|
||||||
else
|
else
|
||||||
getCurrentScreen()->onUpdate(elapsed_time, g_driver);
|
getCurrentScreen()->onUpdate(elapsed_time);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -260,7 +260,7 @@ namespace GUIEngine
|
|||||||
/**
|
/**
|
||||||
* \brief optional callback you can override to be notified at every frame.
|
* \brief optional callback you can override to be notified at every frame.
|
||||||
*/
|
*/
|
||||||
virtual void onUpdate(float dt, irr::video::IVideoDriver*) { };
|
virtual void onUpdate(float dt) { };
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \return which music to play at this screen
|
* \return which music to play at this screen
|
||||||
|
@ -497,7 +497,7 @@ void AddonsScreen::setLastSelected()
|
|||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
|
|
||||||
void AddonsScreen::onUpdate(float dt, irr::video::IVideoDriver*)
|
void AddonsScreen::onUpdate(float dt)
|
||||||
{
|
{
|
||||||
if (m_reloading)
|
if (m_reloading)
|
||||||
{
|
{
|
||||||
|
@ -107,7 +107,7 @@ public:
|
|||||||
virtual void tearDown() OVERRIDE;
|
virtual void tearDown() OVERRIDE;
|
||||||
|
|
||||||
/** \brief implement callback from parent class GUIEngine::Screen */
|
/** \brief implement callback from parent class GUIEngine::Screen */
|
||||||
virtual void onUpdate(float dt, irr::video::IVideoDriver*) OVERRIDE;
|
virtual void onUpdate(float dt) OVERRIDE;
|
||||||
|
|
||||||
void setLastSelected();
|
void setLastSelected();
|
||||||
|
|
||||||
|
@ -90,7 +90,7 @@ void CreateServerScreen::init()
|
|||||||
m_info_widget->setText("", false);
|
m_info_widget->setText("", false);
|
||||||
}
|
}
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
void CreateServerScreen::onUpdate(float delta, irr::video::IVideoDriver* driver)
|
void CreateServerScreen::onUpdate(float delta)
|
||||||
{
|
{
|
||||||
if(m_server_creation_request != NULL)
|
if(m_server_creation_request != NULL)
|
||||||
{
|
{
|
||||||
|
@ -55,7 +55,7 @@ private:
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
virtual void onUpdate(float delta, irr::video::IVideoDriver* driver) OVERRIDE;
|
virtual void onUpdate(float delta) OVERRIDE;
|
||||||
|
|
||||||
/** \brief implement callback from parent class GUIEngine::Screen */
|
/** \brief implement callback from parent class GUIEngine::Screen */
|
||||||
virtual void loadedFromFile() OVERRIDE;
|
virtual void loadedFromFile() OVERRIDE;
|
||||||
|
@ -273,7 +273,7 @@ void CreditsScreen::reset()
|
|||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
|
|
||||||
void CreditsScreen::onUpdate(float elapsed_time, irr::video::IVideoDriver*)
|
void CreditsScreen::onUpdate(float elapsed_time)
|
||||||
{
|
{
|
||||||
// multiply by 0.8 to slow it down a bit as a whole
|
// multiply by 0.8 to slow it down a bit as a whole
|
||||||
time_before_next_step -= elapsed_time*0.8f;
|
time_before_next_step -= elapsed_time*0.8f;
|
||||||
|
@ -73,7 +73,7 @@ public:
|
|||||||
|
|
||||||
/** \brief implement optional callback from parent class
|
/** \brief implement optional callback from parent class
|
||||||
* GUIEngine::Screen */
|
* GUIEngine::Screen */
|
||||||
void onUpdate(float dt, irr::video::IVideoDriver*) OVERRIDE;
|
void onUpdate(float dt) OVERRIDE;
|
||||||
|
|
||||||
/** \brief implement callback from parent class GUIEngine::Screen */
|
/** \brief implement callback from parent class GUIEngine::Screen */
|
||||||
void init() OVERRIDE;
|
void init() OVERRIDE;
|
||||||
|
@ -430,8 +430,7 @@ const float ANIM_TO = 3.0f;
|
|||||||
const int GIFT_EXIT_FROM = (int)ANIM_TO;
|
const int GIFT_EXIT_FROM = (int)ANIM_TO;
|
||||||
const int GIFT_EXIT_TO = GIFT_EXIT_FROM + 7;
|
const int GIFT_EXIT_TO = GIFT_EXIT_FROM + 7;
|
||||||
|
|
||||||
void FeatureUnlockedCutScene::onUpdate(float dt,
|
void FeatureUnlockedCutScene::onUpdate(float dt)
|
||||||
irr::video::IVideoDriver* driver)
|
|
||||||
{
|
{
|
||||||
m_global_time += dt;
|
m_global_time += dt;
|
||||||
|
|
||||||
@ -667,7 +666,7 @@ void FeatureUnlockedCutScene::continueButtonPressed()
|
|||||||
while (m_global_time < GIFT_EXIT_TO)
|
while (m_global_time < GIFT_EXIT_TO)
|
||||||
{
|
{
|
||||||
// simulate all the steps of the animation until we reach the end
|
// simulate all the steps of the animation until we reach the end
|
||||||
onUpdate(0.4f, irr_driver->getVideoDriver());
|
onUpdate(0.4f);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -126,7 +126,7 @@ class FeatureUnlockedCutScene : public GUIEngine::Screen, public GUIEngine::Scre
|
|||||||
public:
|
public:
|
||||||
|
|
||||||
/** \brief implement optional callback from parent class GUIEngine::Screen */
|
/** \brief implement optional callback from parent class GUIEngine::Screen */
|
||||||
void onUpdate(float dt, irr::video::IVideoDriver*) OVERRIDE;
|
void onUpdate(float dt) OVERRIDE;
|
||||||
|
|
||||||
/** \brief implement callback from parent class GUIEngine::Screen */
|
/** \brief implement callback from parent class GUIEngine::Screen */
|
||||||
virtual void loadedFromFile() OVERRIDE;
|
virtual void loadedFromFile() OVERRIDE;
|
||||||
|
@ -199,7 +199,7 @@ void GrandPrixLose::tearDown()
|
|||||||
|
|
||||||
// -------------------------------------------------------------------------------------
|
// -------------------------------------------------------------------------------------
|
||||||
|
|
||||||
void GrandPrixLose::onUpdate(float dt, irr::video::IVideoDriver* driver)
|
void GrandPrixLose::onUpdate(float dt)
|
||||||
{
|
{
|
||||||
m_global_time += dt;
|
m_global_time += dt;
|
||||||
|
|
||||||
|
@ -75,7 +75,7 @@ public:
|
|||||||
virtual void loadedFromFile() OVERRIDE;
|
virtual void loadedFromFile() OVERRIDE;
|
||||||
|
|
||||||
/** \brief implement optional callback from parent class GUIEngine::Screen */
|
/** \brief implement optional callback from parent class GUIEngine::Screen */
|
||||||
void onUpdate(float dt, irr::video::IVideoDriver*) OVERRIDE;
|
void onUpdate(float dt) OVERRIDE;
|
||||||
|
|
||||||
/** \brief implement callback from parent class GUIEngine::Screen */
|
/** \brief implement callback from parent class GUIEngine::Screen */
|
||||||
void init() OVERRIDE;
|
void init() OVERRIDE;
|
||||||
|
@ -269,7 +269,7 @@ void GrandPrixWin::tearDown()
|
|||||||
|
|
||||||
// -------------------------------------------------------------------------------------
|
// -------------------------------------------------------------------------------------
|
||||||
|
|
||||||
void GrandPrixWin::onUpdate(float dt, irr::video::IVideoDriver* driver)
|
void GrandPrixWin::onUpdate(float dt)
|
||||||
{
|
{
|
||||||
m_global_time += dt;
|
m_global_time += dt;
|
||||||
|
|
||||||
|
@ -76,7 +76,7 @@ public:
|
|||||||
virtual void loadedFromFile() OVERRIDE;
|
virtual void loadedFromFile() OVERRIDE;
|
||||||
|
|
||||||
/** \brief implement optional callback from parent class GUIEngine::Screen */
|
/** \brief implement optional callback from parent class GUIEngine::Screen */
|
||||||
void onUpdate(float dt, irr::video::IVideoDriver*) OVERRIDE;
|
void onUpdate(float dt) OVERRIDE;
|
||||||
|
|
||||||
/** \brief implement callback from parent class GUIEngine::Screen */
|
/** \brief implement callback from parent class GUIEngine::Screen */
|
||||||
void init() OVERRIDE;
|
void init() OVERRIDE;
|
||||||
|
@ -1324,7 +1324,7 @@ bool KartSelectionScreen::playerQuit(StateManager::ActivePlayer* player)
|
|||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
|
|
||||||
void KartSelectionScreen::onUpdate(float delta, irr::video::IVideoDriver*)
|
void KartSelectionScreen::onUpdate(float delta)
|
||||||
{
|
{
|
||||||
// Dispatch the onUpdate event to each kart, so they can perform their
|
// Dispatch the onUpdate event to each kart, so they can perform their
|
||||||
// animation if any
|
// animation if any
|
||||||
|
@ -149,7 +149,7 @@ public:
|
|||||||
const int playerID) OVERRIDE;
|
const int playerID) OVERRIDE;
|
||||||
|
|
||||||
/** \brief implement callback from parent class GUIEngine::Screen */
|
/** \brief implement callback from parent class GUIEngine::Screen */
|
||||||
virtual void onUpdate(float dt, irr::video::IVideoDriver*) OVERRIDE;
|
virtual void onUpdate(float dt) OVERRIDE;
|
||||||
|
|
||||||
/** \brief implement optional callback from parent
|
/** \brief implement optional callback from parent
|
||||||
* class GUIEngine::Screen */
|
* class GUIEngine::Screen */
|
||||||
|
@ -126,7 +126,7 @@ void LoginScreen::loginError(const irr::core::stringw & error_message)
|
|||||||
/** Called in each frame. If a successful login is detected, the online screen
|
/** Called in each frame. If a successful login is detected, the online screen
|
||||||
* will be displayed.
|
* will be displayed.
|
||||||
*/
|
*/
|
||||||
void LoginScreen::onUpdate(float dt, irr::video::IVideoDriver*)
|
void LoginScreen::onUpdate(float dt)
|
||||||
{
|
{
|
||||||
|
|
||||||
if(!m_options_widget->isActivated())
|
if(!m_options_widget->isActivated())
|
||||||
|
@ -48,7 +48,7 @@ public:
|
|||||||
/** \brief implement callback from parent class GUIEngine::Screen */
|
/** \brief implement callback from parent class GUIEngine::Screen */
|
||||||
virtual void loadedFromFile() OVERRIDE {};
|
virtual void loadedFromFile() OVERRIDE {};
|
||||||
virtual void init() OVERRIDE;
|
virtual void init() OVERRIDE;
|
||||||
virtual void onUpdate(float dt, irr::video::IVideoDriver*) OVERRIDE;
|
virtual void onUpdate(float dt) OVERRIDE;
|
||||||
|
|
||||||
|
|
||||||
/** \brief implement callback from parent class GUIEngine::Screen */
|
/** \brief implement callback from parent class GUIEngine::Screen */
|
||||||
|
@ -140,7 +140,7 @@ void MainMenuScreen::init()
|
|||||||
} // init
|
} // init
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
void MainMenuScreen::onUpdate(float delta, irr::video::IVideoDriver* driver)
|
void MainMenuScreen::onUpdate(float delta)
|
||||||
{
|
{
|
||||||
IconButtonWidget* addons_icon = getWidget<IconButtonWidget>("addons");
|
IconButtonWidget* addons_icon = getWidget<IconButtonWidget>("addons");
|
||||||
if (addons_icon != NULL)
|
if (addons_icon != NULL)
|
||||||
|
@ -35,7 +35,7 @@ private:
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
virtual void onUpdate(float delta, irr::video::IVideoDriver* driver) OVERRIDE;
|
virtual void onUpdate(float delta) OVERRIDE;
|
||||||
|
|
||||||
/** \brief implement callback from parent class GUIEngine::Screen */
|
/** \brief implement callback from parent class GUIEngine::Screen */
|
||||||
virtual void loadedFromFile() OVERRIDE;
|
virtual void loadedFromFile() OVERRIDE;
|
||||||
|
@ -92,7 +92,7 @@ void NetworkingLobby::init()
|
|||||||
} // init
|
} // init
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
void NetworkingLobby::onUpdate(float delta, irr::video::IVideoDriver* driver)
|
void NetworkingLobby::onUpdate(float delta)
|
||||||
{
|
{
|
||||||
} // onUpdate
|
} // onUpdate
|
||||||
|
|
||||||
|
@ -54,7 +54,7 @@ private:
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
virtual void onUpdate(float delta, irr::video::IVideoDriver* driver) OVERRIDE;
|
virtual void onUpdate(float delta) OVERRIDE;
|
||||||
|
|
||||||
/** \brief implement callback from parent class GUIEngine::Screen */
|
/** \brief implement callback from parent class GUIEngine::Screen */
|
||||||
virtual void loadedFromFile() OVERRIDE;
|
virtual void loadedFromFile() OVERRIDE;
|
||||||
|
@ -112,7 +112,7 @@ void OnlineProfileAchievements::eventCallback(Widget* widget, const std::string&
|
|||||||
} // eventCallback
|
} // eventCallback
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
void OnlineProfileAchievements::onUpdate(float delta, irr::video::IVideoDriver* driver)
|
void OnlineProfileAchievements::onUpdate(float delta)
|
||||||
{
|
{
|
||||||
if(m_waiting_for_achievements)
|
if(m_waiting_for_achievements)
|
||||||
{
|
{
|
||||||
|
@ -57,7 +57,7 @@ public:
|
|||||||
/** \brief implement callback from parent class GUIEngine::Screen */
|
/** \brief implement callback from parent class GUIEngine::Screen */
|
||||||
virtual void init() OVERRIDE;
|
virtual void init() OVERRIDE;
|
||||||
|
|
||||||
virtual void onUpdate(float delta, irr::video::IVideoDriver* driver) OVERRIDE;
|
virtual void onUpdate(float delta) OVERRIDE;
|
||||||
|
|
||||||
virtual void beforeAddingWidget() OVERRIDE;
|
virtual void beforeAddingWidget() OVERRIDE;
|
||||||
|
|
||||||
|
@ -105,7 +105,7 @@ void OnlineProfileFriends::eventCallback(Widget* widget, const std::string& name
|
|||||||
} // eventCallback
|
} // eventCallback
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
void OnlineProfileFriends::onUpdate(float delta, irr::video::IVideoDriver* driver)
|
void OnlineProfileFriends::onUpdate(float delta)
|
||||||
{
|
{
|
||||||
if(m_waiting_for_friends)
|
if(m_waiting_for_friends)
|
||||||
{
|
{
|
||||||
|
@ -59,7 +59,7 @@ public:
|
|||||||
/** \brief implement callback from parent class GUIEngine::Screen */
|
/** \brief implement callback from parent class GUIEngine::Screen */
|
||||||
virtual void init() OVERRIDE;
|
virtual void init() OVERRIDE;
|
||||||
|
|
||||||
virtual void onUpdate(float delta, irr::video::IVideoDriver* driver) OVERRIDE;
|
virtual void onUpdate(float delta) OVERRIDE;
|
||||||
|
|
||||||
virtual void beforeAddingWidget() OVERRIDE;
|
virtual void beforeAddingWidget() OVERRIDE;
|
||||||
|
|
||||||
|
@ -140,7 +140,7 @@ void OnlineScreen::init()
|
|||||||
} // init
|
} // init
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
void OnlineScreen::onUpdate(float delta, irr::video::IVideoDriver* driver)
|
void OnlineScreen::onUpdate(float delta)
|
||||||
{
|
{
|
||||||
if (hasStateChanged())
|
if (hasStateChanged())
|
||||||
{
|
{
|
||||||
|
@ -63,7 +63,7 @@ private:
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
virtual void onUpdate(float delta, irr::video::IVideoDriver* driver) OVERRIDE;
|
virtual void onUpdate(float delta) OVERRIDE;
|
||||||
|
|
||||||
/** \brief implement callback from parent class GUIEngine::Screen */
|
/** \brief implement callback from parent class GUIEngine::Screen */
|
||||||
virtual void loadedFromFile() OVERRIDE;
|
virtual void loadedFromFile() OVERRIDE;
|
||||||
|
@ -174,7 +174,7 @@ void OnlineUserSearch::setLastSelected() //FIXME actually use this here and in s
|
|||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
|
|
||||||
void OnlineUserSearch::onUpdate(float dt, irr::video::IVideoDriver*)
|
void OnlineUserSearch::onUpdate(float dt)
|
||||||
{
|
{
|
||||||
if(m_search_request != NULL)
|
if(m_search_request != NULL)
|
||||||
{
|
{
|
||||||
|
@ -75,7 +75,7 @@ public:
|
|||||||
virtual void tearDown() OVERRIDE;
|
virtual void tearDown() OVERRIDE;
|
||||||
|
|
||||||
/** \brief implement callback from parent class GUIEngine::Screen */
|
/** \brief implement callback from parent class GUIEngine::Screen */
|
||||||
virtual void onUpdate(float dt, irr::video::IVideoDriver*) OVERRIDE;
|
virtual void onUpdate(float dt) OVERRIDE;
|
||||||
|
|
||||||
void setLastSelected();
|
void setLastSelected();
|
||||||
void setSearchString(const irr::core::stringw & search_string) {m_search_string = search_string;}
|
void setSearchString(const irr::core::stringw & search_string) {m_search_string = search_string;}
|
||||||
|
@ -297,7 +297,7 @@ void OptionsScreenInput::filterInput(Input::InputType type,
|
|||||||
|
|
||||||
// -----------------------------------------------------------------------------
|
// -----------------------------------------------------------------------------
|
||||||
|
|
||||||
void OptionsScreenInput::onUpdate(float dt, irr::video::IVideoDriver* drv)
|
void OptionsScreenInput::onUpdate(float dt)
|
||||||
{
|
{
|
||||||
std::map<std::string, float>::iterator it;
|
std::map<std::string, float>::iterator it;
|
||||||
for (it = m_highlights.begin(); it != m_highlights.end();)
|
for (it = m_highlights.begin(); it != m_highlights.end();)
|
||||||
@ -318,4 +318,4 @@ void OptionsScreenInput::onUpdate(float dt, irr::video::IVideoDriver* drv)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
//m_highlights[internal_name]
|
//m_highlights[internal_name]
|
||||||
}
|
} // onUpdate
|
||||||
|
@ -74,7 +74,7 @@ public:
|
|||||||
int value);
|
int value);
|
||||||
|
|
||||||
/** \brief implement callback from parent class GUIEngine::Screen */
|
/** \brief implement callback from parent class GUIEngine::Screen */
|
||||||
virtual void onUpdate(float dt, irr::video::IVideoDriver* drv);
|
virtual void onUpdate(float dt);
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -540,7 +540,7 @@ GUIEngine::EventPropagation RaceResultGUI::filterActions(PlayerAction action,
|
|||||||
/** Called once a frame, this now triggers the rendering of the actual
|
/** Called once a frame, this now triggers the rendering of the actual
|
||||||
* race result gui.
|
* race result gui.
|
||||||
*/
|
*/
|
||||||
void RaceResultGUI::onUpdate(float dt, irr::video::IVideoDriver*)
|
void RaceResultGUI::onUpdate(float dt)
|
||||||
{
|
{
|
||||||
renderGlobal(dt);
|
renderGlobal(dt);
|
||||||
|
|
||||||
|
@ -224,7 +224,7 @@ public:
|
|||||||
/** No kart specific view needs to be rendered in the result gui. */
|
/** No kart specific view needs to be rendered in the result gui. */
|
||||||
virtual void renderPlayerView(const AbstractKart *kart) {}
|
virtual void renderPlayerView(const AbstractKart *kart) {}
|
||||||
|
|
||||||
virtual void onUpdate(float dt, irr::video::IVideoDriver*) OVERRIDE;
|
virtual void onUpdate(float dt) OVERRIDE;
|
||||||
|
|
||||||
/** No more messages need to be displayed, but the function might still be
|
/** No more messages need to be displayed, but the function might still be
|
||||||
* called (e.g. 'new lap' message if the end controller is used for more
|
* called (e.g. 'new lap' message if the end controller is used for more
|
||||||
|
@ -126,7 +126,7 @@ void RegisterScreen::acceptTerms()
|
|||||||
|
|
||||||
// -----------------------------------------------------------------------------
|
// -----------------------------------------------------------------------------
|
||||||
|
|
||||||
void RegisterScreen::onUpdate(float dt, irr::video::IVideoDriver*)
|
void RegisterScreen::onUpdate(float dt)
|
||||||
{
|
{
|
||||||
if(m_signup_request)
|
if(m_signup_request)
|
||||||
{
|
{
|
||||||
|
@ -52,7 +52,7 @@ public:
|
|||||||
|
|
||||||
/** \brief implement callback from parent class GUIEngine::Screen */
|
/** \brief implement callback from parent class GUIEngine::Screen */
|
||||||
virtual void loadedFromFile() OVERRIDE {};
|
virtual void loadedFromFile() OVERRIDE {};
|
||||||
virtual void onUpdate(float dt, irr::video::IVideoDriver*) OVERRIDE;
|
virtual void onUpdate(float dt) OVERRIDE;
|
||||||
|
|
||||||
void acceptTerms();
|
void acceptTerms();
|
||||||
/** \brief implement callback from parent class GUIEngine::Screen */
|
/** \brief implement callback from parent class GUIEngine::Screen */
|
||||||
|
@ -185,7 +185,7 @@ void ServerSelection::setLastSelected()
|
|||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
|
|
||||||
void ServerSelection::onUpdate(float dt, irr::video::IVideoDriver*)
|
void ServerSelection::onUpdate(float dt)
|
||||||
{
|
{
|
||||||
if(m_refresh_request != NULL)
|
if(m_refresh_request != NULL)
|
||||||
{
|
{
|
||||||
|
@ -77,7 +77,7 @@ public:
|
|||||||
virtual void tearDown() OVERRIDE;
|
virtual void tearDown() OVERRIDE;
|
||||||
|
|
||||||
/** \brief implement callback from parent class GUIEngine::Screen */
|
/** \brief implement callback from parent class GUIEngine::Screen */
|
||||||
virtual void onUpdate(float dt, irr::video::IVideoDriver*) OVERRIDE;
|
virtual void onUpdate(float dt) OVERRIDE;
|
||||||
|
|
||||||
void setLastSelected();
|
void setLastSelected();
|
||||||
|
|
||||||
|
@ -51,8 +51,9 @@ void SoccerSetupScreen::loadedFromFile()
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
// -----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
void SoccerSetupScreen::eventCallback(Widget* widget, const std::string& name, const int playerID)
|
void SoccerSetupScreen::eventCallback(Widget* widget, const std::string& name,
|
||||||
|
const int playerID)
|
||||||
{
|
{
|
||||||
if(m_schedule_continue)
|
if(m_schedule_continue)
|
||||||
return;
|
return;
|
||||||
@ -118,7 +119,7 @@ void SoccerSetupScreen::eventCallback(Widget* widget, const std::string& name, c
|
|||||||
getWidget<SpinnerWidget>("goalamount")->setActivated();
|
getWidget<SpinnerWidget>("goalamount")->setActivated();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
} // eventCallback
|
||||||
|
|
||||||
// -----------------------------------------------------------------------------
|
// -----------------------------------------------------------------------------
|
||||||
void SoccerSetupScreen::beforeAddingWidget()
|
void SoccerSetupScreen::beforeAddingWidget()
|
||||||
@ -187,7 +188,7 @@ void SoccerSetupScreen::beforeAddingWidget()
|
|||||||
|
|
||||||
// Update layout
|
// Update layout
|
||||||
updateKartViewsLayout();
|
updateKartViewsLayout();
|
||||||
}
|
} // beforeAddingWidget
|
||||||
|
|
||||||
// -----------------------------------------------------------------------------
|
// -----------------------------------------------------------------------------
|
||||||
void SoccerSetupScreen::init()
|
void SoccerSetupScreen::init()
|
||||||
@ -224,7 +225,7 @@ void SoccerSetupScreen::init()
|
|||||||
// 'fire' is not assigned to a GUI event). This is done to support the old
|
// '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'.
|
// way of player joining by pressing 'fire' instead of 'select'.
|
||||||
input_manager->getDeviceList()->mapFireToSelect(true);
|
input_manager->getDeviceList()->mapFireToSelect(true);
|
||||||
}
|
} // init
|
||||||
|
|
||||||
// -----------------------------------------------------------------------------
|
// -----------------------------------------------------------------------------
|
||||||
void SoccerSetupScreen::tearDown()
|
void SoccerSetupScreen::tearDown()
|
||||||
@ -247,10 +248,10 @@ void SoccerSetupScreen::tearDown()
|
|||||||
m_kart_view_info.clear();
|
m_kart_view_info.clear();
|
||||||
|
|
||||||
Screen::tearDown();
|
Screen::tearDown();
|
||||||
}
|
} // tearDown
|
||||||
|
|
||||||
// -----------------------------------------------------------------------------
|
// -----------------------------------------------------------------------------
|
||||||
GUIEngine::EventPropagation SoccerSetupScreen::filterActions( PlayerAction action,
|
GUIEngine::EventPropagation SoccerSetupScreen::filterActions(PlayerAction action,
|
||||||
int deviceID,
|
int deviceID,
|
||||||
const unsigned int value,
|
const unsigned int value,
|
||||||
Input::InputType type,
|
Input::InputType type,
|
||||||
@ -366,11 +367,10 @@ GUIEngine::EventPropagation SoccerSetupScreen::filterActions( PlayerAction acti
|
|||||||
|
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
} // filterActions
|
||||||
|
|
||||||
|
|
||||||
// -----------------------------------------------------------------------------
|
// -----------------------------------------------------------------------------
|
||||||
void SoccerSetupScreen::onUpdate(float delta, irr::video::IVideoDriver* driver)
|
void SoccerSetupScreen::onUpdate(float delta)
|
||||||
{
|
{
|
||||||
int nb_players = m_kart_view_info.size();
|
int nb_players = m_kart_view_info.size();
|
||||||
|
|
||||||
@ -384,8 +384,9 @@ void SoccerSetupScreen::onUpdate(float delta, irr::video::IVideoDriver* driver)
|
|||||||
m_schedule_continue = false;
|
m_schedule_continue = false;
|
||||||
StateManager::get()->pushScreen( ArenasScreen::getInstance() );
|
StateManager::get()->pushScreen( ArenasScreen::getInstance() );
|
||||||
}
|
}
|
||||||
}
|
} // onUPdate
|
||||||
|
|
||||||
|
// ----------------------------------------------------------------------------
|
||||||
bool SoccerSetupScreen::areAllKartsConfirmed() const
|
bool SoccerSetupScreen::areAllKartsConfirmed() const
|
||||||
{
|
{
|
||||||
bool all_confirmed = true;
|
bool all_confirmed = true;
|
||||||
@ -399,8 +400,9 @@ bool SoccerSetupScreen::areAllKartsConfirmed() const
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
return all_confirmed;
|
return all_confirmed;
|
||||||
}
|
} // areAllKartsConfirmed
|
||||||
|
|
||||||
|
// ----------------------------------------------------------------------------
|
||||||
int SoccerSetupScreen::getNumKartsInTeam(int team)
|
int SoccerSetupScreen::getNumKartsInTeam(int team)
|
||||||
{
|
{
|
||||||
int karts_in_team = 0;
|
int karts_in_team = 0;
|
||||||
@ -411,8 +413,9 @@ int SoccerSetupScreen::getNumKartsInTeam(int team)
|
|||||||
karts_in_team++;
|
karts_in_team++;
|
||||||
}
|
}
|
||||||
return karts_in_team;
|
return karts_in_team;
|
||||||
}
|
} // getNumKartsInTeam
|
||||||
|
|
||||||
|
// -----------------------------------------------------------------------------
|
||||||
int SoccerSetupScreen::getNumConfirmedKarts()
|
int SoccerSetupScreen::getNumConfirmedKarts()
|
||||||
{
|
{
|
||||||
int confirmed_karts = 0;
|
int confirmed_karts = 0;
|
||||||
@ -425,6 +428,7 @@ int SoccerSetupScreen::getNumConfirmedKarts()
|
|||||||
return confirmed_karts;
|
return confirmed_karts;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// -----------------------------------------------------------------------------
|
||||||
void SoccerSetupScreen::updateKartViewsLayout()
|
void SoccerSetupScreen::updateKartViewsLayout()
|
||||||
{
|
{
|
||||||
Widget* central_div = getWidget<Widget>("central_div");
|
Widget* central_div = getWidget<Widget>("central_div");
|
||||||
@ -476,4 +480,5 @@ void SoccerSetupScreen::updateKartViewsLayout()
|
|||||||
// Move the view
|
// Move the view
|
||||||
view_info.view->move(pos_x, pos_y, kart_view_size, kart_view_size);
|
view_info.view->move(pos_x, pos_y, kart_view_size, kart_view_size);
|
||||||
}
|
}
|
||||||
}
|
} // updateKartViewsLayout
|
||||||
|
|
||||||
|
@ -65,7 +65,7 @@ public:
|
|||||||
/** \brief implement callback from parent class GUIEngine::Screen */
|
/** \brief implement callback from parent class GUIEngine::Screen */
|
||||||
virtual void tearDown() OVERRIDE;
|
virtual void tearDown() OVERRIDE;
|
||||||
|
|
||||||
virtual void onUpdate(float delta, irr::video::IVideoDriver* driver) OVERRIDE;
|
virtual void onUpdate(float delta) OVERRIDE;
|
||||||
|
|
||||||
/** \brief implement callback from parent class GUIEngine::Screen */
|
/** \brief implement callback from parent class GUIEngine::Screen */
|
||||||
virtual GUIEngine::EventPropagation filterActions( PlayerAction action,
|
virtual GUIEngine::EventPropagation filterActions( PlayerAction action,
|
||||||
|
Loading…
Reference in New Issue
Block a user