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 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 UndoManagerundo_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
 
Romrom () const
 
zelda3::GameDatagame_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

UserSettingsuser_settings_ = nullptr
 
PanelManagerpanel_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
 

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_
 

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 42 of file settings_panel.h.

◆ Load()

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

Implements yaze::editor::Editor.

Definition at line 43 of file settings_panel.h.

◆ Save()

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

Implements yaze::editor::Editor.

Definition at line 44 of file settings_panel.h.

◆ Update()

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

Implements yaze::editor::Editor.

Definition at line 45 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 47 of file settings_panel.h.

◆ Redo()

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

Implements yaze::editor::Editor.

Definition at line 48 of file settings_panel.h.

◆ Cut()

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

Implements yaze::editor::Editor.

Definition at line 49 of file settings_panel.h.

◆ Copy()

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

Implements yaze::editor::Editor.

Definition at line 50 of file settings_panel.h.

◆ Paste()

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

Implements yaze::editor::Editor.

Definition at line 51 of file settings_panel.h.

◆ Find()

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

Implements yaze::editor::Editor.

Definition at line 52 of file settings_panel.h.

◆ SetUserSettings()

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

Definition at line 54 of file settings_panel.h.

References user_settings_.

Referenced by yaze::editor::EditorSet::set_user_settings(), and SetDependencies().

◆ SetPanelManager()

void yaze::editor::SettingsPanel::SetPanelManager ( PanelManager * registry)
inline

Definition at line 55 of file settings_panel.h.

References panel_manager_.

Referenced by SetDependencies(), and SetPanelRegistry().

◆ SetPanelRegistry()

void yaze::editor::SettingsPanel::SetPanelRegistry ( PanelManager * registry)
inline

Definition at line 57 of file settings_panel.h.

References SetPanelManager().

Here is the call graph for this function:

◆ SetShortcutManager()

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

Definition at line 58 of file settings_panel.h.

References shortcut_manager_.

Referenced by SetDependencies().

◆ SetStatusBar()

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

Definition at line 59 of file settings_panel.h.

References status_bar_.

Referenced by SetDependencies().

◆ SetRom()

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

Definition at line 60 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 61 of file settings_panel.h.

References project_.

Referenced by SetDependencies().

◆ Draw()

◆ DrawGeneralSettings()

◆ DrawAppearanceSettings()

◆ DrawEditorBehavior()

◆ DrawPerformanceSettings()

◆ DrawAIAgentSettings()

◆ DrawFilesystemSettings()

◆ DrawKeyboardShortcuts()

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

Definition at line 1558 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 1587 of file settings_panel.cc.

References shortcut_filter_.

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

◆ DrawPatchSettings()

◆ DrawProjectSettings()

void yaze::editor::SettingsPanel::DrawProjectSettings ( )
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().

◆ DrawPatchList()

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

Definition at line 1912 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_

◆ panel_manager_

PanelManager* yaze::editor::SettingsPanel::panel_manager_ = nullptr
private

Definition at line 85 of file settings_panel.h.

Referenced by DrawPanelShortcuts(), and SetPanelManager().

◆ shortcut_manager_

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

Definition at line 86 of file settings_panel.h.

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

◆ status_bar_

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

Definition at line 87 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 89 of file settings_panel.h.

Referenced by DrawProjectSettings(), and SetProject().

◆ shortcut_edit_buffer_

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

Definition at line 92 of file settings_panel.h.

Referenced by DrawPanelShortcuts().

◆ editing_card_id_

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

Definition at line 93 of file settings_panel.h.

Referenced by DrawPanelShortcuts().

◆ is_editing_shortcut_

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

Definition at line 94 of file settings_panel.h.

Referenced by DrawPanelShortcuts().

◆ shortcut_filter_

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

Definition at line 95 of file settings_panel.h.

Referenced by DrawKeyboardShortcuts(), and MatchesShortcutFilter().

◆ patch_manager_

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

Definition at line 98 of file settings_panel.h.

Referenced by DrawPatchList(), and DrawPatchSettings().

◆ selected_folder_

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

Definition at line 99 of file settings_panel.h.

Referenced by DrawPatchSettings().

◆ selected_patch_

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

Definition at line 100 of file settings_panel.h.

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

◆ patches_loaded_

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

Definition at line 101 of file settings_panel.h.

Referenced by DrawPatchSettings().


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