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

Manages the settings UI displayed in the right sidebar. More...

#include <settings_panel.h>

Inheritance diagram for yaze::editor::SettingsPanel:

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 SetWindowManager (WorkspaceWindowManager *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 absl::Status BeginSaveTransaction ()
 
virtual void RollbackSaveTransaction ()
 
virtual void CommitSaveTransaction ()
 
virtual std::string GetUndoDescription () const
 
virtual std::string GetRedoDescription () const
 
const UndoManagerundo_manager () const
 
virtual absl::Status Clear ()
 
virtual void ContributeStatus (StatusBar *)
 
EditorType type () const
 
bool * active ()
 
void set_active (bool active)
 
void toggle_active ()
 
virtual bool IsRomLoaded () const
 
virtual std::string GetRomStatus () const
 
Romrom () const
 
zelda3::GameDatagame_data () const
 
project::YazeProjectproject () const
 
core::VersionManagerversion_manager () const
 
EditorContext context () const
 
bool HasContext () const
 

Private Member Functions

void DrawGeneralSettings ()
 
void DrawAppearanceSettings ()
 
void DrawWorkspaceSettings ()
 
void ApplyNamedLayoutToDockspace (const std::string &name)
 
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

UserSettingsuser_settings_ = nullptr
 
WorkspaceWindowManagerwindow_manager_ = nullptr
 
ShortcutManagershortcut_manager_ = nullptr
 
StatusBarstatus_bar_ = nullptr
 
Romrom_ = nullptr
 
project::YazeProjectproject_ = 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::AsmPatchselected_patch_ = nullptr
 
bool patches_loaded_ = false
 
std::string workspace_status_message_
 
bool workspace_status_is_error_ = false
 

Additional Inherited Members

- Protected Member Functions inherited from yaze::editor::Editor
std::string MakePanelTitle (const std::string &base_title) const
 
std::string MakeWindowId (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_
 

Detailed Description

Manages the settings UI displayed in the right sidebar.

Replaces the old SettingsEditor. Handles configuration of:

  • General settings (feature flags)
  • Appearance (themes, fonts)
  • Editor behavior
  • Performance
  • AI Agent
  • Keyboard shortcuts
  • Project configuration

Definition at line 34 of file settings_panel.h.

Constructor & Destructor Documentation

◆ SettingsPanel()

yaze::editor::SettingsPanel::SettingsPanel ( )
inline

Definition at line 36 of file settings_panel.h.

References yaze::editor::kSettings, and yaze::editor::Editor::type_.

Member Function Documentation

◆ SetDependencies()

◆ Initialize()

void yaze::editor::SettingsPanel::Initialize ( )
inlineoverridevirtual

Implements yaze::editor::Editor.

Definition at line 40 of file settings_panel.h.

◆ Load()

absl::Status yaze::editor::SettingsPanel::Load ( )
inlineoverridevirtual

Implements yaze::editor::Editor.

Definition at line 41 of file settings_panel.h.

◆ Save()

absl::Status yaze::editor::SettingsPanel::Save ( )
inlineoverridevirtual

Implements yaze::editor::Editor.

Definition at line 42 of file settings_panel.h.

◆ Update()

absl::Status yaze::editor::SettingsPanel::Update ( )
inlineoverridevirtual

Implements yaze::editor::Editor.

Definition at line 43 of file settings_panel.h.

References Draw().

Here is the call graph for this function:

◆ Undo()

absl::Status yaze::editor::SettingsPanel::Undo ( )
inlineoverridevirtual

Implements yaze::editor::Editor.

Definition at line 48 of file settings_panel.h.

◆ Redo()

absl::Status yaze::editor::SettingsPanel::Redo ( )
inlineoverridevirtual

Implements yaze::editor::Editor.

Definition at line 49 of file settings_panel.h.

◆ Cut()

absl::Status yaze::editor::SettingsPanel::Cut ( )
inlineoverridevirtual

Implements yaze::editor::Editor.

Definition at line 50 of file settings_panel.h.

◆ Copy()

absl::Status yaze::editor::SettingsPanel::Copy ( )
inlineoverridevirtual

Implements yaze::editor::Editor.

Definition at line 51 of file settings_panel.h.

◆ Paste()

absl::Status yaze::editor::SettingsPanel::Paste ( )
inlineoverridevirtual

Implements yaze::editor::Editor.

Definition at line 52 of file settings_panel.h.

◆ Find()

absl::Status yaze::editor::SettingsPanel::Find ( )
inlineoverridevirtual

Implements yaze::editor::Editor.

Definition at line 53 of file settings_panel.h.

◆ SetUserSettings()

void yaze::editor::SettingsPanel::SetUserSettings ( UserSettings * settings)
inline

Definition at line 55 of file settings_panel.h.

References user_settings_.

Referenced by SetDependencies().

◆ SetWindowManager()

void yaze::editor::SettingsPanel::SetWindowManager ( WorkspaceWindowManager * registry)
inline

Definition at line 56 of file settings_panel.h.

References window_manager_.

Referenced by SetDependencies().

◆ SetShortcutManager()

void yaze::editor::SettingsPanel::SetShortcutManager ( ShortcutManager * manager)
inline

Definition at line 59 of file settings_panel.h.

References shortcut_manager_.

Referenced by SetDependencies().

◆ SetStatusBar()

void yaze::editor::SettingsPanel::SetStatusBar ( StatusBar * bar)
inline

Definition at line 62 of file settings_panel.h.

References status_bar_.

Referenced by SetDependencies().

◆ SetRom()

void yaze::editor::SettingsPanel::SetRom ( Rom * rom)
inline

Definition at line 63 of file settings_panel.h.

References yaze::editor::Editor::rom(), and rom_.

Referenced by SetDependencies().

Here is the call graph for this function:

◆ SetProject()

void yaze::editor::SettingsPanel::SetProject ( project::YazeProject * project)
inline

Definition at line 64 of file settings_panel.h.

References yaze::editor::Editor::project(), and project_.

Referenced by SetDependencies().

Here is the call graph for this function:

◆ Draw()

◆ DrawGeneralSettings()

◆ DrawAppearanceSettings()

◆ DrawWorkspaceSettings()

◆ ApplyNamedLayoutToDockspace()

◆ DrawEditorBehavior()

◆ DrawPerformanceSettings()

◆ DrawAIAgentSettings()

◆ DrawFilesystemSettings()

◆ DrawKeyboardShortcuts()

void yaze::editor::SettingsPanel::DrawKeyboardShortcuts ( )
private

Definition at line 1783 of file settings_panel.cc.

References DrawEditorShortcuts(), DrawGlobalShortcuts(), DrawPanelShortcuts(), ICON_MD_KEYBOARD, and shortcut_filter_.

Referenced by Draw().

Here is the call graph for this function:

◆ DrawGlobalShortcuts()

◆ DrawEditorShortcuts()

◆ DrawPanelShortcuts()

◆ MatchesShortcutFilter()

bool yaze::editor::SettingsPanel::MatchesShortcutFilter ( const std::string & text) const
private

Definition at line 1812 of file settings_panel.cc.

References shortcut_filter_.

Referenced by DrawEditorShortcuts(), DrawGlobalShortcuts(), and DrawPanelShortcuts().

◆ DrawPatchSettings()

void yaze::editor::SettingsPanel::DrawPatchSettings ( )
private
Todo
File browser for patches folder

Definition at line 2044 of file settings_panel.cc.

References yaze::core::PatchManager::ApplyEnabledPatches(), yaze::gui::BeginThemedTabBar(), yaze::core::Z3dkAssembleOptions::capture_nocash_symbols, yaze::project::YazeProject::code_folder, yaze::core::Z3dkAssembleOptions::defines, DrawPatchDetails(), DrawPatchList(), yaze::gui::EndThemedTabBar(), yaze::Rom::filename(), yaze::util::PlatformPaths::FindAsset(), yaze::core::PatchManager::folders(), yaze::core::PatchManager::GetEnabledPatchCount(), yaze::core::Z3dkAssembleOptions::hooks_rom_path, ICON_MD_CHECK, ICON_MD_EXTENSION, ICON_MD_REFRESH, ICON_MD_SAVE, yaze::core::Z3dkAssembleOptions::include_paths, yaze::Rom::is_loaded(), yaze::core::PatchManager::LoadPatches(), LOG_ERROR, LOG_INFO, LOG_WARN, yaze::core::Z3dkAssembleOptions::mapper, patch_manager_, yaze::core::PatchManager::patches(), patches_loaded_, yaze::core::Z3dkAssembleOptions::prohibited_memory_ranges, project_, rom_, yaze::core::Z3dkAssembleOptions::rom_size, yaze::core::PatchManager::SaveAllPatches(), selected_folder_, selected_patch_, yaze::core::Z3dkAssembleOptions::std_defines_path, yaze::core::Z3dkAssembleOptions::std_includes_path, yaze::core::Z3dkAssembleOptions::warn_branch_outside_bank, yaze::core::Z3dkAssembleOptions::warn_hook_return, yaze::core::Z3dkAssembleOptions::warn_org_collision, yaze::core::Z3dkAssembleOptions::warn_stack_balance, yaze::core::Z3dkAssembleOptions::warn_unauthorized_hook, yaze::core::Z3dkAssembleOptions::warn_unknown_width, yaze::core::Z3dkAssembleOptions::warn_unused_symbols, and yaze::project::YazeProject::z3dk_settings.

Referenced by Draw().

◆ DrawProjectSettings()

void yaze::editor::SettingsPanel::DrawProjectSettings ( )
private

Definition at line 405 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::gui::DrawProperty(), 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().

◆ DrawPatchList()

void yaze::editor::SettingsPanel::DrawPatchList ( const std::string & folder)
private

Definition at line 2175 of file settings_panel.cc.

References yaze::core::PatchManager::GetPatchesInFolder(), patch_manager_, and selected_patch_.

Referenced by DrawPatchSettings().

Here is the call graph for this function:

◆ DrawPatchDetails()

◆ DrawParameterWidget()

Member Data Documentation

◆ user_settings_

◆ window_manager_

WorkspaceWindowManager* yaze::editor::SettingsPanel::window_manager_ = nullptr
private

Definition at line 97 of file settings_panel.h.

Referenced by DrawPanelShortcuts(), DrawWorkspaceSettings(), and SetWindowManager().

◆ shortcut_manager_

ShortcutManager* yaze::editor::SettingsPanel::shortcut_manager_ = nullptr
private

Definition at line 98 of file settings_panel.h.

Referenced by DrawEditorShortcuts(), DrawGlobalShortcuts(), and SetShortcutManager().

◆ status_bar_

StatusBar* yaze::editor::SettingsPanel::status_bar_ = nullptr
private

Definition at line 99 of file settings_panel.h.

Referenced by DrawAppearanceSettings(), and SetStatusBar().

◆ rom_

Rom* yaze::editor::SettingsPanel::rom_ = nullptr
private

◆ project_

project::YazeProject* yaze::editor::SettingsPanel::project_ = nullptr
private

Definition at line 101 of file settings_panel.h.

Referenced by DrawPatchSettings(), DrawProjectSettings(), and SetProject().

◆ shortcut_edit_buffer_

char yaze::editor::SettingsPanel::shortcut_edit_buffer_[64] = {}
private

Definition at line 104 of file settings_panel.h.

Referenced by DrawPanelShortcuts().

◆ editing_card_id_

std::string yaze::editor::SettingsPanel::editing_card_id_
private

Definition at line 105 of file settings_panel.h.

Referenced by DrawPanelShortcuts().

◆ is_editing_shortcut_

bool yaze::editor::SettingsPanel::is_editing_shortcut_ = false
private

Definition at line 106 of file settings_panel.h.

Referenced by DrawPanelShortcuts().

◆ shortcut_filter_

std::string yaze::editor::SettingsPanel::shortcut_filter_
private

Definition at line 107 of file settings_panel.h.

Referenced by DrawKeyboardShortcuts(), and MatchesShortcutFilter().

◆ patch_manager_

core::PatchManager yaze::editor::SettingsPanel::patch_manager_
private

Definition at line 110 of file settings_panel.h.

Referenced by DrawPatchList(), and DrawPatchSettings().

◆ selected_folder_

std::string yaze::editor::SettingsPanel::selected_folder_
private

Definition at line 111 of file settings_panel.h.

Referenced by DrawPatchSettings().

◆ selected_patch_

core::AsmPatch* yaze::editor::SettingsPanel::selected_patch_ = nullptr
private

Definition at line 112 of file settings_panel.h.

Referenced by DrawPatchDetails(), DrawPatchList(), and DrawPatchSettings().

◆ patches_loaded_

bool yaze::editor::SettingsPanel::patches_loaded_ = false
private

Definition at line 113 of file settings_panel.h.

Referenced by DrawPatchSettings().

◆ workspace_status_message_

std::string yaze::editor::SettingsPanel::workspace_status_message_
private

Definition at line 118 of file settings_panel.h.

Referenced by ApplyNamedLayoutToDockspace(), and DrawWorkspaceSettings().

◆ workspace_status_is_error_

bool yaze::editor::SettingsPanel::workspace_status_is_error_ = false
private

Definition at line 119 of file settings_panel.h.

Referenced by ApplyNamedLayoutToDockspace(), and DrawWorkspaceSettings().


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