Manages the settings UI displayed in the right sidebar. More...
#include <settings_panel.h>

Public Member Functions | |
| SettingsPanel () | |
| void | SetDependencies (const EditorDependencies &deps) override |
| void | Initialize () override |
| absl::Status | Load () override |
| absl::Status | Save () override |
| absl::Status | Update () override |
| absl::Status | Undo () override |
| absl::Status | Redo () override |
| absl::Status | Cut () override |
| absl::Status | Copy () override |
| absl::Status | Paste () override |
| absl::Status | Find () override |
| void | SetUserSettings (UserSettings *settings) |
| void | SetPanelManager (PanelManager *registry) |
| void | SetPanelRegistry (PanelManager *registry) |
| void | SetShortcutManager (ShortcutManager *manager) |
| void | SetStatusBar (StatusBar *bar) |
| void | SetRom (Rom *rom) |
| void | SetProject (project::YazeProject *project) |
| void | Draw () |
Public Member Functions inherited from yaze::editor::Editor | |
| Editor ()=default | |
| virtual | ~Editor ()=default |
| virtual void | SetGameData (zelda3::GameData *game_data) |
| virtual std::string | GetUndoDescription () const |
| virtual std::string | GetRedoDescription () const |
| const UndoManager & | undo_manager () const |
| virtual absl::Status | Clear () |
| EditorType | type () const |
| bool * | active () |
| void | set_active (bool active) |
| void | toggle_active () |
| virtual bool | IsRomLoaded () const |
| virtual std::string | GetRomStatus () const |
| Rom * | rom () const |
| zelda3::GameData * | game_data () const |
| EditorContext | context () const |
| bool | HasContext () const |
Private Member Functions | |
| void | DrawGeneralSettings () |
| void | DrawAppearanceSettings () |
| void | DrawEditorBehavior () |
| void | DrawPerformanceSettings () |
| void | DrawAIAgentSettings () |
| void | DrawFilesystemSettings () |
| void | DrawKeyboardShortcuts () |
| void | DrawGlobalShortcuts () |
| void | DrawEditorShortcuts () |
| void | DrawPanelShortcuts () |
| bool | MatchesShortcutFilter (const std::string &text) const |
| void | DrawPatchSettings () |
| void | DrawProjectSettings () |
| void | DrawPatchList (const std::string &folder) |
| void | DrawPatchDetails () |
| void | DrawParameterWidget (core::PatchParameter *param) |
Private Attributes | |
| UserSettings * | user_settings_ = nullptr |
| PanelManager * | panel_manager_ = nullptr |
| ShortcutManager * | shortcut_manager_ = nullptr |
| StatusBar * | status_bar_ = nullptr |
| Rom * | rom_ = nullptr |
| project::YazeProject * | project_ = nullptr |
| char | shortcut_edit_buffer_ [64] = {} |
| std::string | editing_card_id_ |
| bool | is_editing_shortcut_ = false |
| std::string | shortcut_filter_ |
| core::PatchManager | patch_manager_ |
| std::string | selected_folder_ |
| core::AsmPatch * | selected_patch_ = nullptr |
| bool | patches_loaded_ = false |
Additional Inherited Members | |
Protected Member Functions inherited from yaze::editor::Editor | |
| std::string | MakePanelTitle (const std::string &base_title) const |
| std::string | MakePanelId (const std::string &base_id) const |
| template<typename T > | |
| absl::StatusOr< T > | SafeRomAccess (std::function< T()> accessor, const std::string &operation="") const |
Protected Attributes inherited from yaze::editor::Editor | |
| bool | active_ = false |
| EditorType | type_ |
| EditorDependencies | dependencies_ |
| UndoManager | undo_manager_ |
Manages the settings UI displayed in the right sidebar.
Replaces the old SettingsEditor. Handles configuration of:
Definition at line 34 of file settings_panel.h.
|
inline |
Definition at line 36 of file settings_panel.h.
References yaze::editor::kSettings, and yaze::editor::Editor::type_.
|
overridevirtual |
Reimplemented from yaze::editor::Editor.
Definition at line 37 of file settings_panel.cc.
References yaze::editor::EditorDependencies::panel_manager, yaze::editor::EditorDependencies::project, yaze::editor::EditorDependencies::rom, yaze::editor::Editor::SetDependencies(), SetPanelManager(), SetProject(), SetRom(), SetShortcutManager(), SetStatusBar(), SetUserSettings(), yaze::editor::EditorDependencies::shortcut_manager, yaze::editor::EditorDependencies::status_bar, and yaze::editor::EditorDependencies::user_settings.
|
inlineoverridevirtual |
Implements yaze::editor::Editor.
Definition at line 42 of file settings_panel.h.
|
inlineoverridevirtual |
Implements yaze::editor::Editor.
Definition at line 43 of file settings_panel.h.
|
inlineoverridevirtual |
Implements yaze::editor::Editor.
Definition at line 44 of file settings_panel.h.
|
inlineoverridevirtual |
Implements yaze::editor::Editor.
Definition at line 45 of file settings_panel.h.
References Draw().

