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
6#include "imgui/imgui.h"
8
9namespace yaze::editor {
10
12 : overworld_(overworld) {}
13
14void UsageStatisticsCard::Draw(bool* p_open) {
15 if (!overworld_ || !overworld_->is_loaded()) {
16 ImGui::TextDisabled("Overworld not loaded");
17 return;
18 }
19
20 if (ImGui::Begin("Usage Statistics", p_open)) {
21 if (gui::BeginThemedTabBar("UsageTabs")) {
22 if (ImGui::BeginTabItem("Grid View")) {
24 ImGui::EndTabItem();
25 }
26 if (ImGui::BeginTabItem("States")) {
28 ImGui::EndTabItem();
29 }
31 }
32 }
33 ImGui::End();
34}
35
37 // Logic moved from OverworldEditor::DrawUsageGrid
38 // Simplified for card layout
39
40 ImGui::Text("Map Usage Grid (8x8)");
41 ImGui::Separator();
42
43 if (ImGui::BeginTable(
44 "UsageGrid", 8,
45 ImGuiTableFlags_Borders | ImGuiTableFlags_SizingFixedFit)) {
46 for (int y = 0; y < 8; y++) {
47 ImGui::TableNextRow();
48 for (int x = 0; x < 8; x++) {
49 ImGui::TableNextColumn();
50 int map_id = y * 8 + x;
51
52 // Determine color based on usage (placeholder logic, assuming we can query map status)
53 // For now, just show ID
54 ImGui::Text("%02X", map_id);
55
56 // TODO: Add actual usage data visualization here
57 // e.g., color code based on entity count or size
58 }
59 }
60 ImGui::EndTable();
61 }
62}
63
65 ImGui::Text("Global Usage Statistics");
66 ImGui::Separator();
67
68 // Placeholder for usage states
69 ImGui::Text("Total Maps: 64");
70 ImGui::Text("Large Maps: %d", 0); // TODO: Query actual data
71 ImGui::Text("Small Maps: %d", 0);
72}
73
74} // namespace yaze::editor
UsageStatisticsCard(zelda3::Overworld *overworld)
Represents the full Overworld data, light and dark world.
Definition overworld.h:261
auto is_loaded() const
Definition overworld.h:583
Editors are the view controllers for the application.
bool BeginThemedTabBar(const char *id, ImGuiTabBarFlags flags)
A stylized tab bar with "Mission Control" branding.
void EndThemedTabBar()