mirror of
https://github.com/vcmi/vcmi.git
synced 2025-01-26 03:52:01 +02:00
Merge pull request #2932 from Laserlicht/mainmenu_layer
fix layer problem in mainmenu
This commit is contained in:
commit
9147fd49ab
@ -94,7 +94,8 @@ CMenuScreen::CMenuScreen(const JsonNode & configNode)
|
||||
menuNameToEntry.push_back("credits");
|
||||
|
||||
tabs = std::make_shared<CTabbedInt>(std::bind(&CMenuScreen::createTab, this, _1));
|
||||
tabs->setRedrawParent(true);
|
||||
if(config["video"].isNull())
|
||||
tabs->setRedrawParent(true);
|
||||
}
|
||||
|
||||
std::shared_ptr<CIntObject> CMenuScreen::createTab(size_t index)
|
||||
@ -108,7 +109,12 @@ std::shared_ptr<CIntObject> CMenuScreen::createTab(size_t index)
|
||||
void CMenuScreen::show(Canvas & to)
|
||||
{
|
||||
if(!config["video"].isNull())
|
||||
{
|
||||
// redraw order: background -> video -> buttons and pictures
|
||||
background->redraw();
|
||||
CCS->videoh->update((int)config["video"]["x"].Float() + pos.x, (int)config["video"]["y"].Float() + pos.y, to.getInternalSurface(), true, false);
|
||||
tabs->redraw();
|
||||
}
|
||||
CIntObject::show(to);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user