tweaks inventory screen display

This commit is contained in:
Mark Suckerberg
2025-12-30 17:44:12 -06:00
parent b5568d5493
commit 2d2faebd10
5 changed files with 130 additions and 57 deletions

View File

@@ -117,7 +117,14 @@ namespace game::window
{
if (i == Item::INVALID) continue;
ImGui::PushID(i);
ImGui::DragInt(Item::NAMES[i], &inventory.values[(Item::Type)i], 0.1f, 0, 999);
//TODO: Probably a cleaner way to do this, maybe
int value = inventory.get_item((Item::Type)i);
if (ImGui::DragInt(Item::NAMES[i], &value, 0.1f, 0, 999))
{
inventory.set_item((Item::Type)i, value);
}
ImGui::PopID();
}
ImGui::PopItemWidth();