7#include "imgui/imgui.h"
32const std::array<DungeonOverlayControlSpec, 13>&
38 return ImGui::CalcTextSize(
"BG1").x + ImGui::CalcTextSize(
"BG2").x +
39 ImGui::CalcTextSize(tr(
"Sprites")).x + ImGui::GetFrameHeight() * 3.0f +
40 ImGui::GetStyle().ItemInnerSpacing.x * 3.0f +
41 ImGui::GetStyle().ItemSpacing.x * 2.0f;
49 ImGui::PushID(
"DungeonLayers");
51 const auto toggle = [&](
const char* label,
bool* enabled,
52 const char* tooltip) {
53 const bool changed = ImGui::Checkbox(label, enabled);
55 if (ImGui::IsItemHovered())
56 ImGui::SetTooltip(
"%s", tooltip);
60 if (toggle(
"BG1", &bg1,
"Show BG1"))
64 if (toggle(
"BG2", &bg2,
"Show BG2"))
68 if (toggle(tr(
"Sprites"), &sprites,
"Show room sprites"))
77 ImGui::SeparatorText(tr(
"Authoring"));
79 if (ImGui::Checkbox(tr(spec.label), &enabled))
84 if (ImGui::Checkbox(tr(
"Pot items"), &pots))
119 throw std::invalid_argument(
"unknown DungeonOverlayControlId");
166 throw std::invalid_argument(
"unknown DungeonOverlayControlId");
bool show_object_bounds() const
void set_show_crumble_floor(bool show)
bool AreSpritesVisible() const
void set_show_water_fill_overlay(bool show)
bool IsBG1Visible(int room_id) const
void set_show_custom_collision_overlay(bool show)
void SetSpritesVisible(bool visible)
void set_show_track_route_overlay(bool show)
bool show_track_gap_overlay() const
void set_show_custom_objects_overlay(bool show)
bool show_custom_objects_overlay() const
void set_show_track_collision_overlay(bool show)
void set_show_minecart_sprite_overlay(bool show)
bool show_coordinate_overlay() const
bool show_track_collision_overlay() const
void SetChestContentsVisible(bool visible)
void SetBG1Visible(int room_id, bool visible)
void SetBG2Visible(int room_id, bool visible)
bool show_minecart_sprite_overlay() const
bool show_water_fill_overlay() const
bool show_camera_quadrant_overlay() const
void set_show_object_bounds(bool show)
void set_show_coordinate_overlay(bool show)
bool AreChestContentsVisible() const
bool IsBG2Visible(int room_id) const
bool show_track_route_overlay() const
void set_show_track_gap_overlay(bool show)
void set_show_camera_quadrant_overlay(bool show)
bool ArePotItemsVisible() const
void SetPotItemsVisible(bool visible)
bool show_custom_collision_overlay() const
bool show_crumble_floor() const
void set_show_grid(bool show)
constexpr std::array< DungeonOverlayControlSpec, 13 > kOverlaySpecs
Editors are the view controllers for the application.
void DrawDungeonOverlayControls(DungeonCanvasViewer &viewer)
void SetDungeonOverlayControlEnabled(DungeonCanvasViewer &viewer, DungeonOverlayControlId id, bool enabled)
bool GetDungeonOverlayControlEnabled(const DungeonCanvasViewer &viewer, DungeonOverlayControlId id)
void DrawDungeonLayerControls(DungeonCanvasViewer &viewer, int room_id, float height)
float DungeonLayerControlsWidth()
const std::array< DungeonOverlayControlSpec, 13 > & GetDungeonOverlayControlSpecs()
void AutoRegisterLastItem(const std::string &widget_type, const std::string &explicit_label, const std::string &description)
Automatically register the last ImGui item.
constexpr int kNumberOfRooms