mirror of
https://github.com/vcmi/vcmi.git
synced 2025-01-12 02:28:11 +02:00
vcmi: name infobar height and width
This commit is contained in:
parent
da8840c499
commit
75358a68a7
@ -86,7 +86,7 @@ CAdvMapInt::CAdvMapInt():
|
||||
statusbar(CGStatusBar::create(ADVOPT.statusbarX,ADVOPT.statusbarY,ADVOPT.statusbarG)),
|
||||
heroList(new CHeroList(ADVOPT.hlistSize, Point(ADVOPT.hlistX, ADVOPT.hlistY), ADVOPT.hlistAU, ADVOPT.hlistAD)),
|
||||
townList(new CTownList(ADVOPT.tlistSize, Point(ADVOPT.tlistX, ADVOPT.tlistY), ADVOPT.tlistAU, ADVOPT.tlistAD)),
|
||||
infoBar(new CInfoBar(Rect(ADVOPT.infoboxX, ADVOPT.infoboxY, 192, 192))),
|
||||
infoBar(new CInfoBar(Point(ADVOPT.infoboxX, ADVOPT.infoboxY))),
|
||||
resdatabar(new CResDataBar),
|
||||
mapAudio(new MapAudioPlayer()),
|
||||
terrain(new MapView(Point(ADVOPT.advmapX, ADVOPT.advmapY), Point(ADVOPT.advmapW, ADVOPT.advmapH))),
|
||||
|
@ -279,6 +279,10 @@ CInfoBar::CInfoBar(const Rect & position)
|
||||
reset();
|
||||
}
|
||||
|
||||
CInfoBar::CInfoBar(const Point & position): CInfoBar(Rect(position.x, position.y, width, height))
|
||||
{
|
||||
}
|
||||
|
||||
void CInfoBar::showDate()
|
||||
{
|
||||
OBJECT_CONSTRUCTION_CUSTOM_CAPTURING(255-DISPOSE);
|
||||
|
@ -32,6 +32,13 @@ class CTextBox;
|
||||
/// Info box which shows next week/day information, hold the current date
|
||||
class CInfoBar : public CIntObject
|
||||
{
|
||||
private:
|
||||
/// Infobar actually have a fixed size
|
||||
/// Declare before to compute correct size of widgets
|
||||
static constexpr int width = 192;
|
||||
static constexpr int height = 192;
|
||||
static constexpr int component_offset = 8;
|
||||
|
||||
//all visible information located in one object - for ease of replacing
|
||||
class CVisibleInfo : public CIntObject
|
||||
{
|
||||
@ -124,6 +131,7 @@ class CInfoBar : public CIntObject
|
||||
void playNewDaySound();
|
||||
public:
|
||||
CInfoBar(const Rect & pos);
|
||||
CInfoBar(const Point & pos);
|
||||
|
||||
/// show new day/week animation
|
||||
void showDate();
|
||||
|
Loading…
Reference in New Issue
Block a user