mirror of
https://github.com/vcmi/vcmi.git
synced 2025-10-08 23:22:25 +02:00
remove todo
This commit is contained in:
@@ -340,13 +340,14 @@ 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));
|
||||
addWidget("", res);
|
||||
|
Reference in New Issue
Block a user