yaze 0.3.2
Link to the Past ROM Editor
 
Loading...
Searching...
No Matches
dungeon_room_nav_widget.h
Go to the documentation of this file.
1#ifndef YAZE_APP_EDITOR_DUNGEON_WIDGETS_DUNGEON_ROOM_NAV_WIDGET_H
2#define YAZE_APP_EDITOR_DUNGEON_WIDGETS_DUNGEON_ROOM_NAV_WIDGET_H
3
4#include <functional>
5#include <optional>
6
7namespace yaze::editor {
8
9// Small reusable widget that renders 4-way dungeon room navigation arrows.
10// Intended for Workbench/toolbars (not tied to DungeonCanvasViewer).
12 public:
13 struct Neighbors {
14 std::optional<int> west;
15 std::optional<int> north;
16 std::optional<int> south;
17 std::optional<int> east;
18 };
19
20 static Neighbors GetNeighbors(int room_id);
21
22 // Draws a single-row navigation strip (W/N/S/E). Returns true if navigation
23 // occurred (callback invoked).
24 static bool Draw(const char* id, int room_id,
25 const std::function<void(int)>& on_navigate);
26};
27
28} // namespace yaze::editor
29
30#endif // YAZE_APP_EDITOR_DUNGEON_WIDGETS_DUNGEON_ROOM_NAV_WIDGET_H
31
static bool Draw(const char *id, int room_id, const std::function< void(int)> &on_navigate)
static Neighbors GetNeighbors(int room_id)
Editors are the view controllers for the application.