mirror of
https://github.com/vcmi/vcmi.git
synced 2025-01-12 02:28:11 +02:00
inherit CHeroWindow from CStatusbarWindow for proper status bar support
This commit is contained in:
parent
99502c97d0
commit
ebeff94130
@ -100,7 +100,7 @@ CHeroSwitcher::CHeroSwitcher(CHeroWindow * owner_, Point pos_, const CGHeroInsta
|
|||||||
}
|
}
|
||||||
|
|
||||||
CHeroWindow::CHeroWindow(const CGHeroInstance * hero)
|
CHeroWindow::CHeroWindow(const CGHeroInstance * hero)
|
||||||
: CWindowObject(PLAYER_COLORED, "HeroScr4"),
|
: CStatusbarWindow(PLAYER_COLORED, "HeroScr4"),
|
||||||
heroWArt(this, hero)
|
heroWArt(this, hero)
|
||||||
{
|
{
|
||||||
auto & heroscrn = CGI->generaltexth->heroscrn;
|
auto & heroscrn = CGI->generaltexth->heroscrn;
|
||||||
@ -112,7 +112,7 @@ CHeroWindow::CHeroWindow(const CGHeroInstance * hero)
|
|||||||
name = std::make_shared<CLabel>(190, 38, EFonts::FONT_BIG, EAlignment::CENTER, Colors::YELLOW);
|
name = std::make_shared<CLabel>(190, 38, EFonts::FONT_BIG, EAlignment::CENTER, Colors::YELLOW);
|
||||||
title = std::make_shared<CLabel>(190, 65, EFonts::FONT_MEDIUM, EAlignment::CENTER, Colors::WHITE);
|
title = std::make_shared<CLabel>(190, 65, EFonts::FONT_MEDIUM, EAlignment::CENTER, Colors::WHITE);
|
||||||
|
|
||||||
statusBar = CGStatusBar::create(7, 559, "ADROLLVR.bmp", 660);
|
statusbar = CGStatusBar::create(7, 559, "ADROLLVR.bmp", 660);
|
||||||
|
|
||||||
quitButton = std::make_shared<CButton>(Point(609, 516), "hsbtns.def", CButton::tooltip(heroscrn[17]), [=](){ close(); }, SDLK_RETURN);
|
quitButton = std::make_shared<CButton>(Point(609, 516), "hsbtns.def", CButton::tooltip(heroscrn[17]), [=](){ close(); }, SDLK_RETURN);
|
||||||
quitButton->assignedKeys.insert(SDLK_ESCAPE);
|
quitButton->assignedKeys.insert(SDLK_ESCAPE);
|
||||||
|
@ -57,13 +57,12 @@ public:
|
|||||||
int64_t getTreeVersion() const override;
|
int64_t getTreeVersion() const override;
|
||||||
};
|
};
|
||||||
|
|
||||||
class CHeroWindow : public CWindowObject, public CGarrisonHolder, public CWindowWithArtifacts
|
class CHeroWindow : public CStatusbarWindow, public CGarrisonHolder, public CWindowWithArtifacts
|
||||||
{
|
{
|
||||||
std::shared_ptr<CLabel> name;
|
std::shared_ptr<CLabel> name;
|
||||||
std::shared_ptr<CLabel> title;
|
std::shared_ptr<CLabel> title;
|
||||||
|
|
||||||
std::shared_ptr<CAnimImage> banner;
|
std::shared_ptr<CAnimImage> banner;
|
||||||
std::shared_ptr<CGStatusBar> statusBar;
|
|
||||||
|
|
||||||
std::vector<std::shared_ptr<CHeroSwitcher>> heroList;
|
std::vector<std::shared_ptr<CHeroSwitcher>> heroList;
|
||||||
std::shared_ptr<CPicture> listSelection;
|
std::shared_ptr<CPicture> listSelection;
|
||||||
|
Loading…
Reference in New Issue
Block a user