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 // EditorPanel 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
57 // ==========================================================================
58 // EditorPanel Drawing
59 // ==========================================================================
60
61 void Draw(bool* p_open) override {
62 if (!selector_) return;
63
64 // Draw just the entrance selector (no tabs)
66 }
67
68 // ==========================================================================
69 // Panel-Specific Methods
70 // ==========================================================================
71
76 void SetEntranceSelectedCallback(std::function<void(int)> callback) {
77 on_entrance_selected_ = std::move(callback);
78 if (selector_) {
80 }
81 }
82
88
89 private:
91 std::function<void(int)> on_entrance_selected_;
92};
93
94} // namespace editor
95} // namespace yaze
96
97#endif // YAZE_APP_EDITOR_DUNGEON_PANELS_DUNGEON_ENTRANCE_LIST_PANEL_H_
98
EditorPanel 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 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 panel components.
#define ICON_MD_DOOR_FRONT
Definition icons.h:613