git repos / saland

commit 31cd65a7

Poul Sander · 2024-10-09 20:19
31cd65a70a1005736f3a16fcefc60a575ccfffec patch · browse files
parent e2b0f536eebc68ffb3490ed1bca6050dbb2ac340

Print items owned on the debug page

Changed files

M src/saland/Game.cpp before
diff --git a/src/saland/Game.cpp b/src/saland/Game.cpp index 17a4e1f..b0c6e89 100644 --- a/src/saland/Game.cpp +++ b/src/saland/Game.cpp
@@ -333,6 +333,11 @@ static void DrawDebugMenu(SDL_Renderer* target) {
globalData.debugDrawCollision = !globalData.debugDrawCollision;
}
ImGui::End();
+ ImGui::Begin("Items");
+ for (const auto& item: globalData.player.item_inventory) {
+ ImGui::Text("%s %d", item.first.c_str(), item.second);
+ }
+ ImGui::End();
}
void Game::Draw(SDL_Renderer* target) {