yaze
0.3.2
Link to the Past ROM Editor
Loading...
Searching...
No Matches
usage_statistics_panel.cc
Go to the documentation of this file.
1
#include "
app/editor/overworld/panels/usage_statistics_panel.h
"
2
3
#include "
app/editor/core/panel_registration.h
"
4
#include "
app/editor/overworld/panels/overworld_panel_access.h
"
5
#include "
app/editor/overworld/ui/debug/usage_statistics_card.h
"
6
7
namespace
yaze::editor
{
8
9
void
UsageStatisticsPanel::Draw
(
bool
* p_open) {
10
auto
* ow_editor =
CurrentOverworldEditor
();
11
if
(!ow_editor)
12
return
;
13
if
(ow_editor->is_lyra_preview()) {
14
ImGui::TextDisabled(
"Lyra preview: usage statistics unavailable"
);
15
return
;
16
}
17
18
// Delegate to the existing UsageStatisticsCard
19
if
(
auto
* card = ow_editor->usage_stats_card()) {
20
card->Draw(p_open);
21
}
22
}
23
24
REGISTER_PANEL
(
UsageStatisticsPanel
);
25
26
}
// namespace yaze::editor
yaze::editor::UsageStatisticsPanel
Displays tile usage statistics across all overworld maps.
Definition
usage_statistics_panel.h:19
yaze::editor::UsageStatisticsPanel::Draw
void Draw(bool *p_open) override
Draw the panel content.
Definition
usage_statistics_panel.cc:9
panel_registration.h
yaze::editor
Editors are the view controllers for the application.
Definition
patch_export_usage.cc:9
yaze::editor::CurrentOverworldEditor
OverworldEditor * CurrentOverworldEditor()
Definition
overworld_panel_access.h:15
overworld_panel_access.h
REGISTER_PANEL
#define REGISTER_PANEL(PanelClass)
Auto-registration macro for panels with default constructors.
Definition
panel_registration.h:39
usage_statistics_card.h
usage_statistics_panel.h
src
app
editor
overworld
panels
usage_statistics_panel.cc
Generated by
1.10.0