Panel for managing project settings, ROM versions, and snapshots. More...
#include <project_management_panel.h>

Public Types | |
| using | SwapRomCallback = std::function<void()> |
| using | ReloadRomCallback = std::function<void()> |
| using | SaveProjectCallback = std::function<void()> |
| using | BrowseFolderCallback = std::function<void(const std::string& type)> |
Public Member Functions | |
| ProjectManagementPanel ()=default | |
| void | SetProject (project::YazeProject *project) |
| void | SetVersionManager (core::VersionManager *manager) |
| void | SetRom (Rom *rom) |
| void | SetToastManager (ToastManager *manager) |
| void | SetSwapRomCallback (SwapRomCallback cb) |
| void | SetReloadRomCallback (ReloadRomCallback cb) |
| void | SetSaveProjectCallback (SaveProjectCallback cb) |
| void | SetBrowseFolderCallback (BrowseFolderCallback cb) |
| void | Draw () |
Private Member Functions | |
| void | DrawProjectOverview () |
| void | DrawRomManagement () |
| void | DrawVersionControl () |
| void | DrawSnapshotHistory () |
| void | DrawQuickActions () |
Private Attributes | |
| project::YazeProject * | project_ = nullptr |
| core::VersionManager * | version_manager_ = nullptr |
| Rom * | rom_ = nullptr |
| ToastManager * | toast_manager_ = nullptr |
| SwapRomCallback | swap_rom_callback_ |
| ReloadRomCallback | reload_rom_callback_ |
| SaveProjectCallback | save_project_callback_ |
| BrowseFolderCallback | browse_folder_callback_ |
| char | snapshot_message_ [256] = {} |
| bool | show_snapshot_dialog_ = false |
| std::vector< std::string > | history_cache_ |
| bool | history_dirty_ = true |
| bool | project_dirty_ = false |
Panel for managing project settings, ROM versions, and snapshots.
Displayed in the right sidebar when a project is loaded. Features:
Definition at line 29 of file project_management_panel.h.
| using yaze::editor::ProjectManagementPanel::SwapRomCallback = std::function<void()> |
Definition at line 42 of file project_management_panel.h.
| using yaze::editor::ProjectManagementPanel::ReloadRomCallback = std::function<void()> |
Definition at line 43 of file project_management_panel.h.
| using yaze::editor::ProjectManagementPanel::SaveProjectCallback = std::function<void()> |
Definition at line 44 of file project_management_panel.h.
| using yaze::editor::ProjectManagementPanel::BrowseFolderCallback = std::function<void(const std::string& type)> |
Definition at line 45 of file project_management_panel.h.
|
default |
|
inline |
Definition at line 34 of file project_management_panel.h.
References project_.
|
inline |
Definition at line 35 of file project_management_panel.h.
References version_manager_.
|
inline |
Definition at line 38 of file project_management_panel.h.
References rom_.
|
inline |
Definition at line 39 of file project_management_panel.h.
References toast_manager_.
|
inline |
Definition at line 47 of file project_management_panel.h.
References swap_rom_callback_.
|
inline |
Definition at line 48 of file project_management_panel.h.
References reload_rom_callback_.
|
inline |
Definition at line 49 of file project_management_panel.h.
References save_project_callback_.
|
inline |
Definition at line 52 of file project_management_panel.h.
References browse_folder_callback_.
| void yaze::editor::ProjectManagementPanel::Draw | ( | ) |
Definition at line 13 of file project_management_panel.cc.
References DrawProjectOverview(), DrawQuickActions(), DrawRomManagement(), DrawVersionControl(), and project_.
Referenced by yaze::editor::RightPanelManager::DrawProjectPanel().

|
private |
Definition at line 32 of file project_management_panel.cc.
References yaze::project::ProjectMetadata::author, yaze::project::ProjectMetadata::description, yaze::project::YazeProject::filepath, yaze::gui::GetPrimaryVec4(), yaze::gui::GetTextSecondaryVec4(), ICON_MD_FOLDER_SPECIAL, yaze::editor::kInfo, yaze::project::YazeProject::metadata, yaze::project::YazeProject::name, project_, project_dirty_, yaze::editor::ToastManager::Show(), and toast_manager_.
Referenced by Draw().

