tweaks inventory screen display
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user