1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-11-24 08:32:34 +02:00

new constructor

This commit is contained in:
Laserlicht 2023-09-26 15:53:44 +02:00 committed by GitHub
parent 7cf654992f
commit 93e2826e3e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 1 deletions

View File

@ -454,6 +454,13 @@ CGStatusBar::CGStatusBar(std::shared_ptr<CIntObject> background_, EFonts Font, E
autoRedraw = false;
}
CGStatusBar::CGStatusBar(int x, int y)
: CLabel(x, y, FONT_SMALL, ETextAlignment::CENTER)
, enteringText(false)
{
addUsedEvents(LCLICK);
}
CGStatusBar::CGStatusBar(int x, int y, const ImagePath & name, int maxw)
: CLabel(x, y, FONT_SMALL, ETextAlignment::CENTER)
, enteringText(false)

View File

@ -125,7 +125,8 @@ class CGStatusBar : public CLabel, public std::enable_shared_from_this<CGStatusB
bool enteringText;
CGStatusBar(std::shared_ptr<CIntObject> background_, EFonts Font = FONT_SMALL, ETextAlignment Align = ETextAlignment::CENTER, const ColorRGBA & Color = Colors::WHITE);
CGStatusBar(int x, int y, const ImagePath & name = ImagePath::builtin(""), int maxw = -1);
CGStatusBar(int x, int y, const ImagePath & name, int maxw = -1);
CGStatusBar(int x, int y);
//make CLabel API private
using CLabel::getText;