#include <popup_manager.h>

Public Member Functions | |
| PopupManager (EditorManager *editor_manager) | |
| void | Initialize () |
| void | DrawPopups () |
| void | Show (const char *name) |
| void | Hide (const char *name) |
| bool | IsVisible (const char *name) const |
| void | SetStatus (const absl::Status &status) |
| absl::Status | GetStatus () const |
Private Member Functions | |
| bool | BeginCentered (const char *name) |
| void | DrawAboutPopup () |
| void | DrawRomInfoPopup () |
| void | DrawStatusPopup () |
| void | DrawSaveAsPopup () |
| void | DrawSaveScopePopup () |
| void | DrawNewProjectPopup () |
| void | DrawSupportedFeaturesPopup () |
| void | DrawOpenRomHelpPopup () |
| void | DrawManageProjectPopup () |
| void | DrawGettingStartedPopup () |
| void | DrawAsarIntegrationPopup () |
| void | DrawBuildInstructionsPopup () |
| void | DrawCLIUsagePopup () |
| void | DrawTroubleshootingPopup () |
| void | DrawContributingPopup () |
| void | DrawWhatsNewPopup () |
| void | DrawWorkspaceHelpPopup () |
| void | DrawSessionLimitWarningPopup () |
| void | DrawLayoutResetConfirmPopup () |
| void | DrawLayoutPresetsPopup () |
| void | DrawSessionManagerPopup () |
| void | DrawDisplaySettingsPopup () |
| void | DrawFeatureFlagsPopup () |
| void | DrawDataIntegrityPopup () |
| void | DrawDungeonPotItemSaveConfirmPopup () |
| void | DrawRomBackupManagerPopup () |
| void | DrawRomWriteConfirmPopup () |
| void | DrawWriteConflictWarningPopup () |
Private Attributes | |
| EditorManager * | editor_manager_ |
| std::unordered_map< std::string, PopupParams > | popups_ |
| absl::Status | status_ |
| bool | show_status_ = false |
| absl::Status | prev_status_ |
Definition at line 110 of file popup_manager.h.
| yaze::editor::PopupManager::PopupManager | ( | EditorManager * | editor_manager | ) |
Definition at line 31 of file popup_manager.cc.
| void yaze::editor::PopupManager::Initialize | ( | ) |
Definition at line 34 of file popup_manager.cc.
References DrawAboutPopup(), DrawAsarIntegrationPopup(), DrawBuildInstructionsPopup(), DrawCLIUsagePopup(), DrawContributingPopup(), DrawDataIntegrityPopup(), DrawDisplaySettingsPopup(), DrawDungeonPotItemSaveConfirmPopup(), DrawFeatureFlagsPopup(), DrawGettingStartedPopup(), DrawLayoutPresetsPopup(), DrawLayoutResetConfirmPopup(), DrawManageProjectPopup(), DrawNewProjectPopup(), DrawOpenRomHelpPopup(), DrawRomBackupManagerPopup(), DrawRomInfoPopup(), DrawRomWriteConfirmPopup(), DrawSaveAsPopup(), DrawSaveScopePopup(), DrawSessionLimitWarningPopup(), DrawSessionManagerPopup(), DrawSupportedFeaturesPopup(), DrawTroubleshootingPopup(), DrawWhatsNewPopup(), DrawWorkspaceHelpPopup(), DrawWriteConflictWarningPopup(), yaze::editor::PopupID::kAbout, yaze::editor::PopupID::kAsarIntegration, yaze::editor::PopupID::kBuildInstructions, yaze::editor::PopupID::kCLIUsage, yaze::editor::kConfirmation, yaze::editor::PopupID::kContributing, yaze::editor::PopupID::kDataIntegrity, yaze::editor::PopupID::kDisplaySettings, yaze::editor::PopupID::kDungeonPotItemSaveConfirm, yaze::editor::PopupID::kFeatureFlags, yaze::editor::kFileOperation, yaze::editor::PopupID::kGettingStarted, yaze::editor::kHelp, yaze::editor::kInfo, yaze::editor::PopupID::kLayoutPresets, yaze::editor::PopupID::kLayoutResetConfirm, yaze::editor::PopupID::kManageProject, yaze::editor::PopupID::kNewProject, yaze::editor::PopupID::kOpenRomHelp, yaze::editor::PopupID::kRomBackups, yaze::editor::PopupID::kRomInfo, yaze::editor::PopupID::kRomWriteConfirm, yaze::editor::PopupID::kSaveAs, yaze::editor::PopupID::kSaveScope, yaze::editor::PopupID::kSessionLimitWarning, yaze::editor::PopupID::kSessionManager, yaze::editor::kSettings, yaze::editor::PopupID::kSupportedFeatures, yaze::editor::PopupID::kTroubleshooting, yaze::editor::kWarning, yaze::editor::PopupID::kWhatsNew, yaze::editor::PopupID::kWorkspaceHelp, yaze::editor::PopupID::kWriteConflictWarning, and popups_.
| void yaze::editor::PopupManager::DrawPopups | ( | ) |
Definition at line 146 of file popup_manager.cc.
References DrawStatusPopup(), and popups_.
Referenced by yaze::editor::UICoordinator::DrawAllPopups().

