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
3namespace yaze {
4namespace editor {
5
8 preset.editor_type = type;
9
10 switch (type) {
12 preset.name = "Overworld Default";
13 preset.description = "Main canvas with tile16 editor";
14 preset.default_visible_panels = {
17 };
18 preset.panel_positions = {
24 };
25 preset.optional_panels = {
32 };
33 break;
34
36 preset.name = "Dungeon Default";
37 preset.description = "Room editor with object palette and properties";
38 preset.default_visible_panels = {
41 };
42 preset.panel_positions = {
43 {Panels::kDungeonControlPanel, DockPosition::Center}, // Controls implies canvas usually
49 };
50 preset.optional_panels = {
57 };
58 break;
59
61 preset.name = "Graphics Default";
62 preset.description = "Sheet browser with editor";
63 preset.default_visible_panels = {
66 };
67 preset.panel_positions = {
72 };
73 preset.optional_panels = {
76 };
77 break;
78
80 preset.name = "Palette Default";
81 preset.description = "Palette groups with editor and preview";
82 preset.default_visible_panels = {
85 };
86 preset.panel_positions = {
90 };
91 preset.optional_panels = {
101 };
102 break;
103
105 preset.name = "Sprite Default";
106 preset.description = "Sprite browser with editor";
107 preset.default_visible_panels = {
109 };
110 preset.panel_positions = {
113 };
114 preset.optional_panels = {
116 };
117 break;
118
120 preset.name = "Screen Default";
121 preset.description = "Screen browser with tileset editor";
122 preset.default_visible_panels = {
124 };
125 preset.panel_positions = {
130 };
131 preset.optional_panels = {
136 };
137 break;
138
140 preset.name = "Music Default";
141 preset.description = "Song browser with playback control and piano roll";
142 preset.default_visible_panels = {
146 };
147 preset.panel_positions = {
154 };
155 preset.optional_panels = {
159 };
160 break;
161
163 preset.name = "Message Default";
164 preset.description = "Message list with editor and preview";
165 preset.default_visible_panels = {
168 };
169 preset.panel_positions = {
174 };
175 preset.optional_panels = {
178 };
179 break;
180
182 preset.name = "Assembly Default";
183 preset.description = "Assembly editor with file browser";
184 preset.default_visible_panels = {
186 };
187 preset.panel_positions = {
190 };
191 preset.optional_panels = {
193 };
194 break;
195
197 preset.name = "Emulator Default";
198 preset.description = "Emulator with debugger tools";
199 preset.default_visible_panels = {
201 };
202 preset.panel_positions = {
207 };
208 preset.optional_panels = {
218 };
219 break;
220
222 preset.name = "Agent";
223 preset.description = "AI Agent Configuration and Chat";
224 preset.default_visible_panels = {
225 "agent.configuration",
226 "agent.status",
227 "agent.chat",
228 };
229 preset.optional_panels = {
230 "agent.prompt_editor",
231 "agent.profiles",
232 "agent.history",
233 "agent.metrics",
234 "agent.builder"};
235 break;
236
237 default:
238 preset.name = "Default";
239 preset.description = "No specific layout";
240 break;
241 }
242
243 return preset;
244}
245
263
264std::vector<std::string> LayoutPresets::GetDefaultPanels(EditorType type) {
265 return GetDefaultPreset(type).default_visible_panels;
266}
267
268std::vector<std::string> LayoutPresets::GetAllPanelsForEditor(EditorType type) {
269 auto preset = GetDefaultPreset(type);
270 std::vector<std::string> all_panels = preset.default_visible_panels;
271 all_panels.insert(all_panels.end(), preset.optional_panels.begin(),
272 preset.optional_panels.end());
273 return all_panels;
274}
275
276bool LayoutPresets::IsDefaultPanel(EditorType type, const std::string& panel_id) {
277 auto default_panels = GetDefaultPanels(type);
278 return std::find(default_panels.begin(), default_panels.end(), panel_id) !=
279 default_panels.end();
280}
281
282// ============================================================================
283// Named Workspace Presets
284// ============================================================================
285
287 PanelLayoutPreset preset;
288 preset.name = "Minimal";
289 preset.description = "Essential cards only for focused editing";
290 preset.editor_type = EditorType::kUnknown; // Applies to all
291 // Core editing cards across editors
292 preset.default_visible_panels = {
303 };
304 return preset;
305}
306
308 PanelLayoutPreset preset;
309 preset.name = "Developer";
310 preset.description = "Debug and development focused layout";
311 preset.editor_type = EditorType::kUnknown; // Applies to all
312 preset.default_visible_panels = {
313 // Emulator/debug cards
321 // Assembly editing
324 // Dungeon debug controls
326 // AI Agent for debugging assistance
328 };
329 return preset;
330}
331
333 PanelLayoutPreset preset;
334 preset.name = "Designer";
335 preset.description = "Visual and artistic focused layout";
336 preset.editor_type = EditorType::kUnknown; // Applies to all
337 preset.default_visible_panels = {
338 // Graphics cards
343 // Palette cards
350 // Sprite cards
353 // Screen editing for menus/title
356 };
357 return preset;
358}
359
361 PanelLayoutPreset preset;
362 preset.name = "Modder";
363 preset.description = "Full-featured layout for comprehensive editing";
364 preset.editor_type = EditorType::kUnknown; // Applies to all
365 preset.default_visible_panels = {
366 // Overworld cards
372 // Dungeon cards
378 // Graphics cards
381 // Palette cards
384 // Sprite cards
386 // Message editing
389 // AI Agent for assistance
391 };
392 return preset;
393}
394
396 PanelLayoutPreset preset;
397 preset.name = "Overworld Expert";
398 preset.description = "Complete overworld editing toolkit";
399 preset.editor_type = EditorType::kOverworld;
400 preset.default_visible_panels = {
401 // All overworld cards
410 // Palette support
414 // Graphics for tile editing
417 };
418 return preset;
419}
420
422 PanelLayoutPreset preset;
423 preset.name = "Dungeon Expert";
424 preset.description = "Complete dungeon editing toolkit";
425 preset.editor_type = EditorType::kDungeon;
426 preset.default_visible_panels = {
427 // All dungeon cards
436 // Palette support
439 // Graphics for room editing
442 // Screen maps for dungeon navigation
444 };
445 return preset;
446}
447
449 PanelLayoutPreset preset;
450 preset.name = "Testing";
451 preset.description = "Quality assurance and ROM testing layout";
452 preset.editor_type = EditorType::kEmulator;
453 preset.default_visible_panels = {
454 // Emulator core
459 // Debug tools
463 // Memory inspection
465 // AI Agent for test assistance
467 };
468 return preset;
469}
470
503
504} // namespace editor
505} // namespace yaze
506
static std::vector< std::string > GetDefaultPanels(EditorType type)
Get default visible panels for an editor.
PanelLayoutPreset PanelLayoutPreset
static PanelLayoutPreset GetDungeonExpertPreset()
Get the "dungeon expert" workspace preset.
static PanelLayoutPreset GetTestingPreset()
Get the "testing" workspace preset (QA 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()
Get the "audio" workspace preset (music focused)
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()
Get the "overworld expert" workspace preset.
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 * kPaletteControlPanel
static constexpr const char * kScreenOverworldMap
static constexpr const char * kEmulatorSaveStates
static constexpr const char * kEmulatorAiAgent
static constexpr const char * kEmulatorPerformance
static constexpr const char * kDungeonControlPanel
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 * 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 * kGraphicsSheetBrowser
static constexpr const char * kPaletteEquipment
static constexpr const char * kDungeonRoomMatrix
static constexpr const char * kScreenNamingScreen
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 * kGraphicsPrototypeViewer
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 * kDungeonDebugControls
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 * kScreenInventoryMenu
static constexpr const char * kSpriteCustomEditor
static constexpr const char * kPaletteDungeonMain
static constexpr const char * kMessageDictionary
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