1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-03-17 20:58:07 +02:00

Merge pull request #4957 from IvanSavenko/hd_assets

Added existing HD assets for vcmi mod
This commit is contained in:
Ivan Savenko 2024-11-25 13:40:55 +02:00 committed by GitHub
commit 98430a67f4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
24 changed files with 19 additions and 39 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 594 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 747 B

After

Width:  |  Height:  |  Size: 877 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 733 B

View File

@ -1,8 +0,0 @@
{
"basepath": "vcmi/battleQueue/",
"images" :
[
{ "frame" : 0, "file" : "defendBig"},
{ "frame" : 1, "file" : "waitBig"}
]
}

View File

@ -1,8 +0,0 @@
{
"basepath": "vcmi/battleQueue/",
"images" :
[
{ "frame" : 0, "file" : "defendSmall"},
{ "frame" : 1, "file" : "waitSmall"}
]
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 759 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 719 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

View File

@ -1066,11 +1066,13 @@ StackQueue::StackBox::StackBox(StackQueue * owner):
roundRect = std::make_shared<TransparentFilledRectangle>(Rect(0, 0, 15, 18), ColorRGBA(0, 0, 0, 255), ColorRGBA(241, 216, 120, 255));
round = std::make_shared<CLabel>(4, 2, FONT_SMALL, ETextAlignment::TOPLEFT, Colors::WHITE);
int icon_x = pos.w - 17;
int icon_y = pos.h - 18;
Point iconPos(pos.w - 16, pos.h - 16);
stateIcon = std::make_shared<CAnimImage>(AnimationPath::builtin("VCMI/BATTLEQUEUE/STATESSMALL"), 0, 0, icon_x, icon_y);
stateIcon->visible = false;
defendIcon = std::make_shared<CPicture>(ImagePath::builtin("battle/QueueDefend"), iconPos);
waitIcon = std::make_shared<CPicture>(ImagePath::builtin("battle/QueueWait"), iconPos);
defendIcon->setEnabled(false);
waitIcon->setEnabled(false);
}
roundRect->disable();
}
@ -1106,22 +1108,13 @@ void StackQueue::StackBox::setUnit(const battle::Unit * unit, size_t turn, std::
round->setText(tmp);
}
if(stateIcon)
if(!owner->embedded)
{
if(unit->defended((int)turn) || (turn > 0 && unit->defended((int)turn - 1)))
{
stateIcon->setFrame(0, 0);
stateIcon->visible = true;
}
else if(unit->waited((int)turn))
{
stateIcon->setFrame(1, 0);
stateIcon->visible = true;
}
else
{
stateIcon->visible = false;
}
bool defended = unit->defended(turn) || (turn > 0 && unit->defended(turn - 1));
bool waited = unit->waited(turn) && !defended;
defendIcon->setEnabled(defended);
waitIcon->setEnabled(waited);
}
}
else
@ -1131,9 +1124,11 @@ void StackQueue::StackBox::setUnit(const battle::Unit * unit, size_t turn, std::
icon->visible = false;
icon->setFrame(0);
amount->setText("");
if(stateIcon)
stateIcon->visible = false;
if(!owner->embedded)
{
defendIcon->setEnabled(false);
waitIcon->setEnabled(false);
}
}
}

View File

@ -260,7 +260,8 @@ class StackQueue : public CIntObject
std::shared_ptr<CPicture> background;
std::shared_ptr<CAnimImage> icon;
std::shared_ptr<CLabel> amount;
std::shared_ptr<CAnimImage> stateIcon;
std::shared_ptr<CPicture> waitIcon;
std::shared_ptr<CPicture> defendIcon;
std::shared_ptr<CLabel> round;
std::shared_ptr<TransparentFilledRectangle> roundRect;