yaze 0.3.2
Link to the Past ROM Editor
 
Loading...
Searching...
No Matches
room_browser_content.h
Go to the documentation of this file.
1#ifndef YAZE_APP_EDITOR_DUNGEON_WORKSPACE_ROOM_BROWSER_CONTENT_H_
2#define YAZE_APP_EDITOR_DUNGEON_WORKSPACE_ROOM_BROWSER_CONTENT_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 // WindowContent 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 std::string GetWorkflowGroup() const override { return "Core"; }
55
56 // ==========================================================================
57 // WindowContent Drawing
58 // ==========================================================================
59
60 void Draw(bool* p_open) override {
61 if (!selector_)
62 return;
63
64 // Draw just the room selector (no tabs)
66 }
67
68 // ==========================================================================
69 // Panel-Specific Methods
70 // ==========================================================================
71
76 void SetRoomSelectedCallback(std::function<void(int)> callback) {
77 on_room_selected_ = std::move(callback);
78 if (selector_) {
80 }
81 }
82
88
89 private:
91 std::function<void(int)> on_room_selected_;
92};
93
94} // namespace editor
95} // namespace yaze
96
97#endif // YAZE_APP_EDITOR_DUNGEON_WORKSPACE_ROOM_BROWSER_CONTENT_H_
Handles room and entrance selection UI.
void DrawRoomSelector(RoomSelectionIntent single_click_intent=RoomSelectionIntent::kFocusInWorkbench)
void SetRoomSelectedCallback(std::function< void(int)> callback)
WindowContent for room list selection.
void SetRoomSelectedCallback(std::function< void(int)> callback)
Set the callback for room selection events.
int GetPriority() const override
Get display priority for menu ordering.
RoomBrowserContent(DungeonRoomSelector *selector, std::function< void(int)> on_room_selected=nullptr)
Construct a new panel wrapping a DungeonRoomSelector.
std::function< void(int)> on_room_selected_
std::string GetIcon() const override
Material Design icon for this panel.
std::string GetId() const override
Unique identifier for this panel.
std::string GetDisplayName() const override
Human-readable name shown in menus and title bars.
DungeonRoomSelector * selector() const
Get the underlying selector component.
std::string GetWorkflowGroup() const override
Optional workflow group for hack-centric actions.
void Draw(bool *p_open) override
Draw the panel content.
std::string GetEditorCategory() const override
Editor category this panel belongs to.
Base interface for all logical window content components.
#define ICON_MD_LIST
Definition icons.h:1094