|
private |
Definition at line 98 of file project_management_panel.cc.
References yaze::gui::ConvertColorToImVec4(), yaze::Rom::dirty(), yaze::gui::ThemeManager::Get(), yaze::gui::ThemeManager::GetCurrentTheme(), yaze::gui::GetPrimaryVec4(), yaze::gui::GetTextSecondaryVec4(), ICON_MD_MEMORY, ICON_MD_REFRESH, ICON_MD_SWAP_HORIZ, ICON_MD_WARNING, yaze::Rom::is_loaded(), project_, reload_rom_callback_, rom_, yaze::project::YazeProject::rom_filename, yaze::Rom::size(), swap_rom_callback_, and yaze::Rom::title().
Referenced by Draw().
|
private |
Definition at line 167 of file project_management_panel.cc.
References yaze::core::VersionManager::CreateSnapshot(), DrawSnapshotHistory(), yaze::core::VersionManager::GetCurrentHash(), yaze::gui::GetPrimaryVec4(), yaze::gui::GetTextSecondaryVec4(), history_dirty_, ICON_MD_ADD, ICON_MD_CAMERA_ALT, ICON_MD_HISTORY, yaze::core::VersionManager::InitializeGit(), yaze::core::VersionManager::IsGitInitialized(), yaze::editor::kError, yaze::editor::kSuccess, yaze::editor::ToastManager::Show(), snapshot_message_, toast_manager_, and version_manager_.
Referenced by Draw().
|
private |
Definition at line 251 of file project_management_panel.cc.
References yaze::core::VersionManager::GetHistory(), yaze::gui::GetTextSecondaryVec4(), history_cache_, history_dirty_, ICON_MD_LIST, yaze::core::VersionManager::IsGitInitialized(), and version_manager_.
Referenced by DrawVersionControl().

|
private |
Definition at line 286 of file project_management_panel.cc.
References yaze::project::YazeProject::assets_folder, browse_folder_callback_, yaze::project::YazeProject::build_script, yaze::project::YazeProject::build_target, yaze::project::YazeProject::code_folder, yaze::gui::ConvertColorToImVec4(), yaze::gui::ThemeManager::Get(), yaze::gui::ThemeManager::GetCurrentTheme(), yaze::gui::GetPrimaryVec4(), yaze::gui::GetTextSecondaryVec4(), ICON_MD_BOLT, ICON_MD_EDIT, ICON_MD_FOLDER_OPEN, ICON_MD_SAVE, project_, project_dirty_, and save_project_callback_.
Referenced by Draw().
|
private |
Definition at line 66 of file project_management_panel.h.
Referenced by Draw(), DrawProjectOverview(), DrawQuickActions(), DrawRomManagement(), and SetProject().
|
private |
Definition at line 67 of file project_management_panel.h.
Referenced by DrawSnapshotHistory(), DrawVersionControl(), and SetVersionManager().
|
private |
Definition at line 68 of file project_management_panel.h.
Referenced by DrawRomManagement(), and SetRom().
|
private |
Definition at line 69 of file project_management_panel.h.
Referenced by DrawProjectOverview(), DrawVersionControl(), and SetToastManager().
|
private |
Definition at line 72 of file project_management_panel.h.
Referenced by DrawRomManagement(), and SetSwapRomCallback().
|
private |
Definition at line 73 of file project_management_panel.h.
Referenced by DrawRomManagement(), and SetReloadRomCallback().
|
private |
Definition at line 74 of file project_management_panel.h.
Referenced by DrawQuickActions(), and SetSaveProjectCallback().
|
private |
Definition at line 75 of file project_management_panel.h.
Referenced by DrawQuickActions(), and SetBrowseFolderCallback().
|
private |
Definition at line 78 of file project_management_panel.h.
Referenced by DrawVersionControl().
|
private |
Definition at line 79 of file project_management_panel.h.
|
private |
Definition at line 82 of file project_management_panel.h.
Referenced by DrawSnapshotHistory().
|
private |
Definition at line 83 of file project_management_panel.h.
Referenced by DrawSnapshotHistory(), and DrawVersionControl().
|
private |
Definition at line 86 of file project_management_panel.h.
Referenced by DrawProjectOverview(), and DrawQuickActions().