| void yaze::editor::PopupManager::Show | ( | const char * | name | ) |
Definition at line 168 of file popup_manager.cc.
References popups_.
Referenced by yaze::editor::MenuOrchestrator::AddFileMenuItems(), yaze::editor::RomLifecycleManager::CheckRomWritePolicy(), yaze::editor::UICoordinator::ShowDisplaySettings(), and yaze::editor::UICoordinator::ShowPopup().
| void yaze::editor::PopupManager::Hide | ( | const char * | name | ) |
Definition at line 189 of file popup_manager.cc.
References popups_.
Referenced by DrawAboutPopup(), DrawAsarIntegrationPopup(), DrawBuildInstructionsPopup(), DrawCLIUsagePopup(), DrawContributingPopup(), DrawDataIntegrityPopup(), DrawDisplaySettingsPopup(), DrawDungeonPotItemSaveConfirmPopup(), DrawFeatureFlagsPopup(), DrawGettingStartedPopup(), DrawLayoutPresetsPopup(), DrawLayoutResetConfirmPopup(), DrawManageProjectPopup(), DrawNewProjectPopup(), DrawOpenRomHelpPopup(), DrawRomBackupManagerPopup(), DrawRomInfoPopup(), DrawRomWriteConfirmPopup(), DrawSaveAsPopup(), DrawSaveScopePopup(), DrawSessionLimitWarningPopup(), DrawSessionManagerPopup(), DrawSupportedFeaturesPopup(), DrawTroubleshootingPopup(), DrawWhatsNewPopup(), DrawWorkspaceHelpPopup(), DrawWriteConflictWarningPopup(), and yaze::editor::UICoordinator::HidePopup().
| bool yaze::editor::PopupManager::IsVisible | ( | const char * | name | ) | const |
Definition at line 202 of file popup_manager.cc.
References popups_.
| void yaze::editor::PopupManager::SetStatus | ( | const absl::Status & | status | ) |
Definition at line 215 of file popup_manager.cc.
References prev_status_, show_status_, and status_.
|
inline |
Definition at line 133 of file popup_manager.h.
References status_.
|
private |
Definition at line 223 of file popup_manager.cc.
Referenced by DrawStatusPopup().
|
private |
Definition at line 256 of file popup_manager.cc.
References editor_manager_, Hide(), yaze::gui::kDefaultModalSize, and yaze::editor::EditorManager::version().
Referenced by Initialize().

|
private |
Definition at line 268 of file popup_manager.cc.
References yaze::gui::ConvertColorToImVec4(), editor_manager_, yaze::gui::ThemeManager::Get(), yaze::editor::EditorManager::GetCurrentProject(), yaze::editor::EditorManager::GetCurrentRom(), yaze::editor::EditorManager::GetCurrentRomHash(), yaze::gui::ThemeManager::GetCurrentTheme(), yaze::util::HexLongLong(), Hide(), yaze::editor::EditorManager::IsRomHashMismatch(), yaze::gui::kDefaultModalSize, yaze::project::RomRoleToString(), and yaze::project::RomWritePolicyToString().
Referenced by Initialize().
|
private |
Definition at line 233 of file popup_manager.cc.
References BeginCentered(), ICON_MD_CONTENT_COPY, ICON_MD_ERROR, yaze::gui::kDefaultModalSize, prev_status_, show_status_, and status_.
Referenced by DrawPopups().

