1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-06-23 00:28:08 +02:00

Refactoring of CPicture class to improve encapsulation

This commit is contained in:
Ivan Savenko
2023-01-30 13:58:13 +02:00
parent 42df5626d9
commit e35a669eeb
14 changed files with 84 additions and 109 deletions

View File

@ -76,11 +76,7 @@ CMenuScreen::CMenuScreen(const JsonNode & configNode)
background = std::make_shared<CPicture>(config["background"].String());
if(config["scalable"].Bool())
{
if(background->bg->format->palette)
background->convertToScreenBPP();
background->scaleTo(Point(screen->w, screen->h));
}
pos = background->center();