yaze 0.3.2
Link to the Past ROM Editor
 
Loading...
Searching...
No Matches
usage_statistics_card.cc
Go to the documentation of this file.
2
5#include "imgui/imgui.h"
7
8namespace yaze::editor {
9
11 : overworld_(overworld) {}
12
13void UsageStatisticsCard::Draw(bool* p_open) {
14 if (!overworld_ || !overworld_->is_loaded()) {
15 ImGui::TextDisabled("Overworld not loaded");
16 return;
17 }
18
19 if (ImGui::Begin("Usage Statistics", p_open)) {
20 if (ImGui::BeginTabBar("UsageTabs")) {
21 if (ImGui::BeginTabItem("Grid View")) {
23 ImGui::EndTabItem();
24 }
25 if (ImGui::BeginTabItem("States")) {
27 ImGui::EndTabItem();
28 }
29 ImGui::EndTabBar();
30 }
31 }
32 ImGui::End();
33}
34
36 // Logic moved from OverworldEditor::DrawUsageGrid
37 // Simplified for card layout
38
39 ImGui::Text("Map Usage Grid (8x8)");
40 ImGui::Separator();
41
42 if (ImGui::BeginTable("UsageGrid", 8, ImGuiTableFlags_Borders | ImGuiTableFlags_SizingFixedFit)) {
43 for (int y = 0; y < 8; y++) {
44 ImGui::TableNextRow();
45 for (int x = 0; x < 8; x++) {
46 ImGui::TableNextColumn();
47 int map_id = y * 8 + x;
48
49 // Determine color based on usage (placeholder logic, assuming we can query map status)
50 // For now, just show ID
51 ImGui::Text("%02X", map_id);
52
53 // TODO: Add actual usage data visualization here
54 // e.g., color code based on entity count or size
55 }
56 }
57 ImGui::EndTable();
58 }
59}
60
62 ImGui::Text("Global Usage Statistics");
63 ImGui::Separator();
64
65 // Placeholder for usage states
66 ImGui::Text("Total Maps: 64");
67 ImGui::Text("Large Maps: %d", 0); // TODO: Query actual data
68 ImGui::Text("Small Maps: %d", 0);
69}
70
71} // namespace yaze::editor
UsageStatisticsCard(zelda3::Overworld *overworld)
Represents the full Overworld data, light and dark world.
Definition overworld.h:217
auto is_loaded() const
Definition overworld.h:528
Editors are the view controllers for the application.
Definition agent_chat.cc:23