|
private |
Definition at line 304 of file popup_manager.cc.
References editor_manager_, yaze::editor::EditorManager::GetCurrentRom(), Hide(), ICON_MD_CANCEL, ICON_MD_FOLDER_OPEN, ICON_MD_SAVE, ICON_MD_SAVE_AS, yaze::gui::kDefaultModalSize, yaze::editor::PopupID::kSaveAs, yaze::editor::EditorManager::SaveRomAs(), yaze::util::FileDialogWrapper::ShowSaveFileDialog(), and yaze::Rom::title().
Referenced by Initialize().
|
private |
Definition at line 354 of file popup_manager.cc.
References yaze::core::FeatureFlags::get(), Hide(), ICON_MD_SAVE, yaze::gui::kDefaultModalSize, and yaze::editor::PopupID::kSaveScope.
Referenced by Initialize().

|
private |
Definition at line 533 of file popup_manager.cc.
References yaze::editor::EditorManager::CreateNewProject(), editor_manager_, Hide(), ICON_MD_ADD, ICON_MD_CANCEL, ICON_MD_CODE, ICON_MD_FOLDER, ICON_MD_LABEL, ICON_MD_SAVE, ICON_MD_VIDEOGAME_ASSET, yaze::gui::kDefaultModalSize, yaze::editor::PopupID::kNewProject, yaze::util::MakeRomFileDialogOptions(), yaze::util::FileDialogWrapper::ShowOpenFileDialog(), yaze::util::FileDialogWrapper::ShowOpenFolderDialog(), and yaze::util::FileDialogWrapper::ShowSaveFileDialog().
Referenced by Initialize().
|
private |
Definition at line 617 of file popup_manager.cc.
References yaze::gui::ConvertColorToImVec4(), yaze::gui::ThemeManager::Get(), yaze::gui::ThemeManager::GetCurrentTheme(), Hide(), yaze::gui::kDefaultModalSize, and yaze::editor::PopupID::kSupportedFeatures.
Referenced by Initialize().

|
private |
Definition at line 751 of file popup_manager.cc.
References Hide(), and yaze::gui::kDefaultModalSize.
Referenced by Initialize().

|
private |
Definition at line 766 of file popup_manager.cc.
References Hide(), and yaze::gui::kDefaultModalSize.
Referenced by Initialize().

|
private |
Definition at line 781 of file popup_manager.cc.
References Hide(), yaze::gui::kDefaultModalSize, and YAZE_VERSION_STRING.
Referenced by Initialize().

|
private |
Definition at line 806 of file popup_manager.cc.
References Hide(), and yaze::gui::kDefaultModalSize.
Referenced by Initialize().

|
private |
Definition at line 821 of file popup_manager.cc.
References Hide(), and yaze::gui::kDefaultModalSize.
Referenced by Initialize().

|
private |
Definition at line 840 of file popup_manager.cc.
References Hide(), and yaze::gui::kDefaultModalSize.
Referenced by Initialize().

|
private |
Definition at line 860 of file popup_manager.cc.
References Hide(), and yaze::gui::kDefaultModalSize.
Referenced by Initialize().

|
private |
Definition at line 878 of file popup_manager.cc.
References Hide(), and yaze::gui::kDefaultModalSize.
Referenced by Initialize().

|
private |
Definition at line 894 of file popup_manager.cc.
References Hide(), ICON_MD_BUILD, ICON_MD_DESCRIPTION, ICON_MD_EDIT, ICON_MD_PALETTE, ICON_MD_SETTINGS, yaze::gui::kDefaultModalSize, yaze::editor::PopupID::kWhatsNew, and YAZE_VERSION_STRING.
Referenced by Initialize().

