Manages the settings UI displayed in the right sidebar. More...
#include <settings_panel.h>
Public Member Functions | |
| SettingsPanel ()=default | |
| 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 () |
Private Member Functions | |
| void | DrawGeneralSettings () |
| void | DrawAppearanceSettings () |
| void | DrawEditorBehavior () |
| void | DrawPerformanceSettings () |
| void | DrawAIAgentSettings () |
| void | DrawKeyboardShortcuts () |
| void | DrawGlobalShortcuts () |
| void | DrawEditorShortcuts () |
| void | DrawPanelShortcuts () |
| 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 |
| core::PatchManager | patch_manager_ |
| std::string | selected_folder_ |
| core::AsmPatch * | selected_patch_ = nullptr |
| bool | patches_loaded_ = false |
Manages the settings UI displayed in the right sidebar.
Replaces the old SettingsEditor. Handles configuration of:
Definition at line 33 of file settings_panel.h.
|
default |
|
inline |
Definition at line 37 of file settings_panel.h.
References user_settings_.
|
inline |
Definition at line 38 of file settings_panel.h.
References panel_manager_.
Referenced by SetPanelRegistry().
|
inline |
Definition at line 40 of file settings_panel.h.
References SetPanelManager().

|
inline |
Definition at line 41 of file settings_panel.h.
References shortcut_manager_.
|
inline |
Definition at line 42 of file settings_panel.h.
References status_bar_.
|
inline |
Definition at line 43 of file settings_panel.h.
References rom_.
|
inline |
Definition at line 44 of file settings_panel.h.
References project_.
| void yaze::editor::SettingsPanel::Draw | ( | ) |
Definition at line 28 of file settings_panel.cc.
References DrawAIAgentSettings(), DrawAppearanceSettings(), DrawEditorBehavior(), 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_TUNE, and user_settings_.
Referenced by yaze::editor::RightPanelManager::DrawSettingsPanel().
|
private |
Definition at line 94 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 176 of file settings_panel.cc.
References yaze::gui::DrawFontManager(), yaze::gui::ThemeManager::Get(), ICON_MD_HORIZONTAL_RULE, ICON_MD_PALETTE, yaze::editor::UserSettings::prefs(), yaze::editor::UserSettings::Save(), yaze::editor::StatusBar::SetEnabled(), yaze::editor::UserSettings::Preferences::show_status_bar, status_bar_, and user_settings_.
Referenced by Draw().
|
private |
Definition at line 228 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 282 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 316 of file settings_panel.cc.
References yaze::editor::UserSettings::Preferences::ai_auto_learn, yaze::editor::UserSettings::Preferences::ai_max_tokens, yaze::editor::UserSettings::Preferences::ai_multimodal, yaze::editor::UserSettings::Preferences::ai_proactive, yaze::editor::UserSettings::Preferences::ai_provider, yaze::editor::UserSettings::Preferences::ai_temperature, yaze::editor::UserSettings::Preferences::gemini_api_key, ICON_MD_CLOUD, ICON_MD_PSYCHOLOGY, ICON_MD_TERMINAL, ICON_MD_TUNE, yaze::editor::UserSettings::Preferences::log_level, yaze::editor::UserSettings::Preferences::ollama_url, yaze::editor::UserSettings::prefs(), yaze::editor::UserSettings::Save(), and user_settings_.
Referenced by Draw().

|
private |
Definition at line 398 of file settings_panel.cc.
References DrawEditorShortcuts(), DrawGlobalShortcuts(), DrawPanelShortcuts(), and ICON_MD_KEYBOARD.
Referenced by Draw().

|
private |
Definition at line 417 of file settings_panel.cc.
References yaze::editor::ShortcutManager::GetShortcutsByScope(), yaze::editor::UserSettings::Preferences::global_shortcuts, yaze::editor::Shortcut::kGlobal, 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 467 of file settings_panel.cc.
References yaze::editor::UserSettings::Preferences::editor_shortcuts, yaze::editor::ShortcutManager::GetShortcutsByScope(), yaze::editor::Shortcut::kEditor, 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 517 of file settings_panel.cc.
References editing_card_id_, yaze::editor::PanelManager::GetAllCategories(), yaze::editor::PanelManager::GetPanelsInCategory(), ICON_MD_CLOSE, is_editing_shortcut_, 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 591 of file settings_panel.cc.
References yaze::core::PatchManager::ApplyEnabledPatches(), DrawPatchDetails(), DrawPatchList(), 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 127 of file settings_panel.cc.
References yaze::project::YazeProject::build_target, yaze::project::YazeProject::filepath, yaze::project::YazeProject::git_repository, ICON_MD_BUILD, ICON_MD_FOLDER_OPEN, ICON_MD_INFO, yaze::project::YazeProject::name, yaze::project::YazeProject::output_folder, project_, yaze::project::YazeProject::Save(), and yaze::project::YazeProject::symbols_filename.
Referenced by Draw().

|
private |
Definition at line 683 of file settings_panel.cc.
References yaze::core::PatchManager::GetPatchesInFolder(), patch_manager_, and selected_patch_.
Referenced by DrawPatchSettings().

|
private |
Definition at line 716 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 749 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 65 of file settings_panel.h.
Referenced by Draw(), DrawAIAgentSettings(), DrawAppearanceSettings(), DrawEditorBehavior(), DrawEditorShortcuts(), DrawGlobalShortcuts(), DrawPanelShortcuts(), DrawPerformanceSettings(), and SetUserSettings().
|
private |
Definition at line 66 of file settings_panel.h.
Referenced by DrawPanelShortcuts(), and SetPanelManager().
|
private |
Definition at line 67 of file settings_panel.h.
Referenced by DrawEditorShortcuts(), DrawGlobalShortcuts(), and SetShortcutManager().
|
private |
Definition at line 68 of file settings_panel.h.
Referenced by DrawAppearanceSettings(), and SetStatusBar().
|
private |
Definition at line 69 of file settings_panel.h.
Referenced by DrawGeneralSettings(), DrawPatchSettings(), and SetRom().
|
private |
Definition at line 70 of file settings_panel.h.
Referenced by DrawProjectSettings(), and SetProject().
|
private |
Definition at line 73 of file settings_panel.h.
Referenced by DrawPanelShortcuts().
|
private |
Definition at line 74 of file settings_panel.h.
Referenced by DrawPanelShortcuts().
|
private |
Definition at line 75 of file settings_panel.h.
Referenced by DrawPanelShortcuts().
|
private |
Definition at line 78 of file settings_panel.h.
Referenced by DrawPatchList(), and DrawPatchSettings().
|
private |
Definition at line 79 of file settings_panel.h.
Referenced by DrawPatchSettings().
|
private |
Definition at line 80 of file settings_panel.h.
Referenced by DrawPatchDetails(), DrawPatchList(), and DrawPatchSettings().
|
private |
Definition at line 81 of file settings_panel.h.
Referenced by DrawPatchSettings().