yaze 0.3.2
Link to the Past ROM Editor
 
Loading...
Searching...
No Matches
popup_manager.cc
Go to the documentation of this file.
1#include "popup_manager.h"
2
3#include "absl/strings/str_format.h"
8#include "util/hex.h"
9#include "imgui/misc/cpp/imgui_stdlib.h"
10
11namespace yaze {
12namespace editor {
13
14using namespace ImGui;
15
17 : editor_manager_(editor_manager), status_(absl::OkStatus()) {}
18
20 // ============================================================================
21 // POPUP REGISTRATION
22 // ============================================================================
23 // All popups must be registered here BEFORE any menu callbacks can trigger them.
24 // This method is called in EditorManager constructor BEFORE MenuOrchestrator
25 // and UICoordinator are created, ensuring safe initialization order.
26 //
27 // Popup Registration Format:
28 // popups_[PopupID::kConstant] = {
29 // .name = PopupID::kConstant,
30 // .type = PopupType::kXxx,
31 // .is_visible = false,
32 // .allow_resize = false/true,
33 // .draw_function = [this]() { DrawXxxPopup(); }
34 // };
35 // ============================================================================
36
37 // File Operations
40 [this]() { DrawSaveAsPopup(); }
41 };
44 [this]() { DrawNewProjectPopup(); }
45 };
48 [this]() { DrawManageProjectPopup(); }
49 };
50
51 // Information
53 PopupID::kAbout, PopupType::kInfo, false, false,
54 [this]() { DrawAboutPopup(); }
55 };
58 [this]() { DrawRomInfoPopup(); }
59 };
62 [this]() { DrawSupportedFeaturesPopup(); }
63 };
66 [this]() { DrawOpenRomHelpPopup(); }
67 };
68
69 // Help Documentation
72 [this]() { DrawGettingStartedPopup(); }
73 };
76 [this]() { DrawAsarIntegrationPopup(); }
77 };
80 [this]() { DrawBuildInstructionsPopup(); }
81 };
84 [this]() { DrawCLIUsagePopup(); }
85 };
88 [this]() { DrawTroubleshootingPopup(); }
89 };
92 [this]() { DrawContributingPopup(); }
93 };
96 [this]() { DrawWhatsNewPopup(); }
97 };
98
99 // Settings
101 PopupID::kDisplaySettings, PopupType::kSettings, false, true, // Resizable
102 [this]() { DrawDisplaySettingsPopup(); }
103 };
105 PopupID::kFeatureFlags, PopupType::kSettings, false, true, // Resizable
106 [this]() { DrawFeatureFlagsPopup(); }
107 };
108
109 // Workspace
112 [this]() { DrawWorkspaceHelpPopup(); }
113 };
116 [this]() { DrawSessionLimitWarningPopup(); }
117 };
120 [this]() { DrawLayoutResetConfirmPopup(); }
121 };
122
123 // Debug/Testing
125 PopupID::kDataIntegrity, PopupType::kInfo, false, true, // Resizable
126 [this]() { DrawDataIntegrityPopup(); }
127 };
128}
129
131 // Draw status popup if needed
133
134 // Draw all registered popups
135 for (auto& [name, params] : popups_) {
136 if (params.is_visible) {
137 OpenPopup(name.c_str());
138
139 // Use allow_resize flag from popup definition
140 ImGuiWindowFlags popup_flags = params.allow_resize ?
141 ImGuiWindowFlags_None : ImGuiWindowFlags_AlwaysAutoResize;
142
143 if (BeginPopupModal(name.c_str(), nullptr, popup_flags)) {
144 params.draw_function();
145 EndPopup();
146 }
147 }
148 }
149}
150
151void PopupManager::Show(const char* name) {
152 if (!name) {
153 return; // Safety check for null pointer
154 }
155
156 std::string name_str(name);
157 auto it = popups_.find(name_str);
158 if (it != popups_.end()) {
159 it->second.is_visible = true;
160 } else {
161 // Log warning for unregistered popup
162 printf("[PopupManager] Warning: Popup '%s' not registered. Available popups: ", name);
163 for (const auto& [key, _] : popups_) {
164 printf("'%s' ", key.c_str());
165 }
166 printf("\n");
167 }
168}
169
170void PopupManager::Hide(const char* name) {
171 if (!name) {
172 return; // Safety check for null pointer
173 }
174
175 std::string name_str(name);
176 auto it = popups_.find(name_str);
177 if (it != popups_.end()) {
178 it->second.is_visible = false;
179 CloseCurrentPopup();
180 }
181}
182
183bool PopupManager::IsVisible(const char* name) const {
184 if (!name) {
185 return false; // Safety check for null pointer
186 }
187
188 std::string name_str(name);
189 auto it = popups_.find(name_str);
190 if (it != popups_.end()) {
191 return it->second.is_visible;
192 }
193 return false;
194}
195
196void PopupManager::SetStatus(const absl::Status& status) {
197 if (!status.ok()) {
198 show_status_ = true;
199 prev_status_ = status;
200 status_ = status;
201 }
202}
203
204bool PopupManager::BeginCentered(const char* name) {
205 ImGuiIO const& io = GetIO();
206 ImVec2 pos(io.DisplaySize.x * 0.5f, io.DisplaySize.y * 0.5f);
207 SetNextWindowPos(pos, ImGuiCond_Always, ImVec2(0.5f, 0.5f));
208 ImGuiWindowFlags flags =
209 ImGuiWindowFlags_NoMove | ImGuiWindowFlags_NoDecoration |
210 ImGuiWindowFlags_AlwaysAutoResize | ImGuiWindowFlags_NoSavedSettings;
211 return Begin(name, nullptr, flags);
212}
213
215 if (show_status_ && BeginCentered("StatusWindow")) {
216 Text("%s", ICON_MD_ERROR);
217 Text("%s", prev_status_.ToString().c_str());
218 Spacing();
219 NextColumn();
220 Columns(1);
221 Separator();
222 NewLine();
223 SameLine(128);
224 if (Button("OK", gui::kDefaultModalSize) || IsKeyPressed(ImGuiKey_Space)) {
225 show_status_ = false;
226 status_ = absl::OkStatus();
227 }
228 SameLine();
229 if (Button(ICON_MD_CONTENT_COPY, ImVec2(50, 0))) {
230 SetClipboardText(prev_status_.ToString().c_str());
231 }
232 End();
233 }
234}
235
237 Text("Yet Another Zelda3 Editor - v%s", editor_manager_->version().c_str());
238 Text("Written by: scawful");
239 Spacing();
240 Text("Special Thanks: Zarby89, JaredBrian");
241 Separator();
242
243 if (Button("Close", gui::kDefaultModalSize)) {
244 Hide("About");
245 }
246}
247
249 auto* current_rom = editor_manager_->GetCurrentRom();
250 if (!current_rom) return;
251
252 Text("Title: %s", current_rom->title().c_str());
253 Text("ROM Size: %s", util::HexLongLong(current_rom->size()).c_str());
254
255 if (Button("Close", gui::kDefaultModalSize) || IsKeyPressed(ImGuiKey_Escape)) {
256 Hide("ROM Information");
257 }
258}
259
261 using namespace ImGui;
262
263 Text("%s Save ROM to new location", ICON_MD_SAVE_AS);
264 Separator();
265
266 static std::string save_as_filename = "";
267 if (editor_manager_->GetCurrentRom() && save_as_filename.empty()) {
268 save_as_filename = editor_manager_->GetCurrentRom()->title();
269 }
270
271 InputText("Filename", &save_as_filename);
272 Separator();
273
274 if (Button(absl::StrFormat("%s Browse...", ICON_MD_FOLDER_OPEN).c_str(),
276 auto file_path = util::FileDialogWrapper::ShowSaveFileDialog(save_as_filename, "sfc");
277 if (!file_path.empty()) {
278 save_as_filename = file_path;
279 }
280 }
281
282 SameLine();
283 if (Button(absl::StrFormat("%s Save", ICON_MD_SAVE).c_str(),
285 if (!save_as_filename.empty()) {
286 // Ensure proper file extension
287 std::string final_filename = save_as_filename;
288 if (final_filename.find(".sfc") == std::string::npos &&
289 final_filename.find(".smc") == std::string::npos) {
290 final_filename += ".sfc";
291 }
292
293 auto status = editor_manager_->SaveRomAs(final_filename);
294 if (status.ok()) {
295 save_as_filename = "";
297 }
298 }
299 }
300
301 SameLine();
302 if (Button(absl::StrFormat("%s Cancel", ICON_MD_CANCEL).c_str(),
304 save_as_filename = "";
306 }
307}
308
310 using namespace ImGui;
311
312 static std::string project_name = "";
313 static std::string project_filepath = "";
314 static std::string rom_filename = "";
315 static std::string labels_filename = "";
316 static std::string code_folder = "";
317
318 InputText("Project Name", &project_name);
319
320 if (Button(absl::StrFormat("%s Destination Folder", ICON_MD_FOLDER).c_str(),
323 }
324 SameLine();
325 Text("%s", project_filepath.empty() ? "(Not set)" : project_filepath.c_str());
326
327 if (Button(absl::StrFormat("%s ROM File", ICON_MD_VIDEOGAME_ASSET).c_str(),
330 }
331 SameLine();
332 Text("%s", rom_filename.empty() ? "(Not set)" : rom_filename.c_str());
333
334 if (Button(absl::StrFormat("%s Labels File", ICON_MD_LABEL).c_str(),
337 }
338 SameLine();
339 Text("%s", labels_filename.empty() ? "(Not set)" : labels_filename.c_str());
340
341 if (Button(absl::StrFormat("%s Code Folder", ICON_MD_CODE).c_str(),
344 }
345 SameLine();
346 Text("%s", code_folder.empty() ? "(Not set)" : code_folder.c_str());
347
348 Separator();
349
350 if (Button(absl::StrFormat("%s Choose Project File Location", ICON_MD_SAVE).c_str(),
352 auto project_file_path = util::FileDialogWrapper::ShowSaveFileDialog(project_name, "yaze");
353 if (!project_file_path.empty()) {
354 if (project_file_path.find(".yaze") == std::string::npos) {
355 project_file_path += ".yaze";
356 }
357 project_filepath = project_file_path;
358 }
359 }
360
361 if (Button(absl::StrFormat("%s Create Project", ICON_MD_ADD).c_str(),
363 if (!project_filepath.empty() && !project_name.empty()) {
364 auto status = editor_manager_->CreateNewProject();
365 if (status.ok()) {
366 // Clear fields
367 project_name = "";
368 project_filepath = "";
369 rom_filename = "";
370 labels_filename = "";
371 code_folder = "";
373 }
374 }
375 }
376 SameLine();
377 if (Button(absl::StrFormat("%s Cancel", ICON_MD_CANCEL).c_str(),
379 // Clear fields
380 project_name = "";
381 project_filepath = "";
382 rom_filename = "";
383 labels_filename = "";
384 code_folder = "";
386 }
387}
388
390 if (CollapsingHeader(absl::StrFormat("%s Overworld Editor", ICON_MD_LAYERS).c_str(), ImGuiTreeNodeFlags_DefaultOpen)) {
391 BulletText("LW/DW/SW Tilemap Editing");
392 BulletText("LW/DW/SW Map Properties");
393 BulletText("Create/Delete/Update Entrances");
394 BulletText("Create/Delete/Update Exits");
395 BulletText("Create/Delete/Update Sprites");
396 BulletText("Create/Delete/Update Items");
397 BulletText("Multi-session map editing support");
398 }
399
400 if (CollapsingHeader(absl::StrFormat("%s Dungeon Editor", ICON_MD_CASTLE).c_str())) {
401 BulletText("View Room Header Properties");
402 BulletText("View Entrance Properties");
403 BulletText("Enhanced room navigation");
404 }
405
406 if (CollapsingHeader(absl::StrFormat("%s Graphics & Themes", ICON_MD_PALETTE).c_str())) {
407 BulletText("View Decompressed Graphics Sheets");
408 BulletText("View/Update Graphics Groups");
409 BulletText("5+ Built-in themes (Classic, Cyberpunk, Sunset, Forest, Midnight)");
410 BulletText("Custom theme creation and editing");
411 BulletText("Theme import/export functionality");
412 BulletText("Animated background grid effects");
413 }
414
415 if (CollapsingHeader(absl::StrFormat("%s Palettes", ICON_MD_COLOR_LENS).c_str())) {
416 BulletText("View Palette Groups");
417 BulletText("Enhanced palette editing tools");
418 BulletText("Color conversion utilities");
419 }
420
421 if (CollapsingHeader(absl::StrFormat("%s Project Management", ICON_MD_FOLDER).c_str())) {
422 BulletText("Multi-session workspace support");
423 BulletText("Enhanced project creation and management");
424 BulletText("ZScream project format compatibility");
425 BulletText("Workspace settings and feature flags");
426 }
427
428 if (CollapsingHeader(absl::StrFormat("%s Development Tools", ICON_MD_BUILD).c_str())) {
429 BulletText("Asar 65816 assembler integration");
430 BulletText("Enhanced CLI tools with TUI interface");
431 BulletText("Memory editor with advanced features");
432 BulletText("Hex editor with search and navigation");
433 BulletText("Assembly validation and symbol extraction");
434 }
435
436 if (CollapsingHeader(absl::StrFormat("%s Save Capabilities", ICON_MD_SAVE).c_str())) {
437 BulletText("All Overworld editing features");
438 BulletText("Hex Editor changes");
439 BulletText("Theme configurations");
440 BulletText("Project settings and workspace layouts");
441 BulletText("Custom assembly patches");
442 }
443
444 if (Button("Close", gui::kDefaultModalSize)) {
445 Hide("Supported Features");
446 }
447}
448
450 Text("File -> Open");
451 Text("Select a ROM file to open");
452 Text("Supported ROMs (headered or unheadered):");
453 Text("The Legend of Zelda: A Link to the Past");
454 Text("US Version 1.0");
455 Text("JP Version 1.0");
456
457 if (Button("Close", gui::kDefaultModalSize)) {
458 Hide("Open a ROM");
459 }
460}
461
463 Text("Project Menu");
464 Text("Create a new project or open an existing one.");
465 Text("Save the project to save the current state of the project.");
466 TextWrapped(
467 "To save a project, you need to first open a ROM and initialize your "
468 "code path and labels file. Label resource manager can be found in "
469 "the View menu. Code path is set in the Code editor after opening a "
470 "folder.");
471
472 if (Button("Close", gui::kDefaultModalSize)) {
473 Hide("Manage Project");
474 }
475}
476
478 TextWrapped("Welcome to YAZE v0.3!");
479 TextWrapped("This software allows you to modify 'The Legend of Zelda: A Link to the Past' (US or JP) ROMs.");
480 Spacing();
481 TextWrapped("General Tips:");
482 BulletText("Experiment flags determine whether certain features are enabled");
483 BulletText("Backup files are enabled by default for safety");
484 BulletText("Use File > Options to configure settings");
485
486 if (Button("Close", gui::kDefaultModalSize)) {
487 Hide("Getting Started");
488 }
489}
490
492 TextWrapped("Asar 65816 Assembly Integration");
493 TextWrapped("YAZE v0.3 includes full Asar assembler support for ROM patching.");
494 Spacing();
495 TextWrapped("Features:");
496 BulletText("Cross-platform ROM patching with assembly code");
497 BulletText("Symbol extraction with addresses and opcodes");
498 BulletText("Assembly validation with error reporting");
499 BulletText("Memory-safe operations with automatic ROM size management");
500
501 if (Button("Close", gui::kDefaultModalSize)) {
502 Hide("Asar Integration");
503 }
504}
505
507 TextWrapped("Build Instructions");
508 TextWrapped("YAZE uses modern CMake for cross-platform builds.");
509 Spacing();
510 TextWrapped("Quick Start:");
511 BulletText("cmake -B build");
512 BulletText("cmake --build build --target yaze");
513 Spacing();
514 TextWrapped("Development:");
515 BulletText("cmake --preset dev");
516 BulletText("cmake --build --preset dev");
517
518 if (Button("Close", gui::kDefaultModalSize)) {
519 Hide("Build Instructions");
520 }
521}
522
524 TextWrapped("Command Line Interface (z3ed)");
525 TextWrapped("Enhanced CLI tool with Asar integration.");
526 Spacing();
527 TextWrapped("Commands:");
528 BulletText("z3ed asar patch.asm --rom=file.sfc");
529 BulletText("z3ed extract symbols.asm");
530 BulletText("z3ed validate assembly.asm");
531 BulletText("z3ed patch file.bps --rom=file.sfc");
532
533 if (Button("Close", gui::kDefaultModalSize)) {
534 Hide("CLI Usage");
535 }
536}
537
539 TextWrapped("Troubleshooting");
540 TextWrapped("Common issues and solutions:");
541 Spacing();
542 BulletText("ROM won't load: Check file format (SFC/SMC supported)");
543 BulletText("Graphics issues: Try disabling experimental features");
544 BulletText("Performance: Enable hardware acceleration in display settings");
545 BulletText("Crashes: Check ROM file integrity and available memory");
546
547 if (Button("Close", gui::kDefaultModalSize)) {
548 Hide("Troubleshooting");
549 }
550}
551
553 TextWrapped("Contributing to YAZE");
554 TextWrapped("YAZE is open source and welcomes contributions!");
555 Spacing();
556 TextWrapped("How to contribute:");
557 BulletText("Fork the repository on GitHub");
558 BulletText("Create feature branches for new work");
559 BulletText("Follow C++ coding standards");
560 BulletText("Include tests for new features");
561 BulletText("Submit pull requests for review");
562
563 if (Button("Close", gui::kDefaultModalSize)) {
564 Hide("Contributing");
565 }
566}
567
569 TextWrapped("What's New in YAZE v0.3");
570 Spacing();
571
572 if (CollapsingHeader(absl::StrFormat("%s User Interface & Theming", ICON_MD_PALETTE).c_str(), ImGuiTreeNodeFlags_DefaultOpen)) {
573 BulletText("Complete theme management system with 5+ built-in themes");
574 BulletText("Custom theme editor with save-to-file functionality");
575 BulletText("Animated background grid with breathing effects (optional)");
576 BulletText("Enhanced welcome screen with themed elements");
577 BulletText("Multi-session workspace support with docking");
578 BulletText("Improved editor organization and navigation");
579 }
580
581 if (CollapsingHeader(absl::StrFormat("%s Development & Build System", ICON_MD_BUILD).c_str(), ImGuiTreeNodeFlags_DefaultOpen)) {
582 BulletText("Asar 65816 assembler integration for ROM patching");
583 BulletText("Enhanced CLI tools with TUI (Terminal User Interface)");
584 BulletText("Modernized CMake build system with presets");
585 BulletText("Cross-platform CI/CD pipeline (Windows, macOS, Linux)");
586 BulletText("Comprehensive testing framework with 46+ core tests");
587 BulletText("Professional packaging for all platforms (DMG, MSI, DEB)");
588 }
589
590 if (CollapsingHeader(absl::StrFormat("%s Core Improvements", ICON_MD_SETTINGS).c_str())) {
591 BulletText("Enhanced project management with YazeProject structure");
592 BulletText("Improved ROM loading and validation");
593 BulletText("Better error handling and status reporting");
594 BulletText("Memory safety improvements with sanitizers");
595 BulletText("Enhanced file dialog integration");
596 BulletText("Improved logging and debugging capabilities");
597 }
598
599 if (CollapsingHeader(absl::StrFormat("%s Editor Features", ICON_MD_EDIT).c_str())) {
600 BulletText("Enhanced overworld editing capabilities");
601 BulletText("Improved graphics sheet viewing and editing");
602 BulletText("Better palette management and editing");
603 BulletText("Enhanced memory and hex editing tools");
604 BulletText("Improved sprite and item management");
605 BulletText("Better entrance and exit editing");
606 }
607
608 Spacing();
609 if (Button(absl::StrFormat("%s View Theme Editor", ICON_MD_PALETTE).c_str(), ImVec2(-1, 30))) {
610 // Close this popup and show theme settings
611 Hide("Whats New v03");
612 // Could trigger theme editor opening here
613 }
614
615 if (Button("Close", gui::kDefaultModalSize)) {
616 Hide("Whats New v03");
617 }
618}
619
621 TextWrapped("Workspace Management");
622 TextWrapped("YAZE supports multiple ROM sessions and flexible workspace layouts.");
623 Spacing();
624
625 TextWrapped("Session Management:");
626 BulletText("Ctrl+Shift+N: Create new session");
627 BulletText("Ctrl+Shift+W: Close current session");
628 BulletText("Ctrl+Tab: Quick session switcher");
629 BulletText("Each session maintains its own ROM and editor state");
630
631 Spacing();
632 TextWrapped("Layout Management:");
633 BulletText("Drag window tabs to dock/undock");
634 BulletText("Ctrl+Shift+S: Save current layout");
635 BulletText("Ctrl+Shift+O: Load saved layout");
636 BulletText("F11: Maximize current window");
637
638 Spacing();
639 TextWrapped("Preset Layouts:");
640 BulletText("Developer: Code, memory, testing tools");
641 BulletText("Designer: Graphics, palettes, sprites");
642 BulletText("Modder: All gameplay editing tools");
643
644 if (Button("Close", gui::kDefaultModalSize)) {
645 Hide("Workspace Help");
646 }
647}
648
650 TextColored(ImVec4(1.0f, 0.5f, 0.0f, 1.0f), "%s Warning", ICON_MD_WARNING);
651 TextWrapped("You have reached the recommended session limit.");
652 TextWrapped("Having too many sessions open may impact performance.");
653 Spacing();
654 TextWrapped("Consider closing unused sessions or saving your work.");
655
656 if (Button("Understood", gui::kDefaultModalSize)) {
657 Hide("Session Limit Warning");
658 }
659 SameLine();
660 if (Button("Open Session Manager", gui::kDefaultModalSize)) {
661 Hide("Session Limit Warning");
662 // This would trigger the session manager to open
663 }
664}
665
667 TextColored(ImVec4(1.0f, 0.5f, 0.0f, 1.0f), "%s Confirm Reset", ICON_MD_WARNING);
668 TextWrapped("This will reset your current workspace layout to default.");
669 TextWrapped("Any custom window arrangements will be lost.");
670 Spacing();
671 TextWrapped("Do you want to continue?");
672
673 if (Button("Reset Layout", gui::kDefaultModalSize)) {
674 Hide("Layout Reset Confirm");
675 // This would trigger the actual reset
676 }
677 SameLine();
678 if (Button("Cancel", gui::kDefaultModalSize)) {
679 Hide("Layout Reset Confirm");
680 }
681}
682
684 // Set a comfortable default size with natural constraints
685 SetNextWindowSize(ImVec2(900, 700), ImGuiCond_FirstUseEver);
686 SetNextWindowSizeConstraints(ImVec2(600, 400), ImVec2(FLT_MAX, FLT_MAX));
687
688 Text("%s Display & Theme Settings", ICON_MD_DISPLAY_SETTINGS);
689 TextWrapped("Customize your YAZE experience - accessible anytime!");
690 Separator();
691
692 // Create a child window for scrollable content to avoid table conflicts
693 // Use remaining space minus the close button area
694 float available_height = GetContentRegionAvail().y - 60; // Reserve space for close button
695 if (BeginChild("DisplaySettingsContent", ImVec2(0, available_height), true, ImGuiWindowFlags_AlwaysVerticalScrollbar)) {
696 // Use the popup-safe version to avoid table conflicts
698
699 Separator();
700 gui::TextWithSeparators("Font Manager");
702
703 // Global font scale (moved from the old display settings window)
704 ImGuiIO &io = GetIO();
705 Separator();
706 Text("Global Font Scale");
707 static float font_global_scale = io.FontGlobalScale;
708 if (SliderFloat("##global_scale", &font_global_scale, 0.5f, 1.8f, "%.2f")) {
709 if (editor_manager_) {
710 editor_manager_->SetFontGlobalScale(font_global_scale);
711 } else {
712 io.FontGlobalScale = font_global_scale;
713 }
714 }
715 }
716 EndChild();
717
718 Separator();
719 if (Button("Close", gui::kDefaultModalSize)) {
720 Hide("Display Settings");
721 }
722}
723
725 using namespace ImGui;
726
727 // Display feature flags editor using the existing FlagsMenu system
728 Text("Feature Flags Configuration");
729 Separator();
730
731 BeginChild("##FlagsContent", ImVec2(0, -30), true);
732
733 // Use the feature flags menu system
734 static gui::FlagsMenu flags_menu;
735
736 if (BeginTabBar("FlagCategories")) {
737 if (BeginTabItem("Overworld")) {
738 flags_menu.DrawOverworldFlags();
739 EndTabItem();
740 }
741 if (BeginTabItem("Dungeon")) {
742 flags_menu.DrawDungeonFlags();
743 EndTabItem();
744 }
745 if (BeginTabItem("Resources")) {
746 flags_menu.DrawResourceFlags();
747 EndTabItem();
748 }
749 if (BeginTabItem("System")) {
750 flags_menu.DrawSystemFlags();
751 EndTabItem();
752 }
753 EndTabBar();
754 }
755
756 EndChild();
757
758 Separator();
759 if (Button("Close", gui::kDefaultModalSize)) {
761 }
762}
763
765 using namespace ImGui;
766
767 Text("Data Integrity Check Results");
768 Separator();
769
770 BeginChild("##IntegrityContent", ImVec2(0, -30), true);
771
772 // Placeholder for data integrity results
773 // In a full implementation, this would show test results
774 Text("ROM Data Integrity:");
775 Separator();
776 TextColored(ImVec4(0.0f, 1.0f, 0.0f, 1.0f), "✓ ROM header valid");
777 TextColored(ImVec4(0.0f, 1.0f, 0.0f, 1.0f), "✓ Checksum valid");
778 TextColored(ImVec4(0.0f, 1.0f, 0.0f, 1.0f), "✓ Graphics data intact");
779 TextColored(ImVec4(0.0f, 1.0f, 0.0f, 1.0f), "✓ Map data intact");
780
781 Spacing();
782 Text("No issues detected.");
783
784 EndChild();
785
786 Separator();
787 if (Button("Close", gui::kDefaultModalSize)) {
789 }
790}
791
792} // namespace editor
793} // namespace yaze
The EditorManager controls the main editor window and manages the various editor classes.
absl::Status SaveRomAs(const std::string &filename)
absl::Status CreateNewProject(const std::string &template_name="Basic ROM Hack")
void SetFontGlobalScale(float scale)
auto GetCurrentRom() const -> Rom *
void SetStatus(const absl::Status &status)
bool IsVisible(const char *name) const
void Show(const char *name)
void Hide(const char *name)
PopupManager(EditorManager *editor_manager)
std::unordered_map< std::string, PopupParams > popups_
EditorManager * editor_manager_
bool BeginCentered(const char *name)
static std::string ShowSaveFileDialog(const std::string &default_name="", const std::string &default_extension="")
ShowSaveFileDialog opens a save file dialog and returns the selected filepath. Uses global feature fl...
static std::string ShowOpenFileDialog()
ShowOpenFileDialog opens a file dialog and returns the selected filepath. Uses global feature flag to...
static std::string ShowOpenFolderDialog()
ShowOpenFolderDialog opens a file dialog and returns the selected folder path. Uses global feature fl...
#define ICON_MD_FOLDER_OPEN
Definition icons.h:811
#define ICON_MD_SETTINGS
Definition icons.h:1697
#define ICON_MD_CANCEL
Definition icons.h:362
#define ICON_MD_WARNING
Definition icons.h:2121
#define ICON_MD_SAVE_AS
Definition icons.h:1644
#define ICON_MD_CODE
Definition icons.h:432
#define ICON_MD_LABEL
Definition icons.h:1051
#define ICON_MD_VIDEOGAME_ASSET
Definition icons.h:2074
#define ICON_MD_EDIT
Definition icons.h:643
#define ICON_MD_CASTLE
Definition icons.h:378
#define ICON_MD_ERROR
Definition icons.h:684
#define ICON_MD_LAYERS
Definition icons.h:1066
#define ICON_MD_DISPLAY_SETTINGS
Definition icons.h:585
#define ICON_MD_ADD
Definition icons.h:84
#define ICON_MD_BUILD
Definition icons.h:326
#define ICON_MD_SAVE
Definition icons.h:1642
#define ICON_MD_FOLDER
Definition icons.h:807
#define ICON_MD_PALETTE
Definition icons.h:1368
#define ICON_MD_CONTENT_COPY
Definition icons.h:463
#define ICON_MD_COLOR_LENS
Definition icons.h:438
Definition input.cc:20
constexpr const char * kRomInfo
constexpr const char * kAbout
constexpr const char * kTroubleshooting
constexpr const char * kWhatsNew
constexpr const char * kSupportedFeatures
constexpr const char * kDataIntegrity
constexpr const char * kManageProject
constexpr const char * kNewProject
constexpr const char * kSaveAs
constexpr const char * kDisplaySettings
constexpr const char * kSessionLimitWarning
constexpr const char * kCLIUsage
constexpr const char * kLayoutResetConfirm
constexpr const char * kAsarIntegration
constexpr const char * kOpenRomHelp
constexpr const char * kFeatureFlags
constexpr const char * kGettingStarted
constexpr const char * kContributing
constexpr const char * kBuildInstructions
constexpr const char * kWorkspaceHelp
void DrawFontManager()
Definition style.cc:1286
void DrawDisplaySettingsForPopup(ImGuiStyle *ref)
Definition style.cc:842
constexpr ImVec2 kDefaultModalSize
Definition input.h:21
void TextWithSeparators(const absl::string_view &text)
Definition style.cc:1280
std::string HexLongLong(uint64_t qword, HexStringParams params)
Definition hex.cc:63
Main namespace for the application.
Definition controller.cc:20