Refactor FlagsMenu to core namespace; remove redundant flags.h file and update references in editor files

This commit is contained in:
scawful
2025-01-26 13:20:29 -05:00
parent 9a11c970ae
commit 1bc0f07a7e
4 changed files with 64 additions and 79 deletions

View File

@@ -3,6 +3,8 @@
#include <string>
#include "imgui/imgui.h"
namespace yaze {
namespace core {
@@ -100,6 +102,51 @@ class FeatureFlags {
}
};
using ImGui::BeginMenu;
using ImGui::Checkbox;
using ImGui::EndMenu;
using ImGui::MenuItem;
using ImGui::Separator;
struct FlagsMenu {
void DrawOverworldFlags() {
Checkbox("Enable Overworld Sprites",
&FeatureFlags::get().overworld.kDrawOverworldSprites);
Separator();
Checkbox("Save Overworld Maps",
&FeatureFlags::get().overworld.kSaveOverworldMaps);
Checkbox("Save Overworld Entrances",
&FeatureFlags::get().overworld.kSaveOverworldEntrances);
Checkbox("Save Overworld Exits",
&FeatureFlags::get().overworld.kSaveOverworldExits);
Checkbox("Save Overworld Items",
&FeatureFlags::get().overworld.kSaveOverworldItems);
Checkbox("Save Overworld Properties",
&FeatureFlags::get().overworld.kSaveOverworldProperties);
Checkbox("Load Custom Overworld",
&FeatureFlags::get().overworld.kLoadCustomOverworld);
}
void DrawDungeonFlags() {
Checkbox("Draw Dungeon Room Graphics",
&FeatureFlags::get().kDrawDungeonRoomGraphics);
Separator();
Checkbox("Save Dungeon Maps", &FeatureFlags::get().kSaveDungeonMaps);
}
void DrawResourceFlags() {
Checkbox("Save All Palettes", &FeatureFlags::get().kSaveAllPalettes);
Checkbox("Save Gfx Groups", &FeatureFlags::get().kSaveGfxGroups);
Checkbox("Save Graphics Sheets", &FeatureFlags::get().kSaveGraphicsSheet);
}
void DrawSystemFlags() {
Checkbox("Enable Console Logging", &FeatureFlags::get().kLogToConsole);
Checkbox("Log Instructions to Emulator Debugger",
&FeatureFlags::get().kLogInstructions);
}
};
} // namespace core
} // namespace yaze