yaze 0.3.2
Link to the Past ROM Editor
 
Loading...
Searching...
No Matches
yaze::editor::anonymous_namespace{user_settings.cc} Namespace Reference

Classes

struct  DemotedWindow
 

Functions

absl::Status EnsureParentDirectory (const std::filesystem::path &path)
 
void EraseTransientPanelVisibility (std::unordered_map< std::string, bool > *panel_state)
 
bool IsEmbeddedDungeonUtilityPanelId (const std::string &panel_id)
 
void EraseEmbeddedDungeonUtilityPanelVisibility (std::unordered_map< std::string, bool > *panel_state)
 
void ApplyDungeonWorkbenchVisibilityDefaults (std::unordered_map< std::string, bool > *panel_state)
 
void ApplyDungeonPanelAdmissionDefaults (std::unordered_map< std::string, bool > *panel_state)
 
void CloseDemotedWindowVisibility (std::unordered_map< std::string, std::unordered_map< std::string, bool > > *visibility_state)
 
bool PruneEmbeddedDungeonUtilityPanelsFromDockTreeJson (std::string *json_body)
 
absl::Status LoadPreferencesFromIni (const std::filesystem::path &path, UserSettings::Preferences *prefs)
 
absl::Status SavePreferencesToIni (const std::filesystem::path &path, const UserSettings::Preferences &prefs)
 

Variables

constexpr std::array< const char *, 10 > kDungeonWorkbenchDuplicatePanels
 
constexpr std::array< const char *, 7 > kDungeonDemotedUtilityPanels
 
constexpr DemotedWindow kRevision26DemotedWindows []
 

Function Documentation

◆ EnsureParentDirectory()

absl::Status yaze::editor::anonymous_namespace{user_settings.cc}::EnsureParentDirectory ( const std::filesystem::path & path)

Definition at line 34 of file user_settings.cc.

References yaze::util::PlatformPaths::EnsureDirectoryExists(), and EnsureParentDirectory().

Referenced by EnsureParentDirectory(), and SavePreferencesToIni().

Here is the call graph for this function:

◆ EraseTransientPanelVisibility()

void yaze::editor::anonymous_namespace{user_settings.cc}::EraseTransientPanelVisibility ( std::unordered_map< std::string, bool > * panel_state)

Definition at line 42 of file user_settings.cc.

References EraseTransientPanelVisibility(), and yaze::editor::IsTransientPanelVisibilityId().

Referenced by EraseTransientPanelVisibility().

Here is the call graph for this function:

◆ IsEmbeddedDungeonUtilityPanelId()

bool yaze::editor::anonymous_namespace{user_settings.cc}::IsEmbeddedDungeonUtilityPanelId ( const std::string & panel_id)

◆ EraseEmbeddedDungeonUtilityPanelVisibility()

void yaze::editor::anonymous_namespace{user_settings.cc}::EraseEmbeddedDungeonUtilityPanelVisibility ( std::unordered_map< std::string, bool > * panel_state)

Definition at line 61 of file user_settings.cc.

References EraseEmbeddedDungeonUtilityPanelVisibility(), and IsEmbeddedDungeonUtilityPanelId().

Referenced by EraseEmbeddedDungeonUtilityPanelVisibility().

Here is the call graph for this function:

◆ ApplyDungeonWorkbenchVisibilityDefaults()

void yaze::editor::anonymous_namespace{user_settings.cc}::ApplyDungeonWorkbenchVisibilityDefaults ( std::unordered_map< std::string, bool > * panel_state)

Definition at line 90 of file user_settings.cc.

References ApplyDungeonWorkbenchVisibilityDefaults(), and kDungeonWorkbenchDuplicatePanels.

Referenced by ApplyDungeonPanelAdmissionDefaults(), and ApplyDungeonWorkbenchVisibilityDefaults().

Here is the call graph for this function:

◆ ApplyDungeonPanelAdmissionDefaults()

void yaze::editor::anonymous_namespace{user_settings.cc}::ApplyDungeonPanelAdmissionDefaults ( std::unordered_map< std::string, bool > * panel_state)

Definition at line 101 of file user_settings.cc.

