#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 180 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 202 of file popup_manager.cc.
References popups_.
Referenced by yaze::editor::MenuOrchestrator::AddAsarIntegrationMenuItems(), yaze::editor::MenuOrchestrator::AddDevelopmentMenuItems(), yaze::editor::MenuOrchestrator::AddFileMenuItems(), yaze::editor::RomLifecycleManager::CheckRomWritePolicy(), yaze::editor::MenuOrchestrator::OnSaveRomAs(), yaze::editor::MenuOrchestrator::OnShowAbout(), yaze::editor::MenuOrchestrator::OnShowBuildInstructions(), yaze::editor::MenuOrchestrator::OnShowCLIUsage(), yaze::editor::MenuOrchestrator::OnShowContributing(), yaze::editor::MenuOrchestrator::OnShowDisplaySettings(), yaze::editor::MenuOrchestrator::OnShowGettingStarted(), yaze::editor::MenuOrchestrator::OnShowLayoutPresets(), yaze::editor::MenuOrchestrator::OnShowRomInfo(), yaze::editor::MenuOrchestrator::OnShowSessionManager(), yaze::editor::MenuOrchestrator::OnShowSupportedFeatures(), yaze::editor::MenuOrchestrator::OnShowTroubleshooting(), yaze::editor::MenuOrchestrator::OnShowWhatsNew(), yaze::editor::UICoordinator::ShowDisplaySettings(), and yaze::editor::UICoordinator::ShowPopup().
| void yaze::editor::PopupManager::Hide | ( | const char * | name | ) |
Definition at line 223 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 236 of file popup_manager.cc.
References popups_.
| void yaze::editor::PopupManager::SetStatus | ( | const absl::Status & | status | ) |
Definition at line 249 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 257 of file popup_manager.cc.
Referenced by DrawStatusPopup().
|
private |
Definition at line 289 of file popup_manager.cc.
References editor_manager_, Hide(), yaze::gui::kDefaultModalSize, and yaze::editor::EditorManager::version().
Referenced by Initialize().

|
private |
Definition at line 301 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 267 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 337 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 387 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 571 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 655 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 794 of file popup_manager.cc.
References Hide(), and yaze::gui::kDefaultModalSize.
Referenced by Initialize().

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

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

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

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

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

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

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

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

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

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

|
private |
Definition at line 1057 of file popup_manager.cc.
References yaze::editor::EditorManager::card_registry(), 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::PanelManager::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::EditorManager::panel_manager(), and yaze::editor::Editor::type().
Referenced by Initialize().
|
private |
Definition at line 1174 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 1263 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 1306 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 1346 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 1374 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 445 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 1420 of file popup_manager.cc.
References yaze::editor::EditorManager::CancelRomWriteConfirm(), yaze::editor::EditorManager::ConfirmRomWrite(), editor_manager_, 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 1472 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().