Fixed a crash on changing resolution
This commit is contained in:
parent
fcae7dfc33
commit
35139877f6
@ -87,6 +87,16 @@ void MainMenuScreen::loadedFromFile()
|
|||||||
LabelWidget* w = getWidget<LabelWidget>("info_addons");
|
LabelWidget* w = getWidget<LabelWidget>("info_addons");
|
||||||
w->setScrollSpeed(15);
|
w->setScrollSpeed(15);
|
||||||
|
|
||||||
|
IconButtonWidget* iw = getWidget<IconButtonWidget>("story");
|
||||||
|
assert(iw != NULL);
|
||||||
|
|
||||||
|
if (track_manager->getTrack("overworld") == NULL ||
|
||||||
|
track_manager->getTrack("introcutscene") == NULL ||
|
||||||
|
track_manager->getTrack("introcutscene2") == NULL)
|
||||||
|
{
|
||||||
|
iw->setVisible(false);
|
||||||
|
}
|
||||||
|
|
||||||
#if DEBUG_MENU_ITEM != 1
|
#if DEBUG_MENU_ITEM != 1
|
||||||
RibbonWidget* rw = getWidget<RibbonWidget>("menu_bottomrow");
|
RibbonWidget* rw = getWidget<RibbonWidget>("menu_bottomrow");
|
||||||
rw->removeChildNamed("test_gpwin");
|
rw->removeChildNamed("test_gpwin");
|
||||||
@ -102,15 +112,7 @@ void MainMenuScreen::loadedFromFile()
|
|||||||
|
|
||||||
void MainMenuScreen::beforeAddingWidget()
|
void MainMenuScreen::beforeAddingWidget()
|
||||||
{
|
{
|
||||||
IconButtonWidget* w = getWidget<IconButtonWidget>("story");
|
|
||||||
assert(w != NULL);
|
|
||||||
|
|
||||||
if (track_manager->getTrack("overworld") == NULL ||
|
|
||||||
track_manager->getTrack("introcutscene") == NULL ||
|
|
||||||
track_manager->getTrack("introcutscene2") == NULL)
|
|
||||||
{
|
|
||||||
w->setVisible(false);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
|
Loading…
x
Reference in New Issue
Block a user