mirror of
https://github.com/vcmi/vcmi.git
synced 2025-11-23 22:37:55 +02:00
Merge remote-tracking branch 'vcmi/beta' into develop
This commit is contained in:
@@ -25,21 +25,25 @@ CHeroBackpackWindow::CHeroBackpackWindow(const CGHeroInstance * hero)
|
||||
OBJECT_CONSTRUCTION_CAPTURING(255-DISPOSE);
|
||||
|
||||
stretchedBackground = std::make_shared<CFilledTexture>(ImagePath::builtin("DIBOXBCK"), Rect(0, 0, 410, 425));
|
||||
pos.w = stretchedBackground->pos.w;
|
||||
pos.h = stretchedBackground->pos.h;
|
||||
center();
|
||||
|
||||
|
||||
arts = std::make_shared<CArtifactsOfHeroBackpack>(/*Point(-100, -170)*/Point(10, 10));
|
||||
arts = std::make_shared<CArtifactsOfHeroBackpack>(Point(windowMargin, windowMargin));
|
||||
arts->setHero(hero);
|
||||
addSet(arts);
|
||||
|
||||
addCloseCallback(std::bind(&CHeroBackpackWindow::close, this));
|
||||
|
||||
quitButton = std::make_shared<CButton>(Point(173, 385), AnimationPath::builtin("IOKAY32.def"), CButton::tooltip(""), [this]() { close(); }, EShortcut::GLOBAL_RETURN);
|
||||
quitButton = std::make_shared<CButton>(Point(), AnimationPath::builtin("IOKAY32.def"), CButton::tooltip(""), [this]() { close(); }, EShortcut::GLOBAL_RETURN);
|
||||
|
||||
stretchedBackground->pos.w = arts->pos.w + 2 * windowMargin;
|
||||
stretchedBackground->pos.h = arts->pos.h + quitButton->pos.h + 3 * windowMargin;
|
||||
pos.w = stretchedBackground->pos.w;
|
||||
pos.h = stretchedBackground->pos.h;
|
||||
center();
|
||||
|
||||
quitButton->moveBy(Point(GH.screenDimensions().x / 2 - quitButton->pos.w / 2 - quitButton->pos.x, arts->pos.h + 2 * windowMargin));
|
||||
}
|
||||
|
||||
void CHeroBackpackWindow::showAll(Canvas &to)
|
||||
void CHeroBackpackWindow::showAll(Canvas & to)
|
||||
{
|
||||
CIntObject::showAll(to);
|
||||
CMessage::drawBorder(PlayerColor(LOCPLINT->playerID), to.getInternalSurface(), pos.w+28, pos.h+29, pos.x-14, pos.y-15);
|
||||
|
||||
Reference in New Issue
Block a user