yaze 0.3.2
Link to the Past ROM Editor
 
Loading...
Searching...
No Matches
dungeon_workbench_toolbar.h
Go to the documentation of this file.
1#ifndef YAZE_APP_EDITOR_DUNGEON_WIDGETS_DUNGEON_WORKBENCH_TOOLBAR_H
2#define YAZE_APP_EDITOR_DUNGEON_WIDGETS_DUNGEON_WORKBENCH_TOOLBAR_H
3
4#include <cstddef>
5#include <deque>
6#include <functional>
7
9
10namespace yaze::editor {
11
12class DungeonCanvasViewer;
13
17
18 int* current_room_id = nullptr;
19 int* previous_room_id = nullptr;
20 bool* split_view_enabled = nullptr;
21 int* compare_room_id = nullptr;
22
25
26 std::function<void(int)> on_room_selected;
27 std::function<const std::deque<int>&()> get_recent_rooms;
28 std::function<void(bool)> set_workflow_mode;
29 std::function<void()> open_room_matrix;
30 std::function<void(int)> on_save_room;
31 std::function<void()> on_request_dungeon_map;
32
33 char* compare_search_buf = nullptr;
35};
36
37// Draws the stitched "Workbench" toolbar (room nav + compare + key view
38// toggles). Intended to replace per-canvas header chrome in Workbench mode.
40 public:
41 // Keep adjacency navigation available by default; only hide it when the
42 // stitched toolbar is genuinely too narrow to fit cleanly.
43 static bool ShouldShowInlineRoomNav(float toolbar_width);
44
45 // Returns true when the user requested switching out of Workbench mode.
46 // Caller should apply that mode change after finishing current ImGui scopes.
47 static bool Draw(const DungeonWorkbenchToolbarParams& params);
48};
49
50} // namespace yaze::editor
51
52#endif // YAZE_APP_EDITOR_DUNGEON_WIDGETS_DUNGEON_WORKBENCH_TOOLBAR_H
static bool Draw(const DungeonWorkbenchToolbarParams &params)
static bool ShouldShowInlineRoomNav(float toolbar_width)
Editors are the view controllers for the application.
std::function< const std::deque< int > &()> get_recent_rooms