Improve LOd on ferns
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@9282 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
@@ -64,6 +64,25 @@ void ChallengesScreen::onUpdate(float elapsed_time, irr::video::IVideoDriver*)
|
||||
|
||||
// ------------------------------------------------------------------------------------------------------
|
||||
|
||||
void ChallengesScreen::beforeAddingWidget()
|
||||
{
|
||||
DynamicRibbonWidget* w = this->getWidget<DynamicRibbonWidget>("challenges");
|
||||
assert( w != NULL );
|
||||
|
||||
const std::vector<const ChallengeData*>& activeChallenges = unlock_manager->getActiveChallenges();
|
||||
const std::vector<const ChallengeData*>& solvedChallenges = unlock_manager->getUnlockedFeatures();
|
||||
const std::vector<const ChallengeData*>& lockedChallenges = unlock_manager->getLockedChallenges();
|
||||
|
||||
const int activeChallengeAmount = activeChallenges.size();
|
||||
const int solvedChallengeAmount = solvedChallenges.size();
|
||||
const int lockedChallengeAmount = lockedChallenges.size();
|
||||
|
||||
|
||||
w->setItemCountHint(activeChallengeAmount + solvedChallengeAmount + lockedChallengeAmount);
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------------------------------------
|
||||
|
||||
void ChallengesScreen::init()
|
||||
{
|
||||
Screen::init();
|
||||
|
||||
@@ -43,13 +43,16 @@ public:
|
||||
virtual void loadedFromFile();
|
||||
|
||||
/** \brief implement optional callback from parent class GUIEngine::Screen */
|
||||
void onUpdate(float dt, irr::video::IVideoDriver*);
|
||||
virtual void onUpdate(float dt, irr::video::IVideoDriver*);
|
||||
|
||||
/** \brief implement callback from parent class GUIEngine::Screen */
|
||||
void init();
|
||||
virtual void beforeAddingWidget();
|
||||
|
||||
/** \brief implement callback from parent class GUIEngine::Screen */
|
||||
void eventCallback(GUIEngine::Widget* widget, const std::string& name, const int playerID);
|
||||
virtual void init();
|
||||
|
||||
/** \brief implement callback from parent class GUIEngine::Screen */
|
||||
virtual void eventCallback(GUIEngine::Widget* widget, const std::string& name, const int playerID);
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user