|
private |
Definition at line 948 of file popup_manager.cc.
References Hide(), and yaze::gui::kDefaultModalSize.
Referenced by Initialize().

|
private |
Definition at line 978 of file popup_manager.cc.
References yaze::gui::GetWarningColor(), Hide(), ICON_MD_WARNING, and yaze::gui::kDefaultModalSize.
Referenced by Initialize().

|
private |
Definition at line 995 of file popup_manager.cc.
References yaze::gui::GetWarningColor(), Hide(), ICON_MD_WARNING, and yaze::gui::kDefaultModalSize.
Referenced by Initialize().

|
private |
Definition at line 1012 of file popup_manager.cc.
References editor_manager_, yaze::editor::LayoutPresets::GetAudioEngineerPreset(), yaze::editor::EditorManager::GetCurrentEditor(), yaze::editor::LayoutPresets::GetDesignerPreset(), yaze::editor::LayoutPresets::GetDeveloperPreset(), yaze::editor::LayoutPresets::GetDungeonMasterPreset(), yaze::gui::GetInfoColor(), yaze::editor::LayoutPresets::GetLogicDebuggerPreset(), yaze::editor::LayoutPresets::GetMinimalPreset(), yaze::editor::LayoutPresets::GetModderPreset(), yaze::editor::LayoutPresets::GetOverworldArtistPreset(), Hide(), yaze::editor::WorkspaceWindowManager::HideAll(), ICON_MD_BUG_REPORT, ICON_MD_BUILD, ICON_MD_CROP_FREE, ICON_MD_DASHBOARD, ICON_MD_DOOR_SLIDING, ICON_MD_MAP, ICON_MD_MUSIC_NOTE, ICON_MD_PALETTE, ICON_MD_REFRESH, ICON_MD_SCIENCE, yaze::editor::PopupID::kLayoutPresets, yaze::editor::Editor::type(), and yaze::editor::EditorManager::window_manager().
Referenced by Initialize().
|
private |
Definition at line 1112 of file popup_manager.cc.
References yaze::editor::EditorManager::CreateNewSession(), editor_manager_, yaze::Rom::filename(), yaze::editor::EditorManager::GetActiveSessionCount(), yaze::editor::EditorManager::GetCurrentRom(), yaze::editor::EditorManager::GetCurrentSessionId(), yaze::gui::GetInfoColor(), yaze::gui::GetSuccessColor(), Hide(), ICON_MD_ADD, ICON_MD_CHECK_CIRCLE, ICON_MD_TAB, yaze::Rom::is_loaded(), yaze::editor::PopupID::kSessionManager, yaze::editor::EditorManager::RemoveSession(), and yaze::editor::EditorManager::SwitchToSession().
Referenced by Initialize().
|
private |
Definition at line 1199 of file popup_manager.cc.
References yaze::gui::DrawDisplaySettingsForPopup(), yaze::gui::DrawFontManager(), editor_manager_, Hide(), ICON_MD_DISPLAY_SETTINGS, yaze::gui::kDefaultModalSize, yaze::editor::EditorManager::SetFontGlobalScale(), and yaze::gui::TextWithSeparators().
Referenced by Initialize().
|
private |
Definition at line 1242 of file popup_manager.cc.
References yaze::gui::FlagsMenu::DrawDungeonFlags(), yaze::gui::FlagsMenu::DrawOverworldFlags(), yaze::gui::FlagsMenu::DrawResourceFlags(), yaze::gui::FlagsMenu::DrawSystemFlags(), Hide(), yaze::gui::kDefaultModalSize, and yaze::editor::PopupID::kFeatureFlags.
Referenced by Initialize().
|
private |
Definition at line 1282 of file popup_manager.cc.
References yaze::gui::GetSuccessColor(), Hide(), yaze::editor::PopupID::kDataIntegrity, and yaze::gui::kDefaultModalSize.
Referenced by Initialize().