|
inlineoverridevirtual |
Implements yaze::editor::Editor.
Definition at line 47 of file settings_panel.h.
|
inlineoverridevirtual |
Implements yaze::editor::Editor.
Definition at line 48 of file settings_panel.h.
|
inlineoverridevirtual |
Implements yaze::editor::Editor.
Definition at line 49 of file settings_panel.h.
|
inlineoverridevirtual |
Implements yaze::editor::Editor.
Definition at line 50 of file settings_panel.h.
|
inlineoverridevirtual |
Implements yaze::editor::Editor.
Definition at line 51 of file settings_panel.h.
|
inlineoverridevirtual |
Implements yaze::editor::Editor.
Definition at line 52 of file settings_panel.h.
|
inline |
Definition at line 54 of file settings_panel.h.
References user_settings_.
Referenced by yaze::editor::EditorSet::set_user_settings(), and SetDependencies().
|
inline |
Definition at line 55 of file settings_panel.h.
References panel_manager_.
Referenced by SetDependencies(), and SetPanelRegistry().
|
inline |
Definition at line 57 of file settings_panel.h.
References SetPanelManager().

|
inline |
Definition at line 58 of file settings_panel.h.
References shortcut_manager_.
Referenced by SetDependencies().
|
inline |
Definition at line 59 of file settings_panel.h.
References status_bar_.
Referenced by SetDependencies().
|
inline |
Definition at line 60 of file settings_panel.h.
References yaze::editor::Editor::rom(), and rom_.
Referenced by SetDependencies().

|
inline |
Definition at line 61 of file settings_panel.h.
References project_.
Referenced by SetDependencies().
| void yaze::editor::SettingsPanel::Draw | ( | ) |
Definition at line 259 of file settings_panel.cc.
References DrawAIAgentSettings(), DrawAppearanceSettings(), DrawEditorBehavior(), DrawFilesystemSettings(), DrawGeneralSettings(), DrawKeyboardShortcuts(), DrawPatchSettings(), DrawPerformanceSettings(), DrawProjectSettings(), ICON_MD_EXTENSION, ICON_MD_FOLDER, ICON_MD_KEYBOARD, ICON_MD_PALETTE, ICON_MD_SETTINGS, ICON_MD_SMART_TOY, ICON_MD_SPEED, ICON_MD_STORAGE, ICON_MD_TUNE, and user_settings_.
Referenced by yaze::editor::RightPanelManager::DrawSettingsPanel(), and Update().
|
private |
Definition at line 332 of file settings_panel.cc.
References yaze::gui::FlagsMenu::DrawDungeonFlags(), yaze::gui::FlagsMenu::DrawOverworldFlags(), yaze::gui::FlagsMenu::DrawResourceFlags(), yaze::gui::FlagsMenu::DrawSystemFlags(), yaze::gui::FlagsMenu::DrawZSCustomOverworldFlags(), ICON_MD_CASTLE, ICON_MD_EXTENSION, ICON_MD_FLAG, ICON_MD_FOLDER_SPECIAL, ICON_MD_MAP, and rom_.
Referenced by Draw().
|
private |
Definition at line 825 of file settings_panel.cc.
References yaze::gui::Theme::accent, yaze::gui::Animator::ClampMotionProfile(), yaze::gui::ConvertColorToImVec4(), yaze::gui::DrawFontManager(), yaze::editor::UserSettings::Preferences::font_global_scale, yaze::gui::ThemeManager::Get(), yaze::gui::GetAnimator(), ICON_MD_CHECK, ICON_MD_HORIZONTAL_RULE, ICON_MD_PALETTE, ICON_MD_REFRESH, yaze::editor::UserSettings::prefs(), yaze::gui::Theme::primary, yaze::editor::UserSettings::Preferences::reduced_motion, yaze::editor::UserSettings::Save(), yaze::editor::StatusBar::SetEnabled(), yaze::gui::Animator::SetMotionPreferences(), yaze::editor::UserSettings::Preferences::show_status_bar, status_bar_, yaze::gui::Theme::surface, and user_settings_.
Referenced by Draw().
|
private |
Definition at line 1038 of file settings_panel.cc.
References yaze::editor::UserSettings::Preferences::autosave_enabled, yaze::editor::UserSettings::Preferences::autosave_interval, yaze::editor::UserSettings::Preferences::backup_before_save, yaze::editor::UserSettings::Preferences::default_editor, ICON_MD_EDIT, ICON_MD_HISTORY, ICON_MD_LABEL, ICON_MD_SAVE, yaze::editor::UserSettings::Preferences::prefer_hmagic_sprite_names, yaze::editor::UserSettings::prefs(), yaze::editor::UserSettings::Preferences::recent_files_limit, yaze::editor::UserSettings::Save(), yaze::zelda3::SetPreferHmagicSpriteNames(), and user_settings_.
Referenced by Draw().

