yaze 0.3.2
Link to the Past ROM Editor
 
Loading...
Searching...
No Matches
dungeon_overlay_controls.cc
Go to the documentation of this file.
2
3#include <array>
4#include <stdexcept>
5
6namespace yaze::editor {
7
8namespace {
9
10constexpr std::array<DungeonOverlayControlSpec, 11> kOverlaySpecs = {{
11 {DungeonOverlayControlId::kGrid, "Grid (8x8)"},
13 {DungeonOverlayControlId::kHoverCoordinates, "Hover Coordinates"},
17 {DungeonOverlayControlId::kWaterFillOracle, "Water Fill (Oracle)"},
21 {DungeonOverlayControlId::kCustomObjects, "Custom Objects (Oracle)"},
22}};
23
24} // namespace
25
26const std::array<DungeonOverlayControlSpec, 11>&
28 return kOverlaySpecs;
29}
30
60
62 DungeonOverlayControlId id, bool enabled) {
63 switch (id) {
65 viewer.set_show_grid(enabled);
66 return;
68 viewer.set_show_object_bounds(enabled);
69 return;
71 viewer.set_show_coordinate_overlay(enabled);
72 return;
75 return;
78 return;
81 return;
83 viewer.set_show_water_fill_overlay(enabled);
84 return;
87 return;
89 viewer.set_show_track_gap_overlay(enabled);
90 return;
92 viewer.set_show_track_route_overlay(enabled);
93 return;
95 viewer.set_show_custom_objects_overlay(enabled);
96 return;
97 }
98
99 throw std::invalid_argument("unknown DungeonOverlayControlId");
100}
101
102} // namespace yaze::editor
constexpr std::array< DungeonOverlayControlSpec, 11 > kOverlaySpecs
Editors are the view controllers for the application.
void SetDungeonOverlayControlEnabled(DungeonCanvasViewer &viewer, DungeonOverlayControlId id, bool enabled)
bool GetDungeonOverlayControlEnabled(const DungeonCanvasViewer &viewer, DungeonOverlayControlId id)
const std::array< DungeonOverlayControlSpec, 11 > & GetDungeonOverlayControlSpecs()