yaze 0.3.2
Link to the Past ROM Editor
 
Loading...
Searching...
No Matches
dungeon_emulator_preview_panel.h
Go to the documentation of this file.
1#ifndef YAZE_APP_EDITOR_DUNGEON_PANELS_DUNGEON_EMULATOR_PREVIEW_PANEL_H_
2#define YAZE_APP_EDITOR_DUNGEON_PANELS_DUNGEON_EMULATOR_PREVIEW_PANEL_H_
3
4#include <string>
5
9
10namespace yaze {
11namespace editor {
12
24 public:
28
29 // ==========================================================================
30 // WindowContent Identity
31 // ==========================================================================
32
33 std::string GetId() const override { return "dungeon.emulator_preview"; }
34 std::string GetDisplayName() const override { return "SNES Object Preview"; }
35 std::string GetIcon() const override { return ICON_MD_MONITOR; }
36 std::string GetEditorCategory() const override { return "Dungeon"; }
37 int GetPriority() const override { return 65; }
38 std::string GetWorkflowGroup() const override { return "Advanced"; }
39
40 // ==========================================================================
41 // WindowContent Drawing
42 // ==========================================================================
43
44 void Draw(bool* p_open) override {
45 if (!preview_)
46 return;
47
48 preview_->set_visible(true);
50
51 // Sync visibility back if user closed via X button
52 if (!preview_->is_visible() && p_open) {
53 *p_open = false;
54 }
55 }
56
57 void OnClose() override {
58 if (preview_) {
59 preview_->set_visible(false);
60 }
61 }
62
63 // ==========================================================================
64 // Panel-Specific Methods
65 // ==========================================================================
66
68
69 private:
71};
72
73} // namespace editor
74} // namespace yaze
75
76#endif // YAZE_APP_EDITOR_DUNGEON_PANELS_DUNGEON_EMULATOR_PREVIEW_PANEL_H_
WindowContent wrapper for DungeonObjectEmulatorPreview.
std::string GetDisplayName() const override
Human-readable name shown in menus and title bars.
std::string GetEditorCategory() const override
Editor category this panel belongs to.
gui::DungeonObjectEmulatorPreview * preview() const
std::string GetId() const override
Unique identifier for this panel.
void OnClose() override
Called when panel is hidden.
DungeonEmulatorPreviewPanel(gui::DungeonObjectEmulatorPreview *preview)
int GetPriority() const override
Get display priority for menu ordering.
std::string GetWorkflowGroup() const override
Optional workflow group for hack-centric actions.
void Draw(bool *p_open) override
Draw the panel content.
std::string GetIcon() const override
Material Design icon for this panel.
Base interface for all logical window content components.
#define ICON_MD_MONITOR
Definition icons.h:1233