|
private |
Definition at line 1095 of file settings_panel.cc.
References yaze::editor::UserSettings::Preferences::cache_size_mb, ICON_MD_IMAGE, ICON_MD_MEMORY, yaze::editor::UserSettings::prefs(), yaze::editor::UserSettings::Save(), yaze::editor::UserSettings::Preferences::target_fps, yaze::editor::UserSettings::Preferences::undo_history_size, user_settings_, and yaze::editor::UserSettings::Preferences::vsync.
Referenced by Draw().

|
private |
Definition at line 1131 of file settings_panel.cc.
References yaze::editor::UserSettings::Preferences::ai_auto_learn, yaze::editor::UserSettings::Preferences::ai_hosts, yaze::editor::UserSettings::Preferences::ai_max_tokens, yaze::editor::UserSettings::Preferences::ai_multimodal, yaze::editor::UserSettings::Preferences::ai_proactive, yaze::editor::UserSettings::Preferences::ai_temperature, yaze::editor::UserSettings::Preferences::AiHost::allow_insecure, yaze::editor::UserSettings::Preferences::AiHost::api_type, yaze::editor::UserSettings::Preferences::AiHost::base_url, yaze::util::PlatformPaths::GetHomeDirectory(), ICON_MD_ADD, ICON_MD_BOLT, ICON_MD_CLOUD, ICON_MD_DELETE, ICON_MD_FOLDER, ICON_MD_FOLDER_OPEN, ICON_MD_HOME, ICON_MD_PSYCHOLOGY, ICON_MD_STORAGE, ICON_MD_SYNC, ICON_MD_TERMINAL, ICON_MD_TUNE, ICON_MD_VPN_KEY, yaze::editor::UserSettings::Preferences::AiHost::label, yaze::editor::UserSettings::Preferences::log_level, yaze::util::PlatformPaths::NormalizePathForDisplay(), yaze::editor::UserSettings::prefs(), yaze::editor::UserSettings::Save(), yaze::util::FileDialogWrapper::ShowOpenFolderDialog(), yaze::editor::UserSettings::Preferences::AiHost::supports_streaming, yaze::editor::UserSettings::Preferences::AiHost::supports_tools, and user_settings_.
Referenced by Draw().
|
private |
Definition at line 688 of file settings_panel.cc.
References yaze::util::PlatformPaths::GetUserDocumentsDirectory(), yaze::util::PlatformPaths::GetUserDocumentsSubdirectory(), ICON_MD_ADD, ICON_MD_BOLT, ICON_MD_CLOUD, ICON_MD_DELETE, ICON_MD_FOLDER_OPEN, ICON_MD_HOME, ICON_MD_SYNC, yaze::util::PlatformPaths::NormalizePathForDisplay(), yaze::editor::UserSettings::prefs(), yaze::editor::UserSettings::Preferences::project_root_paths, yaze::editor::UserSettings::Save(), yaze::util::FileDialogWrapper::ShowOpenFolderDialog(), and user_settings_.
Referenced by Draw().
|
private |
Definition at line 1558 of file settings_panel.cc.
References DrawEditorShortcuts(), DrawGlobalShortcuts(), DrawPanelShortcuts(), ICON_MD_KEYBOARD, and shortcut_filter_.
Referenced by Draw().

