13using ImGui::BeginTable;
14using ImGui::TableNextColumn;
20 bool scratch_has_data,
Rom* rom,
22 if (!overworld || !overworld->
is_loaded() || !panel_manager)
return;
25 if (BeginTable(
"CanvasToolbar", 8,
26 ImGuiTableFlags_Borders | ImGuiTableFlags_SizingFixedFit,
28 ImGui::TableSetupColumn(
"World", ImGuiTableColumnFlags_WidthFixed,
30 ImGui::TableSetupColumn(
"Map", ImGuiTableColumnFlags_WidthFixed,
32 ImGui::TableSetupColumn(
"Area Size", ImGuiTableColumnFlags_WidthFixed,
34 ImGui::TableSetupColumn(
"Lock", ImGuiTableColumnFlags_WidthFixed,
36 ImGui::TableSetupColumn(
"Mode", ImGuiTableColumnFlags_WidthFixed,
38 ImGui::TableSetupColumn(
"Entity",
39 ImGuiTableColumnFlags_WidthStretch);
40 ImGui::TableSetupColumn(
"Panels", ImGuiTableColumnFlags_WidthFixed, 320.0f);
41 ImGui::TableSetupColumn(
"Sidebar", ImGuiTableColumnFlags_WidthFixed, 50.0f);
45 ImGui::Combo(
"##world", ¤t_world,
kWorldNames, 3);
48 ImGui::Text(
"%d (0x%02X)", current_map, current_map);
55 int current_area_size =
56 static_cast<int>(overworld->
overworld_map(current_map)->area_size());
61 if (ImGui::Combo(
"##AreaSize", ¤t_area_size,
kAreaSizeNames, 4)) {
71 const char* limited_names[] = {
"Small (1x1)",
"Large (2x2)"};
72 int limited_size = (current_area_size == 0 || current_area_size == 1)
76 if (ImGui::Combo(
"##AreaSize", &limited_size, limited_names, 2)) {
89 HOVER_HINT(
"Small (1x1) and Large (2x2) maps. Wide/Tall require v3+");
95 current_map_lock ?
"Unlock Map" :
"Lock Map")) {
96 current_map_lock = !current_map_lock;
103 "Mouse Mode (1)\nNavigate, pan, and manage entities",
108 ImGui::SameLine(0, 2);
110 "Brush Mode (2/B)\nDraw tiles on the map\nRight-click or I to sample tile16 under cursor",
115 ImGui::SameLine(0, 2);
117 "Fill Screen Mode (F)\nFill the 32x32 screen under the cursor with the selected tile\nRight-click or I to sample tile16 under cursor",
127 const char* entity_icon =
"";
128 const char* entity_label =
"";
129 switch (entity_edit_mode) {
132 entity_label =
"Entrances";
136 entity_label =
"Exits";
140 entity_label =
"Items";
144 entity_label =
"Sprites";
148 entity_label =
"Transports";
152 entity_label =
"Music";
157 ImGui::TextColored(theme.selection_secondary,
"%s %s", entity_icon,
161 const char* version_label =
"Vanilla";
162 ImVec4 version_color = theme.status_inactive;
163 bool show_upgrade =
false;
165 switch (rom_version) {
167 version_label =
"Vanilla";
168 version_color = theme.text_warning_yellow;
172 version_label =
"ZSC v1";
173 version_color = theme.status_active;
176 version_label =
"ZSC v2";
177 version_color = theme.status_active;
180 version_label =
"ZSC v3";
181 version_color = theme.status_success;
187 ImGui::TextColored(version_color,
ICON_MD_INFO " %s", version_label);
188 HOVER_HINT(
"ROM version determines available overworld features.\n"
189 "v2+: Custom BG colors, main palettes\n"
190 "v3+: Wide/Tall maps, custom tile GFX, animated GFX");
197 HOVER_HINT(
"Upgrade ROM to ZSCustomOverworld v3\n"
198 "Enables all advanced features");
The Rom class is used to load, save, and modify Rom data. This is a generic SNES ROM container and do...
Central registry for all editor cards with session awareness and dependency injection.
bool TogglePanel(size_t session_id, const std::string &base_card_id)
bool IsPanelVisible(size_t session_id, const std::string &base_card_id) const
RAII guard for ImGui style vars.
static OverworldVersion GetVersion(const Rom &rom)
Detect ROM version from ASM marker byte.
static bool SupportsAreaEnum(OverworldVersion version)
Check if ROM supports area enum system (v3+ only)
Represents the full Overworld data, light and dark world.
auto overworld_map(int i) const
absl::Status ConfigureMultiAreaMap(int parent_index, AreaSizeEnum size)
Configure a multi-area map structure (Large/Wide/Tall)
#define ICON_MD_GRID_VIEW
#define ICON_MD_LOCK_OPEN
#define ICON_MD_FORMAT_COLOR_FILL
#define ICON_MD_DOOR_BACK
#define ICON_MD_AUTO_FIX_HIGH
#define ICON_MD_MUSIC_NOTE
#define ICON_MD_DOOR_FRONT
#define ICON_MD_ADD_LOCATION
#define ICON_MD_PEST_CONTROL_RODENT
#define ICON_MD_ANALYTICS
#define HOVER_HINT(string)
const AgentUITheme & GetTheme()
Editors are the view controllers for the application.
constexpr const char * kAreaSizeNames[]
constexpr float kTableColumnWorld
constexpr const char * kWorldNames[]
constexpr float kComboWorldWidth
constexpr float kTableColumnMap
constexpr float kTableColumnAreaSize
constexpr float kComboAreaSizeWidth
constexpr float kTableColumnLock
bool PrimaryButton(const char *label, const ImVec2 &size, const char *panel_id, const char *anim_id)
Draw a primary action button (accented color).
bool ToolbarIconButton(const char *icon, const char *tooltip, bool is_active)
Convenience wrapper for toolbar-sized icon buttons.
AreaSizeEnum
Area size enumeration for v3+ ROMs.
@ kZSCustomV2
Parent system, BG colors, main palettes.
@ kZSCustomV1
Basic features, expanded pointers.
@ kVanilla
0xFF in ROM, no ZScream ASM applied
@ kZSCustomV3
Area enum, wide/tall areas, all features.
static constexpr const char * kMapProperties
static constexpr const char * kTile8Selector
static constexpr const char * kAreaGraphics
static constexpr const char * kScratchSpace
static constexpr const char * kTile16Editor
static constexpr const char * kTile16Selector
static constexpr const char * kGfxGroups
static constexpr const char * kUsageStats