References ApplyDungeonPanelAdmissionDefaults(), ApplyDungeonWorkbenchVisibilityDefaults(), and kDungeonDemotedUtilityPanels.

Referenced by ApplyDungeonPanelAdmissionDefaults().

Here is the call graph for this function:

◆ CloseDemotedWindowVisibility()

void yaze::editor::anonymous_namespace{user_settings.cc}::CloseDemotedWindowVisibility ( std::unordered_map< std::string, std::unordered_map< std::string, bool > > * visibility_state)

Definition at line 142 of file user_settings.cc.

References CloseDemotedWindowVisibility(), and kRevision26DemotedWindows.

Referenced by CloseDemotedWindowVisibility().

Here is the call graph for this function:

◆ PruneEmbeddedDungeonUtilityPanelsFromDockTreeJson()

bool yaze::editor::anonymous_namespace{user_settings.cc}::PruneEmbeddedDungeonUtilityPanelsFromDockTreeJson ( std::string * json_body)

Definition at line 160 of file user_settings.cc.

References IsEmbeddedDungeonUtilityPanelId(), and PruneEmbeddedDungeonUtilityPanelsFromDockTreeJson().

Referenced by PruneEmbeddedDungeonUtilityPanelsFromDockTreeJson().

Here is the call graph for this function:

◆ LoadPreferencesFromIni()

absl::Status yaze::editor::anonymous_namespace{user_settings.cc}::LoadPreferencesFromIni ( const std::filesystem::path & path,
UserSettings::Preferences * prefs )

Definition at line 221 of file user_settings.cc.

References yaze::editor::UserSettings::Preferences::ai_auto_learn, yaze::editor::UserSettings::Preferences::ai_max_tokens, yaze::editor::UserSettings::Preferences::ai_model, 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::anthropic_api_key, yaze::editor::UserSettings::Preferences::autosave_enabled, yaze::editor::UserSettings::Preferences::autosave_interval, yaze::editor::UserSettings::Preferences::backup_before_save, yaze::editor::UserSettings::Preferences::backup_rom, yaze::editor::UserSettings::Preferences::cache_size_mb, yaze::editor::UserSettings::Preferences::default_editor, yaze::editor::UserSettings::Preferences::dismissed_feature_hints, yaze::editor::UserSettings::Preferences::dungeon_inspector_side, yaze::editor::UserSettings::Preferences::emulator_keep_running_in_background, yaze::editor::UserSettings::Preferences::feature_hints_enabled, yaze::editor::UserSettings::Preferences::font_family_index, yaze::editor::UserSettings::Preferences::font_global_scale, yaze::editor::UserSettings::Preferences::gemini_api_key, yaze::editor::UserSettings::Preferences::language_locale, yaze::editor::UserSettings::Preferences::last_applied_layout_name, yaze::editor::UserSettings::Preferences::last_project_path, yaze::editor::UserSettings::Preferences::last_rom_path, yaze::editor::UserSettings::Preferences::last_theme_name, yaze::util::LoadFile(), LoadPreferencesFromIni(), yaze::editor::UserSettings::Preferences::log_ai_requests, yaze::editor::UserSettings::Preferences::log_file_path, yaze::editor::UserSettings::Preferences::log_gui_automation, yaze::editor::UserSettings::Preferences::log_level, yaze::editor::UserSettings::Preferences::log_proposals, yaze::editor::UserSettings::Preferences::log_rom_operations, yaze::editor::UserSettings::Preferences::log_to_file, yaze::editor::UserSettings::Preferences::named_layouts, yaze::editor::UserSettings::Preferences::ollama_url, yaze::editor::UserSettings::Preferences::openai_api_key, yaze::editor::UserSettings::Preferences::panel_browser_category_width, yaze::editor::UserSettings::Preferences::panel_layout_defaults_revision, yaze::editor::UserSettings::Preferences::panel_shortcuts, yaze::editor::UserSettings::Preferences::panel_visibility_state, yaze::editor::UserSettings::Preferences::pinned_panels, yaze::editor::UserSettings::Preferences::prefer_hmagic_sprite_names, yaze::editor::UserSettings::Preferences::recent_files_limit, yaze::editor::UserSettings::Preferences::reduced_motion, yaze::editor::UserSettings::Preferences::restore_last_session, yaze::editor::UserSettings::Preferences::right_panel_widths, yaze::editor::UserSettings::Preferences::save_new_auto, yaze::editor::UserSettings::Preferences::saved_layouts, yaze::editor::UserSettings::Preferences::show_experimental_editors, yaze::editor::UserSettings::Preferences::show_status_bar, yaze::editor::UserSettings::Preferences::show_welcome_on_startup, yaze::editor::UserSettings::Preferences::sidebar_active_category, yaze::editor::UserSettings::Preferences::sidebar_context_collapsed, yaze::editor::UserSettings::Preferences::sidebar_panel_expanded, yaze::editor::UserSettings::Preferences::sidebar_panel_width, yaze::editor::UserSettings::Preferences::sidebar_visible, yaze::editor::UserSettings::Preferences::switch_motion_profile, yaze::editor::UserSettings::Preferences::target_fps, yaze::editor::UserSettings::Preferences::test_mode, yaze::editor::UserSettings::Preferences::undo_history_size, yaze::editor::UserSettings::Preferences::vsync, yaze::editor::UserSettings::Preferences::welcome_mouse_repel_enabled, yaze::editor::UserSettings::Preferences::welcome_particles_enabled, yaze::editor::UserSettings::Preferences::welcome_triforce_alpha, yaze::editor::UserSettings::Preferences::welcome_triforce_size, and yaze::editor::UserSettings::Preferences::welcome_triforce_speed.

