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
16
17 int* current_room_id = nullptr;
18 int* previous_room_id = nullptr;
19 bool* split_view_enabled = nullptr;
20 int* compare_room_id = nullptr;
21
24
25 std::function<void(int)> on_room_selected;
26 std::function<const std::deque<int>&()> get_recent_rooms;
27 std::function<void(int)> on_open_room_panel;
28 std::function<void(int)> forget_recent_room;
29 std::function<void(bool)> set_workflow_mode;
30 std::function<void(int)> on_save_room;
31 std::function<void()> on_request_dungeon_map;
32 std::function<void(float)> draw_entrance_context;
33 std::function<void()> draw_tools;
34 std::function<void()> draw_save_content;
35 std::function<void()> draw_layout_options;
36
37 char* compare_search_buf = nullptr;
39};
40
41// Draws the stitched "Workbench" toolbar (room nav + compare + key view
42// toggles). Intended to replace per-canvas header chrome in Workbench mode.
44 public:
45 // Keep adjacency navigation available by default; only hide it when the
46 // stitched toolbar is genuinely too narrow to fit cleanly.
47 static bool ShouldShowInlineRoomNav(float toolbar_width);
48
49 // Returns true when the user requested switching out of Workbench mode.
50 // Caller should apply that mode change after finishing current ImGui scopes.
51 static bool Draw(const DungeonWorkbenchToolbarParams& params);
52};
53
54} // namespace yaze::editor
55
56#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