|
private |
Definition at line 1596 of file settings_panel.cc.
References yaze::editor::ShortcutManager::GetShortcutsByScope(), yaze::editor::UserSettings::Preferences::global_shortcuts, yaze::editor::Shortcut::kGlobal, MatchesShortcutFilter(), yaze::editor::ParseShortcut(), yaze::editor::UserSettings::prefs(), yaze::editor::PrintShortcut(), yaze::editor::UserSettings::Save(), shortcut_manager_, yaze::editor::ShortcutManager::UpdateShortcutKeys(), and user_settings_.
Referenced by DrawKeyboardShortcuts().
|
private |
Definition at line 1657 of file settings_panel.cc.
References yaze::editor::UserSettings::Preferences::editor_shortcuts, yaze::editor::ShortcutManager::GetShortcutsByScope(), yaze::editor::Shortcut::kEditor, MatchesShortcutFilter(), yaze::editor::ParseShortcut(), yaze::editor::UserSettings::prefs(), yaze::editor::PrintShortcut(), yaze::editor::UserSettings::Save(), shortcut_manager_, yaze::editor::ShortcutManager::UpdateShortcutKeys(), and user_settings_.
Referenced by DrawKeyboardShortcuts().
|
private |
Definition at line 1727 of file settings_panel.cc.
References editing_card_id_, yaze::editor::PanelManager::GetAllCategories(), yaze::editor::PanelManager::GetPanelsInCategory(), ICON_MD_CLOSE, is_editing_shortcut_, MatchesShortcutFilter(), panel_manager_, yaze::editor::UserSettings::Preferences::panel_shortcuts, yaze::editor::ParseShortcut(), yaze::editor::UserSettings::prefs(), yaze::editor::PrintShortcut(), yaze::editor::UserSettings::Save(), shortcut_edit_buffer_, and user_settings_.
Referenced by DrawKeyboardShortcuts().
|
private |
Definition at line 1587 of file settings_panel.cc.
References shortcut_filter_.
Referenced by DrawEditorShortcuts(), DrawGlobalShortcuts(), and DrawPanelShortcuts().
|
private |
Definition at line 1819 of file settings_panel.cc.
References yaze::core::PatchManager::ApplyEnabledPatches(), yaze::gui::BeginThemedTabBar(), DrawPatchDetails(), DrawPatchList(), yaze::gui::EndThemedTabBar(), yaze::util::PlatformPaths::FindAsset(), yaze::core::PatchManager::folders(), yaze::core::PatchManager::GetEnabledPatchCount(), ICON_MD_CHECK, ICON_MD_EXTENSION, ICON_MD_REFRESH, ICON_MD_SAVE, yaze::Rom::is_loaded(), yaze::core::PatchManager::LoadPatches(), LOG_ERROR, LOG_INFO, LOG_WARN, patch_manager_, yaze::core::PatchManager::patches(), patches_loaded_, rom_, yaze::core::PatchManager::SaveAllPatches(), selected_folder_, and selected_patch_.
Referenced by Draw().
|
private |
Definition at line 365 of file settings_panel.cc.
References yaze::project::WorkspaceSettings::backup_keep_daily, yaze::project::WorkspaceSettings::backup_keep_daily_days, yaze::project::WorkspaceSettings::backup_on_save, yaze::project::WorkspaceSettings::backup_retention_count, yaze::core::HackManifest::build_pipeline(), yaze::project::YazeProject::build_target, yaze::util::ComputeRomHash(), yaze::Rom::data(), yaze::project::YazeProject::dungeon_overlay, yaze::project::RomMetadata::expected_hash, yaze::core::HackManifest::feature_flags(), yaze::Rom::filename(), yaze::project::YazeProject::filepath, yaze::project::YazeProject::git_repository, yaze::project::YazeProject::hack_manifest, yaze::project::YazeProject::hack_manifest_file, yaze::core::HackManifest::hack_name(), ICON_MD_BACKUP, ICON_MD_BUILD, ICON_MD_CODE, ICON_MD_FLAG, ICON_MD_FOLDER_OPEN, ICON_MD_INFO, ICON_MD_LABEL, ICON_MD_TRAIN, ICON_MD_VIDEOGAME_ASSET, yaze::Rom::is_loaded(), yaze::core::HackManifest::loaded(), yaze::core::HackManifest::manifest_version(), yaze::core::HackManifest::message_layout(), yaze::project::DungeonOverlaySettings::minecart_sprite_ids, yaze::project::YazeProject::name, yaze::project::YazeProject::output_folder, project_, yaze::project::YazeProject::ReloadHackManifest(), yaze::project::RomMetadata::role, rom_, yaze::project::YazeProject::rom_backup_folder, yaze::project::YazeProject::rom_metadata, yaze::core::HackManifest::room_tags(), yaze::project::YazeProject::Save(), yaze::Rom::size(), yaze::project::YazeProject::symbols_filename, yaze::core::HackManifest::total_hooks(), yaze::project::DungeonOverlaySettings::track_object_ids, yaze::project::DungeonOverlaySettings::track_stop_tiles, yaze::project::DungeonOverlaySettings::track_switch_tiles, yaze::project::DungeonOverlaySettings::track_tiles, yaze::project::YazeProject::workspace_settings, and yaze::project::RomMetadata::write_policy.
Referenced by Draw().
|
private |
Definition at line 1912 of file settings_panel.cc.
References yaze::core::PatchManager::GetPatchesInFolder(), patch_manager_, and selected_patch_.
Referenced by DrawPatchSettings().

