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 // EditorPanel 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
39 // ==========================================================================
40 // EditorPanel Drawing
41 // ==========================================================================
42
43 void Draw(bool* p_open) override {
44 if (!preview_) return;
45
46 preview_->set_visible(true);
48
49 // Sync visibility back if user closed via X button
50 if (!preview_->is_visible() && p_open) {
51 *p_open = false;
52 }
53 }
54
55 void OnClose() override {
56 if (preview_) {
57 preview_->set_visible(false);
58 }
59 }
60
61 // ==========================================================================
62 // Panel-Specific Methods
63 // ==========================================================================
64
66
67 private:
69};
70
71} // namespace editor
72} // namespace yaze
73
74#endif // YAZE_APP_EDITOR_DUNGEON_PANELS_DUNGEON_EMULATOR_PREVIEW_PANEL_H_
EditorPanel 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.
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 panel components.
#define ICON_MD_MONITOR
Definition icons.h:1233