1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-11-24 08:32:34 +02:00

Fix slot selection in markets

This commit is contained in:
Ivan Savenko 2024-02-18 21:18:55 +02:00
parent af671d109f
commit 14e3c762c0
2 changed files with 2 additions and 1 deletions

View File

@ -75,7 +75,7 @@ TransparentFilledRectangle::TransparentFilledRectangle(Rect position, ColorRGBA
{
addBox(Point(0,0), Point(-1, -1), color);
for (int i = 0; i < width; ++i)
addRectangle(Point(i,i), Point(-1-i, -1-i), colorLine);
addRectangle(Point(i,i), Point(-1-i*2, -1-i*2), colorLine);
}
SimpleLine::SimpleLine(Point pos1, Point pos2, ColorRGBA color) :

View File

@ -699,4 +699,5 @@ void SelectableSlot::setSelectionWidth(int width)
{
OBJECT_CONSTRUCTION_CAPTURING(255-DISPOSE);
selection = std::make_shared<TransparentFilledRectangle>( selection->pos - pos.topLeft(), Colors::TRANSPARENCY, Colors::YELLOW, width);
selectSlot(selected);
}