Skip to content

SettingsMenuUI ​

Inherits: PanelUI < Control

Dynamically builds and manages the runtime settings menu from Settings resource

Properties ​

PackedScenecheckbox_scene
PackedSceneoption_button_scene
PackedScenedrag_bar_scene
PackedScenecolor_picker_scene
PackedScenesection_label_scene
PackedScenehotkey_rebind_button_scene
PackedScenebutton_sub_menu_scene

Variables ​

SettingsManagersettings_manager

Methods ​

voidinitialize_ui( system_hub: GameHost.SystemHub )
boolis_accessible( accessible: Dictionary, prop_name: String ) static
voidhide_setting_description()
voidrestore_default_settings()
voidon_exit_pressed()

Signals ​

restored_default_settings() ​

Emitted when the default settings were put back.

settings_exit_button_pressed() ​

Emitted when the player leaves the settings menu.

Property descriptions ​

PackedScene checkbox_scene ​

Scene references - assign these in the editor

PackedScene option_button_scene ​

The scene of a setting with a list of options.

PackedScene drag_bar_scene ​

The scene of a setting with a slider.

PackedScene color_picker_scene ​

The scene of a setting with a color.

PackedScene section_label_scene ​

The scene of the title of a section.

PackedScene hotkey_rebind_button_scene ​

The scene of a keybind.

PackedScene button_sub_menu_scene ​

The scene of a button that opens a sub menu.

Variable descriptions ​

SettingsManager settings_manager ​

SystemRefs

Method descriptions ​

void initialize_ui( system_hub: GameHost.SystemHub ) ​

Sets the part up with the hub of the game systems: connects the signals it listens to and fills it.

bool is_accessible( accessible: Dictionary, prop_name: String ) ​

Does the player see this setting? A setting the game has not decided about (it is not in the list yet: it was added after the Game Settings were saved) is shown, as the Game Settings editor shows it ticked; the developer hides it by unticking it.

void hide_setting_description() ​

Hides the text about the setting under the mouse.

void restore_default_settings() ​

Puts the default settings back.

void on_exit_pressed() ​

Saves the settings and leaves the menu.