Merge pull request #4957 from IvanSavenko/hd_assets
Added existing HD assets for vcmi mod
BIN
Mods/vcmi/Content/Sprites/battle/queueDefend.png
Normal file
After Width: | Height: | Size: 594 B |
BIN
Mods/vcmi/Content/Sprites/battle/queueWait.png
Normal file
After Width: | Height: | Size: 6.6 KiB |
Before Width: | Height: | Size: 747 B After Width: | Height: | Size: 877 B |
Before Width: | Height: | Size: 2.4 KiB |
Before Width: | Height: | Size: 733 B |
@ -1,8 +0,0 @@
|
||||
{
|
||||
"basepath": "vcmi/battleQueue/",
|
||||
"images" :
|
||||
[
|
||||
{ "frame" : 0, "file" : "defendBig"},
|
||||
{ "frame" : 1, "file" : "waitBig"}
|
||||
]
|
||||
}
|
@ -1,8 +0,0 @@
|
||||
{
|
||||
"basepath": "vcmi/battleQueue/",
|
||||
"images" :
|
||||
[
|
||||
{ "frame" : 0, "file" : "defendSmall"},
|
||||
{ "frame" : 1, "file" : "waitSmall"}
|
||||
]
|
||||
}
|
Before Width: | Height: | Size: 1.7 KiB |
Before Width: | Height: | Size: 759 B |
BIN
Mods/vcmi/Content/Sprites2x/battle/queueDefend.png
Normal file
After Width: | Height: | Size: 1.5 KiB |
BIN
Mods/vcmi/Content/Sprites2x/battle/queueWait.png
Normal file
After Width: | Height: | Size: 719 B |
BIN
Mods/vcmi/Content/Sprites2x/mapFormatIcons/vcmi1.png
Normal file
After Width: | Height: | Size: 2.3 KiB |
BIN
Mods/vcmi/Content/Sprites2x/settingsWindow/gear.png
Normal file
After Width: | Height: | Size: 2.2 KiB |
BIN
Mods/vcmi/Content/Sprites2x/stackWindow/icons.png
Normal file
After Width: | Height: | Size: 4.4 KiB |
BIN
Mods/vcmi/Content/Sprites3x/battle/queueDefend.png
Normal file
After Width: | Height: | Size: 2.8 KiB |
BIN
Mods/vcmi/Content/Sprites3x/mapFormatIcons/vcmi1.png
Normal file
After Width: | Height: | Size: 4.0 KiB |
BIN
Mods/vcmi/Content/Sprites3x/settingsWindow/gear.png
Normal file
After Width: | Height: | Size: 3.7 KiB |
BIN
Mods/vcmi/Content/Sprites3x/stackWindow/icons.png
Normal file
After Width: | Height: | Size: 7.4 KiB |
BIN
Mods/vcmi/Content/Sprites4x/battle/queueDefend.png
Normal file
After Width: | Height: | Size: 4.3 KiB |
BIN
Mods/vcmi/Content/Sprites4x/mapFormatIcons/vcmi1.png
Normal file
After Width: | Height: | Size: 6.2 KiB |
BIN
Mods/vcmi/Content/Sprites4x/settingsWindow/gear.png
Normal file
After Width: | Height: | Size: 5.1 KiB |
BIN
Mods/vcmi/Content/Sprites4x/stackWindow/icons.png
Normal file
After Width: | Height: | Size: 10 KiB |
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -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;
|
||||
|
||||
|