Dynamically update list of tabs in arenas screen, to better handle when addons arenas are first installed
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@10142 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
parent
36c979471f
commit
c577e285c4
@ -49,6 +49,13 @@ ArenasScreen::ArenasScreen() : Screen("arenas.stkgui")
|
||||
|
||||
void ArenasScreen::loadedFromFile()
|
||||
{
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------------------------------------
|
||||
|
||||
void ArenasScreen::beforeAddingWidget()
|
||||
{
|
||||
|
||||
// Dynamically add tabs
|
||||
RibbonWidget* tabs = this->getWidget<RibbonWidget>("trackgroups");
|
||||
assert( tabs != NULL );
|
||||
@ -90,8 +97,7 @@ void ArenasScreen::loadedFromFile()
|
||||
DynamicRibbonWidget* tracks_widget = this->getWidget<DynamicRibbonWidget>("tracks");
|
||||
assert( tracks_widget != NULL );
|
||||
tracks_widget->setItemCountHint(num_of_arenas); //set the item hint to that number to prevent weird formatting
|
||||
|
||||
} // ArenasScreen
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------------------------------------
|
||||
|
||||
|
@ -36,6 +36,9 @@ class ArenasScreen : public GUIEngine::Screen, public GUIEngine::ScreenSingleton
|
||||
|
||||
public:
|
||||
|
||||
/** \brief implement callback from parent class GUIEngine::Screen */
|
||||
virtual void beforeAddingWidget();
|
||||
|
||||
/** \brief implement callback from parent class GUIEngine::Screen */
|
||||
virtual void loadedFromFile();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user