1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-12-03 23:19:22 +02:00

Fixed recoloring filler background to correct player color after game reload;

This commit is contained in:
Fay
2015-01-29 20:34:53 +01:00
parent 794c03792a
commit df419e23c0
3 changed files with 23 additions and 11 deletions

View File

@@ -320,7 +320,6 @@ class CAdvMapPanel : public CIntObject
{
/// ptrs to child-buttons that can be recolored with setPlayerColor()
std::vector<CButton *> buttons;
protected:
/// the surface passed to this obj will be freed in dtor
SDL_Surface * background;
public:
@@ -344,13 +343,14 @@ class CAdvMapWorldViewPanel : public CAdvMapPanel
std::vector<CPicture *> currentIcons;
/// temporary surface drawn below world view panel on higher resolutions (won't be needed when world view panel is configured for extraResolutions mod)
SDL_Surface * tmpBackgroundFiller;
int fillerHeight;
public:
CAdvMapWorldViewPanel(SDL_Surface * bg, Point position, int spaceBottom, const PlayerColor &color);
virtual ~CAdvMapWorldViewPanel();
void addChildIcon(std::pair<int, Point> data, const CDefHandler *def, int indexOffset);
/// recreates all pictures from given def to recolor them according to current player color
void recolorIcons(const CDefHandler *def, int indexOffset);
void recolorIcons(const PlayerColor &color, const CDefHandler *def, int indexOffset);
void showAll(SDL_Surface * to);
};