yaze 0.3.2
Link to the Past ROM Editor
 
Loading...
Searching...
No Matches
dungeon_room_selector_panel.h
Go to the documentation of this file.
1#ifndef YAZE_APP_EDITOR_DUNGEON_PANELS_DUNGEON_ROOM_SELECTOR_PANEL_H_
2#define YAZE_APP_EDITOR_DUNGEON_PANELS_DUNGEON_ROOM_SELECTOR_PANEL_H_
3
4#include <functional>
5#include <string>
6
10
11namespace yaze {
12namespace editor {
13
29 public:
37 std::function<void(int)> on_room_selected = nullptr)
38 : selector_(selector), on_room_selected_(std::move(on_room_selected)) {
39 // Wire up the callback directly to the selector
42 }
43 }
44
45 // ==========================================================================
46 // EditorPanel Identity
47 // ==========================================================================
48
49 std::string GetId() const override { return "dungeon.room_selector"; }
50 std::string GetDisplayName() const override { return "Room List"; }
51 std::string GetIcon() const override { return ICON_MD_LIST; }
52 std::string GetEditorCategory() const override { return "Dungeon"; }
53 int GetPriority() const override { return 20; }
54
55 // ==========================================================================
56 // EditorPanel Drawing
57 // ==========================================================================
58
59 void Draw(bool* p_open) override {
60 if (!selector_) return;
61
62 // Draw just the room selector (no tabs)
64 }
65
66 // ==========================================================================
67 // Panel-Specific Methods
68 // ==========================================================================
69
74 void SetRoomSelectedCallback(std::function<void(int)> callback) {
75 on_room_selected_ = std::move(callback);
76 if (selector_) {
78 }
79 }
80
86
87 private:
89 std::function<void(int)> on_room_selected_;
90};
91
92} // namespace editor
93} // namespace yaze
94
95#endif // YAZE_APP_EDITOR_DUNGEON_PANELS_DUNGEON_ROOM_SELECTOR_PANEL_H_
EditorPanel for room list selection.
DungeonRoomSelector * selector() const
Get the underlying selector component.
int GetPriority() const override
Get display priority for menu ordering.
void Draw(bool *p_open) override
Draw the panel content.
std::string GetId() const override
Unique identifier for this panel.
std::string GetEditorCategory() const override
Editor category this panel belongs to.
DungeonRoomSelectorPanel(DungeonRoomSelector *selector, std::function< void(int)> on_room_selected=nullptr)
Construct a new panel wrapping a DungeonRoomSelector.
std::string GetDisplayName() const override
Human-readable name shown in menus and title bars.
void SetRoomSelectedCallback(std::function< void(int)> callback)
Set the callback for room selection events.
std::string GetIcon() const override
Material Design icon for this panel.
Handles room and entrance selection UI.
void SetRoomSelectedCallback(std::function< void(int)> callback)
Base interface for all logical panel components.
#define ICON_MD_LIST
Definition icons.h:1094