Referenced by LoadPreferencesFromIni().

Here is the call graph for this function:

◆ SavePreferencesToIni()

absl::Status yaze::editor::anonymous_namespace{user_settings.cc}::SavePreferencesToIni ( const std::filesystem::path & path,
const UserSettings::Preferences & prefs )

Definition at line 465 of file user_settings.cc.

References yaze::editor::UserSettings::Preferences::ai_auto_learn, yaze::editor::UserSettings::Preferences::ai_max_tokens, yaze::editor::UserSettings::Preferences::ai_model, 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::anthropic_api_key, yaze::editor::UserSettings::Preferences::autosave_enabled, yaze::editor::UserSettings::Preferences::autosave_interval, yaze::editor::UserSettings::Preferences::backup_before_save, yaze::editor::UserSettings::Preferences::backup_rom, yaze::editor::UserSettings::Preferences::cache_size_mb, yaze::editor::UserSettings::Preferences::default_editor, yaze::editor::UserSettings::Preferences::dismissed_feature_hints, yaze::editor::UserSettings::Preferences::dungeon_inspector_side, yaze::editor::UserSettings::Preferences::emulator_keep_running_in_background, EnsureParentDirectory(), yaze::editor::UserSettings::Preferences::feature_hints_enabled, yaze::editor::UserSettings::Preferences::font_family_index, yaze::editor::UserSettings::Preferences::font_global_scale, yaze::editor::UserSettings::Preferences::gemini_api_key, yaze::editor::UserSettings::Preferences::language_locale, yaze::editor::UserSettings::Preferences::last_applied_layout_name, yaze::editor::UserSettings::Preferences::last_project_path, yaze::editor::UserSettings::Preferences::last_rom_path, yaze::editor::UserSettings::Preferences::last_theme_name, yaze::editor::UserSettings::Preferences::log_ai_requests, yaze::editor::UserSettings::Preferences::log_file_path, yaze::editor::UserSettings::Preferences::log_gui_automation, yaze::editor::UserSettings::Preferences::log_level, yaze::editor::UserSettings::Preferences::log_proposals, yaze::editor::UserSettings::Preferences::log_rom_operations, yaze::editor::UserSettings::Preferences::log_to_file, yaze::editor::UserSettings::Preferences::named_layouts, yaze::editor::UserSettings::Preferences::ollama_url, yaze::editor::UserSettings::Preferences::openai_api_key, yaze::editor::UserSettings::Preferences::panel_browser_category_width, yaze::editor::UserSettings::Preferences::panel_layout_defaults_revision, yaze::editor::UserSettings::Preferences::panel_shortcuts, yaze::editor::UserSettings::Preferences::panel_visibility_state, yaze::editor::UserSettings::Preferences::pinned_panels, yaze::editor::UserSettings::Preferences::prefer_hmagic_sprite_names, yaze::editor::UserSettings::Preferences::recent_files_limit, yaze::editor::UserSettings::Preferences::reduced_motion, yaze::editor::UserSettings::Preferences::restore_last_session, yaze::editor::UserSettings::Preferences::right_panel_widths, yaze::editor::UserSettings::Preferences::save_new_auto, yaze::editor::UserSettings::Preferences::saved_layouts, SavePreferencesToIni(), yaze::editor::UserSettings::Preferences::show_experimental_editors, yaze::editor::UserSettings::Preferences::show_status_bar, yaze::editor::UserSettings::Preferences::show_welcome_on_startup, yaze::editor::UserSettings::Preferences::sidebar_active_category, yaze::editor::UserSettings::Preferences::sidebar_context_collapsed, yaze::editor::UserSettings::Preferences::sidebar_panel_expanded, yaze::editor::UserSettings::Preferences::sidebar_panel_width, yaze::editor::UserSettings::Preferences::sidebar_visible, yaze::editor::UserSettings::Preferences::switch_motion_profile, yaze::editor::UserSettings::Preferences::target_fps, yaze::editor::UserSettings::Preferences::test_mode, yaze::editor::UserSettings::Preferences::undo_history_size, yaze::editor::UserSettings::Preferences::vsync, yaze::editor::UserSettings::Preferences::welcome_mouse_repel_enabled, yaze::editor::UserSettings::Preferences::welcome_particles_enabled, yaze::editor::UserSettings::Preferences::welcome_triforce_alpha, yaze::editor::UserSettings::Preferences::welcome_triforce_size, and yaze::editor::UserSettings::Preferences::welcome_triforce_speed.

