yaze 0.3.2
Link to the Past ROM Editor
 
Loading...
Searching...
No Matches
dungeon_entrance_list_panel.h
Go to the documentation of this file.
1#ifndef YAZE_APP_EDITOR_DUNGEON_PANELS_DUNGEON_ENTRANCE_LIST_PANEL_H_
2#define YAZE_APP_EDITOR_DUNGEON_PANELS_DUNGEON_ENTRANCE_LIST_PANEL_H_
3
4#include <functional>
5#include <string>
6
10
11namespace yaze {
12namespace editor {
13
30 public:
38 std::function<void(int)> on_entrance_selected = nullptr)
40 on_entrance_selected_(std::move(on_entrance_selected)) {
41 // Wire up the callback directly to the selector
44 }
45 }
46
47 // ==========================================================================
48 // WindowContent Identity
49 // ==========================================================================
50
51 std::string GetId() const override { return "dungeon.entrance_list"; }
52 std::string GetDisplayName() const override { return "Entrance List"; }
53 std::string GetIcon() const override { return ICON_MD_DOOR_FRONT; }
54 std::string GetEditorCategory() const override { return "Dungeon"; }
55 int GetPriority() const override { return 25; }
56 std::string GetWorkflowGroup() const override { return "Core"; }
57
58 // ==========================================================================
59 // WindowContent Drawing
60 // ==========================================================================
61
62 void Draw(bool* p_open) override {
63 if (!selector_)
64 return;
65
66 // Draw just the entrance selector (no tabs)
68 }
69
70 // ==========================================================================
71 // Panel-Specific Methods
72 // ==========================================================================
73
78 void SetEntranceSelectedCallback(std::function<void(int)> callback) {
79 on_entrance_selected_ = std::move(callback);
80 if (selector_) {
82 }
83 }
84
90
91 private:
93 std::function<void(int)> on_entrance_selected_;
94};
95
96} // namespace editor
97} // namespace yaze
98
99#endif // YAZE_APP_EDITOR_DUNGEON_PANELS_DUNGEON_ENTRANCE_LIST_PANEL_H_
WindowContent for entrance list selection.
std::string GetId() const override
Unique identifier for this panel.
int GetPriority() const override
Get display priority for menu ordering.
DungeonRoomSelector * selector() const
Get the underlying selector component.
std::string GetIcon() const override
Material Design icon for this panel.
void Draw(bool *p_open) override
Draw the panel content.
DungeonEntranceListPanel(DungeonRoomSelector *selector, std::function< void(int)> on_entrance_selected=nullptr)
Construct a new panel wrapping a DungeonRoomSelector.
void SetEntranceSelectedCallback(std::function< void(int)> callback)
Set the callback for entrance selection events.
std::string GetWorkflowGroup() const override
Optional workflow group for hack-centric actions.
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.
Handles room and entrance selection UI.
void SetEntranceSelectedCallback(std::function< void(int)> callback)
Base interface for all logical window content components.
#define ICON_MD_DOOR_FRONT
Definition icons.h:613