Skip to content

PreferencesWindowApi

An Api that makes adding additional tabs to the preferences window easy.

Description

The PreferencesWindowApi makes it possible to easily add new tabs to the preferences window using create_category ( String name, Control container = _create_default_container() ). The attached container can then interact with the preferences window using the provided methods and signals.

Methods

Control create_category ( String name, Control container = _create_default_container() )
WindowDialog get_preferences_window ( )
void show_back ( )
void show_close ( )

Signals

back_pressed ( ):
Emitted whenever the back button is pressed.

apply_pressed ( ):
Emitted whenever the apply button is pressed.

about_to_show ( ):
Emitted right before the preferences window would open up. Use this signal to for example rebuild Trees.

Method Descriptions

Control create_category ( String name, Control container = _create_default_container() ):
Creates a new category in the preferences window under the name name. Attaches container if given or generates a blank VBoxContainer as the new category panel and returns it.

void show_close ( ):
Makes the close button show and hides the back button. Each tab has their close/ back button visibility maintained seperately.

void show_back ( ):
Makes a back button show in the preferences window instead of the normal close button. Each tab has their close/ back button visibility maintained seperately.

WindowDialog get_preferences_window ( ):
Returns the PreferencesWindow WindowDialog.