Referenced by SavePreferencesToIni().

Here is the call graph for this function:

Variable Documentation

◆ kDungeonWorkbenchDuplicatePanels

constexpr std::array<const char*, 10> yaze::editor::anonymous_namespace{user_settings.cc}::kDungeonWorkbenchDuplicatePanels
constexpr
Initial value:
= {
"dungeon.room_selector", "dungeon.room_matrix",
"dungeon.object_selector", "dungeon.sprite_editor",
"dungeon.item_editor", "dungeon.room_graphics",
"dungeon.door_editor", "dungeon.palette_editor",
"dungeon.entrance_list", "dungeon.entrance_properties",
}

Definition at line 75 of file user_settings.cc.

Referenced by ApplyDungeonWorkbenchVisibilityDefaults().

◆ kDungeonDemotedUtilityPanels

constexpr std::array<const char*, 7> yaze::editor::anonymous_namespace{user_settings.cc}::kDungeonDemotedUtilityPanels
constexpr
Initial value:
= {
"dungeon.custom_collision", "dungeon.water_fill",
"dungeon.room_tags", "dungeon.object_coverage",
"dungeon.object_tile_editor", "dungeon.overlay_manager",
"dungeon.minecart_tracks",
}

Definition at line 83 of file user_settings.cc.

Referenced by ApplyDungeonPanelAdmissionDefaults().

◆ kRevision26DemotedWindows

constexpr DemotedWindow yaze::editor::anonymous_namespace{user_settings.cc}::kRevision26DemotedWindows[]
constexpr
Initial value:
= {
{"Agent", "agent.mesen_debug"},
{"Agent", "agent.mesen_screenshot"},
{"Agent", "agent.oracle_states"},
{"Agent", "agent.feature_flags"},
{"Agent", "agent.manifest"},
{"Agent", "agent.sram_viewer"},
{"Agent", "oracle.validation"},
{"Agent", "oracle.menu_inspector"},
{"Graphics", "graphics.prototype_viewer"},
{"Screen", "screen.naming_screen"},
{"Emulator", "emulator.save_states"},
}

Definition at line 122 of file user_settings.cc.

Referenced by CloseDemotedWindowVisibility().