1#ifndef YAZE_APP_EDITOR_DUNGEON_PANELS_DUNGEON_SETTINGS_PANEL_H
2#define YAZE_APP_EDITOR_DUNGEON_PANELS_DUNGEON_SETTINGS_PANEL_H
17 std::string
GetId()
const override {
return "dungeon.settings"; }
31 void Draw(
bool* p_open)
override {
35 ImGuiTreeNodeFlags_DefaultOpen)) {
38 ImGui::Checkbox(
"Use Dungeon Workbench (single window)",
39 &flags.kUseWorkbench);
40 if (ImGui::IsItemHovered()) {
42 "When enabled, the dungeon editor uses a single stable Workbench "
43 "window instead of opening one panel per room.");
48 if (ImGui::CollapsingHeader(
ICON_MD_SAVE " Save Control",
49 ImGuiTreeNodeFlags_DefaultOpen)) {
53 ImGui::Text(
"Data Types to Save:");
54 ImGui::Checkbox(
"Room Objects", &flags.kSaveObjects);
55 ImGui::Checkbox(
"Sprites", &flags.kSaveSprites);
56 ImGui::Checkbox(
"Room Headers", &flags.kSaveRoomHeaders);
57 ImGui::Checkbox(
"Chests", &flags.kSaveChests);
58 ImGui::Checkbox(
"Pot Items", &flags.kSavePotItems);
59 ImGui::Checkbox(
"Palettes", &flags.kSavePalettes);
60 ImGui::Checkbox(
"Collision Maps", &flags.kSaveCollision);
61 ImGui::Checkbox(
"Water Fill Zones (Oracle)", &flags.kSaveWaterFillZones);
62 ImGui::Checkbox(
"Blocks (Pushable/etc)", &flags.kSaveBlocks);
63 ImGui::Checkbox(
"Torches", &flags.kSaveTorches);
64 ImGui::Checkbox(
"Pits", &flags.kSavePits);
67 if (ImGui::Button(
"Select All")) {
71 if (ImGui::Button(
"Select None")) {
92 ImGuiTreeNodeFlags_DefaultOpen)) {
97 if (ImGui::Checkbox(spec.label, &enabled)) {
102 ImGui::TextDisabled(
"No active room viewer");
108 ImGuiTreeNodeFlags_None)) {
114 ImGui::TextDisabled(
"No active room");
124 flags.kSaveSprites = value;
125 flags.kSaveRoomHeaders = value;
126 flags.kSaveChests = value;
127 flags.kSavePotItems = value;
128 flags.kSavePalettes = value;
129 flags.kSaveCollision = value;
130 flags.kSaveWaterFillZones = value;
131 flags.kSaveBlocks = value;
132 flags.kSaveTorches = value;
133 flags.kSavePits = value;
std::function< void(int)> save_room_callback_
DungeonCanvasViewer * viewer_
void SetSaveRoomCallback(std::function< void(int)> callback)
std::string GetEditorCategory() const override
Editor category this panel belongs to.
void SetSaveAllRoomsCallback(std::function< void()> callback)
void DrawLayerCompositingControls(int room_id)
void Draw(bool *p_open) override
Draw the panel content.
std::function< void()> save_all_rooms_callback_
void SetAllSaveFlags(bool value)
std::string GetIcon() const override
Material Design icon for this panel.
std::string GetDisplayName() const override
Human-readable name shown in menus and title bars.
std::string GetId() const override
Unique identifier for this panel.
void SetCanvasViewer(DungeonCanvasViewer *viewer)
void SetCurrentRoomId(int *room_id)
DungeonSettingsPanel(DungeonCanvasViewer *viewer=nullptr)
Base interface for all logical panel components.
#define ICON_MD_WORKSPACES
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()
struct yaze::core::FeatureFlags::Flags::Dungeon dungeon