|
private |
Definition at line 1945 of file settings_panel.cc.
References yaze::core::AsmPatch::author(), yaze::core::AsmPatch::description(), DrawParameterWidget(), ICON_MD_INFO, ICON_MD_TUNE, yaze::core::AsmPatch::mutable_parameters(), yaze::core::AsmPatch::name(), selected_patch_, and yaze::core::AsmPatch::version().
Referenced by DrawPatchSettings().
|
private |
Definition at line 1979 of file settings_panel.cc.
References yaze::core::PatchParameter::checked_value, yaze::core::PatchParameter::choices, yaze::core::PatchParameter::define_name, yaze::core::PatchParameter::display_name, yaze::core::kBitfield, yaze::core::kBool, yaze::core::kByte, yaze::core::kChoice, yaze::core::kItem, yaze::core::kLong, yaze::core::kWord, yaze::core::PatchParameter::max_value, yaze::core::PatchParameter::min_value, yaze::core::PatchParameter::type, yaze::core::PatchParameter::unchecked_value, yaze::core::PatchParameter::use_decimal, and yaze::core::PatchParameter::value.
Referenced by DrawPatchDetails().
|
private |
Definition at line 84 of file settings_panel.h.
Referenced by Draw(), DrawAIAgentSettings(), DrawAppearanceSettings(), DrawEditorBehavior(), DrawEditorShortcuts(), DrawFilesystemSettings(), DrawGlobalShortcuts(), DrawPanelShortcuts(), DrawPerformanceSettings(), and SetUserSettings().
|
private |
Definition at line 85 of file settings_panel.h.
Referenced by DrawPanelShortcuts(), and SetPanelManager().
|
private |
Definition at line 86 of file settings_panel.h.
Referenced by DrawEditorShortcuts(), DrawGlobalShortcuts(), and SetShortcutManager().
|
private |
Definition at line 87 of file settings_panel.h.
Referenced by DrawAppearanceSettings(), and SetStatusBar().
|
private |
Definition at line 88 of file settings_panel.h.
Referenced by DrawGeneralSettings(), DrawPatchSettings(), DrawProjectSettings(), and SetRom().
|
private |
Definition at line 89 of file settings_panel.h.
Referenced by DrawProjectSettings(), and SetProject().
|
private |
Definition at line 92 of file settings_panel.h.
Referenced by DrawPanelShortcuts().
|
private |
Definition at line 93 of file settings_panel.h.
Referenced by DrawPanelShortcuts().
|
private |
Definition at line 94 of file settings_panel.h.
Referenced by DrawPanelShortcuts().
|
private |
Definition at line 95 of file settings_panel.h.
Referenced by DrawKeyboardShortcuts(), and MatchesShortcutFilter().
|
private |
Definition at line 98 of file settings_panel.h.
Referenced by DrawPatchList(), and DrawPatchSettings().
|
private |
Definition at line 99 of file settings_panel.h.
Referenced by DrawPatchSettings().
|
private |
Definition at line 100 of file settings_panel.h.
Referenced by DrawPatchDetails(), DrawPatchList(), and DrawPatchSettings().
|
private |
Definition at line 101 of file settings_panel.h.
Referenced by DrawPatchSettings().