#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 () |
| void | DrawUnsavedSessionChangesPopup () |
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 112 of file popup_manager.h.
| yaze::editor::PopupManager::PopupManager | ( | EditorManager * | editor_manager | ) |
Definition at line 32 of file popup_manager.cc.
| void yaze::editor::PopupManager::Initialize | ( | ) |
Definition at line 35 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(), DrawUnsavedSessionChangesPopup(), 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::PopupID::kUnsavedSessionChanges, 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 150 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 172 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 193 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(), DrawUnsavedSessionChangesPopup(), DrawWhatsNewPopup(), DrawWorkspaceHelpPopup(), DrawWriteConflictWarningPopup(), and yaze::editor::UICoordinator::HidePopup().
| bool yaze::editor::PopupManager::IsVisible | ( | const char * | name | ) | const |
Definition at line 206 of file popup_manager.cc.
References popups_.
| void yaze::editor::PopupManager::SetStatus | ( | const absl::Status & | status | ) |
Definition at line 219 of file popup_manager.cc.
References prev_status_, show_status_, and status_.
Referenced by DrawNewProjectPopup().
|
inline |
Definition at line 135 of file popup_manager.h.
References status_.
|
private |
Definition at line 227 of file popup_manager.cc.
Referenced by DrawStatusPopup().
|
private |
Definition at line 260 of file popup_manager.cc.
References editor_manager_, Hide(), yaze::gui::kDefaultModalSize, and yaze::editor::EditorManager::version().
Referenced by Initialize().

|
private |
Definition at line 273 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 237 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 309 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 359 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 566 of file popup_manager.cc.
References yaze::editor::EditorManager::CreateNewProjectFromRom(), editor_manager_, yaze::editor::EditorManager::GetCurrentProject(), 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::project::YazeProject::labels_filename, yaze::util::MakeRomFileDialogOptions(), yaze::editor::EditorManager::MarkCurrentProjectDirty(), yaze::editor::EditorManager::SaveProject(), SetStatus(), yaze::util::FileDialogWrapper::ShowOpenFileDialog(), yaze::util::FileDialogWrapper::ShowOpenFolderDialog(), and yaze::util::FileDialogWrapper::ShowSaveFileDialog().
Referenced by Initialize().
|
private |
Definition at line 669 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 804 of file popup_manager.cc.
References Hide(), and yaze::gui::kDefaultModalSize.
Referenced by Initialize().

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

|
private |
Definition at line 835 of file popup_manager.cc.
References Hide(), yaze::gui::kDefaultModalSize, and YAZE_VERSION_STRING.
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 876 of file popup_manager.cc.
References Hide(), and yaze::gui::kDefaultModalSize.
Referenced by Initialize().

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

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

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

|
private |
Definition at line 951 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 1007 of file popup_manager.cc.
References Hide(), and yaze::gui::kDefaultModalSize.
Referenced by Initialize().

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

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

|
private |
Definition at line 1071 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 1172 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::GetCurrentSessionIndex(), 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 1260 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 1303 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 1343 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 1371 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 422 of file popup_manager.cc.
References yaze::editor::EditorManager::DiscardPendingRomBackupRestore(), 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, ICON_MD_UNDO, yaze::Rom::is_loaded(), yaze::editor::EditorManager::IsRomBackupRestorePending(), 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 1417 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::editor::EditorManager::ResumePendingRomSave(), yaze::project::RomRoleToString(), yaze::project::RomWritePolicyToString(), and yaze::editor::EditorManager::toast_manager().
Referenced by Initialize().
|
private |
Definition at line 1482 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::ResumePendingRomSave(), and yaze::editor::EditorManager::toast_manager().
Referenced by Initialize().
|
private |
Definition at line 1554 of file popup_manager.cc.
References yaze::editor::EditorManager::CancelPendingUnsavedSessionAction(), yaze::editor::EditorManager::ConfirmPendingUnsavedSessionActionDiscardAndContinue(), yaze::editor::EditorManager::ConfirmPendingUnsavedSessionActionSaveAndContinue(), editor_manager_, yaze::editor::EditorManager::GetPendingUnsavedSessionActionContinueLabel(), yaze::editor::EditorManager::GetPendingUnsavedSessionActionPrompt(), yaze::editor::EditorManager::GetPendingUnsavedSessionActionSaveLabel(), yaze::editor::EditorManager::HasPendingUnsavedSessionAction(), Hide(), ICON_MD_WARNING, yaze::gui::kDefaultModalSize, and yaze::editor::PopupID::kUnsavedSessionChanges.
Referenced by Initialize().
|
private |
Definition at line 194 of file popup_manager.h.
Referenced by DrawAboutPopup(), DrawDisplaySettingsPopup(), DrawDungeonPotItemSaveConfirmPopup(), DrawLayoutPresetsPopup(), DrawNewProjectPopup(), DrawRomBackupManagerPopup(), DrawRomInfoPopup(), DrawRomWriteConfirmPopup(), DrawSaveAsPopup(), DrawSessionManagerPopup(), DrawUnsavedSessionChangesPopup(), and DrawWriteConflictWarningPopup().
|
private |
Definition at line 195 of file popup_manager.h.
Referenced by DrawPopups(), Hide(), Initialize(), IsVisible(), and Show().
|
private |
Definition at line 196 of file popup_manager.h.
Referenced by DrawStatusPopup(), GetStatus(), and SetStatus().
|
private |
Definition at line 197 of file popup_manager.h.
Referenced by DrawStatusPopup(), and SetStatus().
|
private |
Definition at line 198 of file popup_manager.h.
Referenced by DrawStatusPopup(), and SetStatus().