yaze 0.3.2
Link to the Past ROM Editor
 
Loading...
Searching...
No Matches
yaze::editor::PopupManager Class Reference

#include <popup_manager.h>

Collaboration diagram for yaze::editor::PopupManager:

Classes

struct  SaveAsState
 

Public Member Functions

 PopupManager (EditorManager *editor_manager)
 
void Initialize ()
 
void DrawPopups ()
 
void Show (const char *name)
 
void RegisterPopup (const std::string &name, PopupType type, std::function< void()> draw_function, bool allow_resize=false)
 
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 ResetSaveAsState ()
 
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 DrawComingFromZScreamPopup ()
 
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

struct yaze::editor::PopupManager::SaveAsState save_as_
 
EditorManager * editor_manager_
 
std::unordered_map< std::string, PopupParams > popups_
 
uint64_t next_shown_order_ = 1
 
absl::Status status_
 
bool show_status_ = false
 
absl::Status prev_status_
 

Detailed Description

Definition at line 116 of file popup_manager.h.

Constructor & Destructor Documentation

◆ PopupManager()

yaze::editor::PopupManager::PopupManager ( EditorManager * editor_manager)

Definition at line 35 of file popup_manager.cc.

Member Function Documentation

◆ Initialize()

void yaze::editor::PopupManager::Initialize ( )

Definition at line 38 of file popup_manager.cc.

References DrawAboutPopup(), DrawAsarIntegrationPopup(), DrawBuildInstructionsPopup(), DrawCLIUsagePopup(), DrawComingFromZScreamPopup(), 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::PopupID::kComingFromZScream, 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_.

◆ DrawPopups()

void yaze::editor::PopupManager::DrawPopups ( )

◆ Show()

◆ RegisterPopup()

void yaze::editor::PopupManager::RegisterPopup ( const std::string & name,
PopupType type,
std::function< void()> draw_function,
bool allow_resize = false )

◆ Hide()

◆ IsVisible()

bool yaze::editor::PopupManager::IsVisible ( const char * name) const

Definition at line 243 of file popup_manager.cc.

References popups_.

◆ SetStatus()

void yaze::editor::PopupManager::SetStatus ( const absl::Status & status)

Definition at line 256 of file popup_manager.cc.

References prev_status_, show_status_, and status_.

Referenced by DrawNewProjectPopup().

◆ GetStatus()

absl::Status yaze::editor::PopupManager::GetStatus ( ) const
inline

Definition at line 144 of file popup_manager.h.

References status_.

◆ BeginCentered()

bool yaze::editor::PopupManager::BeginCentered ( const char * name)
private

Definition at line 264 of file popup_manager.cc.

Referenced by DrawStatusPopup().

◆ DrawAboutPopup()

void yaze::editor::PopupManager::DrawAboutPopup ( )
private

Definition at line 297 of file popup_manager.cc.

References editor_manager_, Hide(), yaze::gui::kDefaultModalSize, and yaze::editor::EditorManager::version().

Referenced by Initialize().

Here is the call graph for this function:

◆ DrawRomInfoPopup()

◆ DrawStatusPopup()

void yaze::editor::PopupManager::DrawStatusPopup ( )
private

Definition at line 274 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().

Here is the call graph for this function:

◆ DrawSaveAsPopup()

◆ ResetSaveAsState()

void yaze::editor::PopupManager::ResetSaveAsState ( )
private

Definition at line 367 of file popup_manager.cc.

References save_as_.

Referenced by DrawSaveAsPopup(), Hide(), and Show().

◆ DrawSaveScopePopup()

void yaze::editor::PopupManager::DrawSaveScopePopup ( )
private

Definition at line 488 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().

Here is the call graph for this function:

◆ DrawNewProjectPopup()

◆ DrawSupportedFeaturesPopup()

void yaze::editor::PopupManager::DrawSupportedFeaturesPopup ( )
private

◆ DrawOpenRomHelpPopup()

void yaze::editor::PopupManager::DrawOpenRomHelpPopup ( )
private

Definition at line 942 of file popup_manager.cc.

References Hide(), and yaze::gui::kDefaultModalSize.

Referenced by Initialize().

Here is the call graph for this function:

◆ DrawManageProjectPopup()

void yaze::editor::PopupManager::DrawManageProjectPopup ( )
private

Definition at line 958 of file popup_manager.cc.

References Hide(), and yaze::gui::kDefaultModalSize.

Referenced by Initialize().

Here is the call graph for this function:

◆ DrawGettingStartedPopup()

void yaze::editor::PopupManager::DrawGettingStartedPopup ( )
private

Definition at line 973 of file popup_manager.cc.

References Hide(), yaze::gui::kDefaultModalSize, and YAZE_VERSION_STRING.

Referenced by Initialize().

Here is the call graph for this function:

◆ DrawAsarIntegrationPopup()

void yaze::editor::PopupManager::DrawAsarIntegrationPopup ( )
private

Definition at line 999 of file popup_manager.cc.

References Hide(), and yaze::gui::kDefaultModalSize.

Referenced by Initialize().

