1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-10-08 23:22:25 +02:00

remove todo

This commit is contained in:
Laserlicht
2025-09-28 21:57:58 +02:00
parent dc75ac0185
commit 08116b13de
2 changed files with 5 additions and 4 deletions

View File

@@ -340,12 +340,13 @@ std::shared_ptr<CIntObject> AdventureMapWidget::buildResourceAdditional(const Js
int remainingSpace = area.w;
int resElementSize = 84;
int fitOffset = 2;
for (int i = 0; i < 15; i++) // TODO: Replace with resources amount
for(auto & resource : LIBRARY->resourceTypeHandler->getAllObjects())
{
if(resource.getNum() < GameConstants::RESOURCE_QUANTITY)
continue;
if(remainingSpace < resElementSize)
break;
auto resource = GameResID::SULFUR; // TODO: Replace with resource
auto res = std::make_shared<CResDataBar>(ImagePath::builtin("ResBarElement"), area.topRight() + Point(remainingSpace - area.w - resElementSize + fitOffset, 0));
res->setResourcePosition(resource, Point(35, 3));

View File

@@ -32,7 +32,7 @@
CResDataBar::CResDataBar(const ImagePath & imageName, const Point & position)
{
addUsedEvents(SHOW_POPUP);
pos.x += position.x;
pos.y += position.y;