|
private |
Definition at line 1310 of file popup_manager.cc.
References editor_manager_, Hide(), yaze::editor::EditorManager::kCancel, yaze::gui::kDefaultModalSize, yaze::editor::PopupID::kDungeonPotItemSaveConfirm, yaze::editor::EditorManager::kSaveWithoutPotItems, yaze::editor::EditorManager::kSaveWithPotItems, yaze::editor::EditorManager::pending_pot_item_total_rooms(), yaze::editor::EditorManager::pending_pot_item_unloaded_rooms(), and yaze::editor::EditorManager::ResolvePotItemSaveConfirmation().
Referenced by Initialize().

|
private |
Definition at line 411 of file popup_manager.cc.
References editor_manager_, yaze::Rom::filename(), yaze::project::YazeProject::GetAbsolutePath(), yaze::editor::EditorManager::GetCurrentProject(), yaze::editor::EditorManager::GetCurrentRom(), yaze::editor::EditorManager::GetRomBackups(), Hide(), ICON_MD_BACKUP, ICON_MD_CONTENT_COPY, ICON_MD_DELETE_SWEEP, ICON_MD_OPEN_IN_NEW, ICON_MD_RESTORE, yaze::Rom::is_loaded(), yaze::gui::kDefaultModalSize, yaze::editor::kError, yaze::editor::PopupID::kRomBackups, yaze::editor::kSuccess, yaze::editor::EditorManager::OpenRomOrProject(), yaze::editor::EditorManager::PruneRomBackups(), yaze::editor::EditorManager::RestoreRomBackup(), and yaze::editor::EditorManager::toast_manager().
Referenced by Initialize().
|
private |
Definition at line 1356 of file popup_manager.cc.
References yaze::editor::EditorManager::CancelRomWriteConfirm(), yaze::editor::EditorManager::ConfirmRomWrite(), editor_manager_, yaze::Rom::filename(), yaze::editor::EditorManager::GetCurrentProject(), yaze::editor::EditorManager::GetCurrentRom(), yaze::editor::EditorManager::GetCurrentRomHash(), yaze::editor::EditorManager::GetProjectExpectedRomHash(), yaze::editor::EditorManager::GetProjectRomRole(), yaze::editor::EditorManager::GetProjectRomWritePolicy(), Hide(), yaze::gui::kDefaultModalSize, yaze::editor::kError, yaze::editor::PopupID::kRomWriteConfirm, yaze::project::RomRoleToString(), yaze::project::RomWritePolicyToString(), yaze::editor::EditorManager::SaveRom(), and yaze::editor::EditorManager::toast_manager().
Referenced by Initialize().
|
private |
Definition at line 1421 of file popup_manager.cc.
References yaze::core::AddressOwnershipToString(), yaze::editor::EditorManager::BypassWriteConflictOnce(), yaze::editor::EditorManager::ClearPendingWriteConflicts(), editor_manager_, yaze::gui::GetWarningColor(), Hide(), ICON_MD_WARNING, yaze::gui::kDefaultModalSize, yaze::editor::kError, yaze::editor::PopupID::kWriteConflictWarning, yaze::editor::EditorManager::pending_write_conflicts(), yaze::editor::EditorManager::SaveRom(), and yaze::editor::EditorManager::toast_manager().
Referenced by Initialize().
|
private |
Definition at line 191 of file popup_manager.h.
Referenced by DrawAboutPopup(), DrawDisplaySettingsPopup(), DrawDungeonPotItemSaveConfirmPopup(), DrawLayoutPresetsPopup(), DrawNewProjectPopup(), DrawRomBackupManagerPopup(), DrawRomInfoPopup(), DrawRomWriteConfirmPopup(), DrawSaveAsPopup(), DrawSessionManagerPopup(), and DrawWriteConflictWarningPopup().
|
private |
Definition at line 192 of file popup_manager.h.
Referenced by DrawPopups(), Hide(), Initialize(), IsVisible(), and Show().
|
private |
Definition at line 193 of file popup_manager.h.
Referenced by DrawStatusPopup(), GetStatus(), and SetStatus().
|
private |
Definition at line 194 of file popup_manager.h.
Referenced by DrawStatusPopup(), and SetStatus().
|
private |
Definition at line 195 of file popup_manager.h.
Referenced by DrawStatusPopup(), and SetStatus().