Here is the call graph for this function:

◆ DrawBuildInstructionsPopup()

void yaze::editor::PopupManager::DrawBuildInstructionsPopup ( )
private

Definition at line 1015 of file popup_manager.cc.

References Hide(), and yaze::gui::kDefaultModalSize.

Referenced by Initialize().

Here is the call graph for this function:

◆ DrawCLIUsagePopup()

void yaze::editor::PopupManager::DrawCLIUsagePopup ( )
private

Definition at line 1034 of file popup_manager.cc.

References Hide(), and yaze::gui::kDefaultModalSize.

Referenced by Initialize().

Here is the call graph for this function:

◆ DrawTroubleshootingPopup()

void yaze::editor::PopupManager::DrawTroubleshootingPopup ( )
private

Definition at line 1055 of file popup_manager.cc.

References Hide(), and yaze::gui::kDefaultModalSize.

Referenced by Initialize().

Here is the call graph for this function:

◆ DrawContributingPopup()

void yaze::editor::PopupManager::DrawContributingPopup ( )
private

Definition at line 1074 of file popup_manager.cc.

References Hide(), and yaze::gui::kDefaultModalSize.

Referenced by Initialize().

Here is the call graph for this function:

◆ DrawWhatsNewPopup()

void yaze::editor::PopupManager::DrawWhatsNewPopup ( )
private

◆ DrawComingFromZScreamPopup()

void yaze::editor::PopupManager::DrawComingFromZScreamPopup ( )
private

Definition at line 1146 of file popup_manager.cc.

References Hide(), ICON_MD_APPS, ICON_MD_DASHBOARD, ICON_MD_FOLDER, ICON_MD_LANDSCAPE, ICON_MD_SAVE, yaze::editor::PopupID::kComingFromZScream, and yaze::gui::kDefaultModalSize.

Referenced by Initialize().

Here is the call graph for this function:

◆ DrawWorkspaceHelpPopup()

void yaze::editor::PopupManager::DrawWorkspaceHelpPopup ( )
private

Definition at line 1224 of file popup_manager.cc.

References Hide(), and yaze::gui::kDefaultModalSize.

Referenced by Initialize().

Here is the call graph for this function:

◆ DrawSessionLimitWarningPopup()

void yaze::editor::PopupManager::DrawSessionLimitWarningPopup ( )
private

Definition at line 1254 of file popup_manager.cc.

References yaze::gui::GetWarningColor(), Hide(), ICON_MD_WARNING, and yaze::gui::kDefaultModalSize.

Referenced by Initialize().

Here is the call graph for this function:

◆ DrawLayoutResetConfirmPopup()

void yaze::editor::PopupManager::DrawLayoutResetConfirmPopup ( )
private

Definition at line 1271 of file popup_manager.cc.

References yaze::gui::GetWarningColor(), Hide(), ICON_MD_WARNING, and yaze::gui::kDefaultModalSize.

Referenced by Initialize().

Here is the call graph for this function:

◆ DrawLayoutPresetsPopup()

◆ DrawSessionManagerPopup()

◆ DrawDisplaySettingsPopup()

◆ DrawFeatureFlagsPopup()

◆ DrawDataIntegrityPopup()

void yaze::editor::PopupManager::DrawDataIntegrityPopup ( )
private

Definition at line 1560 of file popup_manager.cc.

References yaze::gui::GetSuccessColor(), Hide(), yaze::editor::PopupID::kDataIntegrity, and yaze::gui::kDefaultModalSize.

Referenced by Initialize().

Here is the call graph for this function:

◆ DrawDungeonPotItemSaveConfirmPopup()

◆ DrawRomBackupManagerPopup()

◆ DrawRomWriteConfirmPopup()

◆ DrawWriteConflictWarningPopup()

◆ DrawUnsavedSessionChangesPopup()

Member Data Documentation

◆ save_as_

struct yaze::editor::PopupManager::SaveAsState yaze::editor::PopupManager::save_as_
private

◆ editor_manager_

◆ popups_

std::unordered_map<std::string, PopupParams> yaze::editor::PopupManager::popups_
private

Definition at line 215 of file popup_manager.h.

Referenced by DrawPopups(), Hide(), Initialize(), IsVisible(), RegisterPopup(), and Show().

◆ next_shown_order_

uint64_t yaze::editor::PopupManager::next_shown_order_ = 1
private

Definition at line 216 of file popup_manager.h.

Referenced by Show().

◆ status_

absl::Status yaze::editor::PopupManager::status_
private

Definition at line 217 of file popup_manager.h.

Referenced by DrawStatusPopup(), GetStatus(), and SetStatus().

◆ show_status_

bool yaze::editor::PopupManager::show_status_ = false
private

Definition at line 218 of file popup_manager.h.

Referenced by DrawStatusPopup(), and SetStatus().

◆ prev_status_

absl::Status yaze::editor::PopupManager::prev_status_
private

Definition at line 219 of file popup_manager.h.

Referenced by DrawStatusPopup(), and SetStatus().


The documentation for this class was generated from the following files: