yaze 0.3.2
Link to the Past ROM Editor
 
Loading...
Searching...
No Matches
layout_presets.cc
Go to the documentation of this file.
2
3#include "core/features.h"
4
5namespace yaze {
6namespace editor {
7
10 preset.editor_type = type;
11
12 switch (type) {
14 preset.name = "Overworld Default";
15 preset.description =
16 "Canvas-first layout with tile selectors and map properties";
17 preset.default_visible_panels = {
24 };
25 preset.panel_positions = {
36 };
37 preset.optional_panels = {
44 };
45 break;
46
48 preset.name = "Dungeon Default";
49 preset.description = "Room workbench with inspector and fast navigation";
50
51 if (core::FeatureFlags::get().dungeon.kUseWorkbench) {
52 preset.default_visible_panels = {
59 };
60
61 // Place optional panels around the workbench so they dock predictably
62 // if/when the user opens them.
63 preset.panel_positions = {
72 };
73
74 preset.optional_panels = {
82 };
83 } else {
84 preset.default_visible_panels = {
90 };
91 preset.panel_positions = {
99 };
100 preset.optional_panels = {
106 };
107 }
108 break;
109
111 preset.name = "Graphics Default";
112 preset.description = "Sheet browser with pixel editor";
113 preset.default_visible_panels = {
116 };
117 preset.panel_positions = {
124 };
125 preset.optional_panels = {
130 };
131 break;
132
134 preset.name = "Palette Default";
135 preset.description = "Palette groups with editor and preview";
136 preset.default_visible_panels = {
139 };
140 preset.panel_positions = {
145 };
146 preset.optional_panels = {
156 };
157 break;
158
160 preset.name = "Sprite Default";
161 preset.description = "Sprite browser with editor";
162 preset.default_visible_panels = {
164 };
165 preset.panel_positions = {
168 };
169 preset.optional_panels = {
171 };
172 break;
173
175 preset.name = "Screen Default";
176 preset.description = "Screen browser with tileset editor";
177 preset.default_visible_panels = {
179 };
180 preset.panel_positions = {
185 };
186 preset.optional_panels = {
191 };
192 break;
193
195 preset.name = "Music Default";
196 preset.description = "Song browser with playback control and piano roll";
197 preset.default_visible_panels = {
201 };
202 preset.panel_positions = {
209 };
210 preset.optional_panels = {
214 };
215 break;
216
218 preset.name = "Message Default";
219 preset.description = "Message list with editor and preview";
220 preset.default_visible_panels = {
223 };
224 preset.panel_positions = {
229 };
230 preset.optional_panels = {
233 };
234 break;
235
237 preset.name = "Assembly Default";
238 preset.description = "Assembly editor with file browser";
239 preset.default_visible_panels = {
241 };
242 preset.panel_positions = {
245 };
246 preset.optional_panels = {
248 };
249 break;
250
252 preset.name = "Emulator Default";
253 preset.description = "Emulator with debugger tools";
254 preset.default_visible_panels = {
256 };
257 preset.panel_positions = {
266 };
267 preset.optional_panels = {
278 };
279 break;
280
281 case EditorType::kHex:
282 preset.name = "Memory Default";
283 preset.description = "Hex editor and memory inspection";
284 preset.default_visible_panels = {
286 };
287 preset.panel_positions = {
289 };
290 break;
291
293 preset.name = "Agent";
294 preset.description = "AI Agent Configuration and Chat";
295 preset.default_visible_panels = {
296 "agent.configuration",
297 "agent.status",
298 "agent.chat",
299 };
300 preset.panel_positions = {
301 {"agent.chat", DockPosition::Center},
302 {"agent.configuration", DockPosition::Right},
303 {"agent.status", DockPosition::Bottom},
304 };
305 preset.optional_panels = {
306 "agent.prompt_editor",
307 "agent.profiles",
308 "agent.history",
309 "agent.metrics",
310 "agent.builder",
311 "agent.knowledge"};
312 break;
313
314 default:
315 preset.name = "Default";
316 preset.description = "No specific layout";
317 break;
318 }
319
320 return preset;
321}
322
341
342std::vector<std::string> LayoutPresets::GetDefaultPanels(EditorType type) {
344}
345
346std::vector<std::string> LayoutPresets::GetAllPanelsForEditor(EditorType type) {
347 auto preset = GetDefaultPreset(type);
348 std::vector<std::string> all_panels = preset.default_visible_panels;
349 all_panels.insert(all_panels.end(), preset.optional_panels.begin(),
350 preset.optional_panels.end());
351 return all_panels;
352}
353
354bool LayoutPresets::IsDefaultPanel(EditorType type, const std::string& panel_id) {
355 auto default_panels = GetDefaultPanels(type);
356 return std::find(default_panels.begin(), default_panels.end(), panel_id) !=
357 default_panels.end();
358}
359
360// ============================================================================
361// Named Workspace Presets
362// ============================================================================
363
365 PanelLayoutPreset preset;
366 preset.name = "Minimal";
367 preset.description = "Essential cards only for focused editing";
368 preset.editor_type = EditorType::kUnknown; // Applies to all
369 // Core editing cards across editors
370 preset.default_visible_panels = {
381 };
382 return preset;
383}
384
386 PanelLayoutPreset preset;
387 preset.name = "Developer";
388 preset.description = "Debug and development focused layout";
389 preset.editor_type = EditorType::kUnknown; // Applies to all
390 preset.default_visible_panels = {
391 // Emulator/debug cards
399 // Assembly editing
402 // AI Agent for debugging assistance
404 };
405 return preset;
406}
407
437
439 PanelLayoutPreset preset;
440 preset.name = "Modder";
441 preset.description = "Full-featured layout for comprehensive editing";
442 preset.editor_type = EditorType::kUnknown; // Applies to all
443 preset.default_visible_panels = {
444 // Overworld cards
450 // Dungeon cards
457 // Graphics cards
460 // Palette cards
463 // Sprite cards
465 // Message editing
468 // AI Agent for assistance
470 };
471 return preset;
472}
473
475 PanelLayoutPreset preset;
476 preset.name = "Overworld Artist";
477 preset.description = "Complete overworld editing toolkit";
479 preset.default_visible_panels = {
480 // All overworld cards
491 // Palette support
495 // Graphics for tile editing
497 };
498 preset.panel_positions = {
512 };
513 return preset;
514}
515
519
521 PanelLayoutPreset preset;
522 preset.name = "Dungeon Master";
523 preset.description = "Complete dungeon editing toolkit";
525 preset.default_visible_panels = {
526 // All dungeon cards
534 // Palette support
537 // Graphics for room editing
541 };
542 preset.panel_positions = {
555 };
556 return preset;
557}
558
562
564 PanelLayoutPreset preset;
565 preset.name = "Logic Debugger";
566 preset.description = "Quality assurance and ROM testing layout";
568 preset.default_visible_panels = {
569 // Emulator core
574 // Debug tools
578 // Memory inspection
580 // AI Agent for test assistance
582 };
583 return preset;
584}
585
589
622
626
627} // namespace editor
628} // namespace yaze
static Flags & get()
Definition features.h:118
static std::vector< std::string > GetDefaultPanels(EditorType type)
Get default visible panels for an editor.
static PanelLayoutPreset GetLogicDebuggerPreset()
Get the "logic debugger" workspace preset (QA and debug focused)
static PanelLayoutPreset GetDungeonExpertPreset()
Legacy alias for GetDungeonMasterPreset()
static PanelLayoutPreset GetTestingPreset()
Legacy alias for GetLogicDebuggerPreset()
static PanelLayoutPreset GetDungeonMasterPreset()
Get the "dungeon master" workspace preset.
static PanelLayoutPreset GetAudioEngineerPreset()
Get the "audio engineer" workspace preset (music focused)
static std::vector< std::string > GetAllPanelsForEditor(EditorType type)
Get all available panels for an editor (visible + hidden)
static PanelLayoutPreset GetDesignerPreset()
Get the "designer" workspace preset (visual-focused)
static bool IsDefaultPanel(EditorType type, const std::string &panel_id)
Check if a panel should be visible by default.
static PanelLayoutPreset GetAudioPreset()
Legacy alias for GetAudioEngineerPreset()
static PanelLayoutPreset GetOverworldArtistPreset()
Get the "overworld artist" workspace preset.
static PanelLayoutPreset GetDefaultPreset(EditorType type)
Get the default layout preset for an editor type.
static PanelLayoutPreset GetModderPreset()
Get the "modder" workspace preset (full-featured)
static PanelLayoutPreset GetOverworldExpertPreset()
Legacy alias for GetOverworldArtistPreset()
static PanelLayoutPreset GetMinimalPreset()
Get the "minimal" workspace preset (minimal cards)
static PanelLayoutPreset GetDeveloperPreset()
Get the "developer" workspace preset (debug-focused)
static std::unordered_map< EditorType, PanelLayoutPreset > GetAllPresets()
Get all available presets.
static constexpr const char * kMusicSampleEditor
static constexpr const char * kMusicInstrumentEditor
static constexpr const char * kPaletteQuickAccess
static constexpr const char * kMusicPlaybackControl
static constexpr const char * kOverworldTile8Selector
static constexpr const char * kGraphicsPalettesetEditor
static constexpr const char * kPaletteControlPanel
static constexpr const char * kOverworldTile16Editor
static constexpr const char * kScreenOverworldMap
static constexpr const char * kEmulatorSaveStates
static constexpr const char * kEmulatorAiAgent
static constexpr const char * kEmulatorPerformance
static constexpr const char * kPaletteOwMain
static constexpr const char * kMessageList
static constexpr const char * kGraphicsPlayerAnimations
static constexpr const char * kMusicSongBrowser
static constexpr const char * kPaletteSpritesAux2
static constexpr const char * kMusicPianoRoll
static constexpr const char * kDungeonRoomGraphics
static constexpr const char * kEmulatorAudioMixer
static constexpr const char * kDungeonWorkbench
static constexpr const char * kOverworldCanvas
static constexpr const char * kOverworldV3Settings
static constexpr const char * kAssemblyEditor
static constexpr const char * kEmulatorKeyboardConfig
static constexpr const char * kDungeonEntrances
static constexpr const char * kDungeonObjectEditor
static constexpr const char * kMemoryHexEditor
static constexpr const char * kEmulatorVirtualController
static constexpr const char * kGraphicsSheetBrowser
static constexpr const char * kPaletteEquipment
static constexpr const char * kDungeonRoomMatrix
static constexpr const char * kScreenNamingScreen
static constexpr const char * kGraphicsPaletteControls
static constexpr const char * kPaletteSprites
static constexpr const char * kScreenDungeonMaps
static constexpr const char * kSpriteVanillaEditor
static constexpr const char * kPaletteSpritesAux3
static constexpr const char * kPaletteSpritesAux1
static constexpr const char * kDungeonRoomSelector
static constexpr const char * kAssemblyFileBrowser
static constexpr const char * kPaletteOwAnimated
static constexpr const char * kGraphicsSheetEditor
static constexpr const char * kOverworldAreaGraphics
static constexpr const char * kDungeonPaletteEditor
static constexpr const char * kOverworldUsageStats
static constexpr const char * kMessageFontAtlas
static constexpr const char * kOverworldTile16Selector
static constexpr const char * kMusicAssembly
static constexpr const char * kEmulatorApuDebugger
static constexpr const char * kEmulatorPpuViewer
static constexpr const char * kOverworldScratch
static constexpr const char * kDungeonEntranceList
static constexpr const char * kScreenInventoryMenu
static constexpr const char * kSpriteCustomEditor
static constexpr const char * kPaletteDungeonMain
static constexpr const char * kGraphicsGfxGroupEditor
static constexpr const char * kMessageDictionary
static constexpr const char * kOverworldMapProperties
static constexpr const char * kEmulatorBreakpoints
static constexpr const char * kPaletteCustom
static constexpr const char * kOverworldGfxGroups
static constexpr const char * kEmulatorMemoryViewer
static constexpr const char * kScreenTitleScreen
static constexpr const char * kEmulatorCpuDebugger
static constexpr const char * kMessageEditor
Defines default panel visibility for an editor type.
std::vector< std::string > optional_panels
std::unordered_map< std::string, DockPosition > panel_positions
std::vector< std::string > default_visible_panels