1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-08-13 19:54:17 +02:00

Merge pull request #604 from dydzio0614/StatusbarFix2

Revert old statusbar hackfix
This commit is contained in:
Alexander Shishkin
2019-06-07 01:03:27 +03:00
committed by GitHub
2 changed files with 0 additions and 10 deletions

View File

@@ -376,11 +376,6 @@ CGStatusBar::CGStatusBar(int x, int y, std::string name, int maxw)
autoRedraw = false; autoRedraw = false;
} }
CGStatusBar::~CGStatusBar()
{
GH.statusbar = oldStatusBar;
}
void CGStatusBar::show(SDL_Surface * to) void CGStatusBar::show(SDL_Surface * to)
{ {
showAll(to); showAll(to);
@@ -388,7 +383,6 @@ void CGStatusBar::show(SDL_Surface * to)
void CGStatusBar::init() void CGStatusBar::init()
{ {
oldStatusBar = GH.statusbar;
GH.statusbar = shared_from_this(); GH.statusbar = shared_from_this();
} }

View File

@@ -119,8 +119,6 @@ class CGStatusBar : public CLabel, public std::enable_shared_from_this<CGStatusB
bool textLock; //Used for blocking changes to the text bool textLock; //Used for blocking changes to the text
void init(); void init();
std::shared_ptr<CGStatusBar> oldStatusBar;
CGStatusBar(std::shared_ptr<CPicture> background_, EFonts Font = FONT_SMALL, EAlignment Align = CENTER, const SDL_Color & Color = Colors::WHITE); CGStatusBar(std::shared_ptr<CPicture> background_, EFonts Font = FONT_SMALL, EAlignment Align = CENTER, const SDL_Color & Color = Colors::WHITE);
CGStatusBar(int x, int y, std::string name, int maxw = -1); CGStatusBar(int x, int y, std::string name, int maxw = -1);
protected: protected:
@@ -139,8 +137,6 @@ public:
void show(SDL_Surface * to) override; //shows statusbar (with current text) void show(SDL_Surface * to) override; //shows statusbar (with current text)
~CGStatusBar();
void lock(bool shouldLock); //If true, current text cannot be changed until lock(false) is called void lock(bool shouldLock); //If true, current text cannot be changed until lock(false) is called
}; };