LogicSettingsControl ​
Inherits: VBoxContainer
The settings of the player controller or of the camera, as they appear in the Controller and Camera tabs of the Gameplay Config: a Type dropdown (the logic classes the toolkit has) and the settings of that type below it, in sections like the rest of the Gameplay Config. The logic is a resource kept in the config itself, so what you see is what the game uses: there is no preset to choose and nothing else to save. A logic that older versions kept as a preset file is copied into the config the first time the tab opens.
Variables ​
Resource | holder | |
String | property | "" |
String | base_name | "" |
Array[Script] | classes | [] |
OptionButton | type_option | |
VBoxContainer | rows_holder | |
Dictionary | doc_comments | {} |
bool | migrated | false |
Methods ​
void | setup( config: Resource, property_name: String ) |
Array[Script] | discover_classes( folder: String, base: String ) static |
bool | extends_base( script: Script, base: String ) static |
String | type_name_of( script: Script ) static |
Resource | get_logic() |
void | refresh() |
Dictionary | read_doc_comments( script: GDScript ) static |
Signals ​
changed() ​
Something was changed (the type or a setting): the editor saves the config.
Constants ​
StringCAMERA_LOGIC_PATH ="res://addons/chroniclenode/data_classes/controller_logic/camera/"- The folders of the logic classes (every script there that extends the base class is a type).StringPLAYER_LOGIC_PATH ="res://addons/chroniclenode/data_classes/controller_logic/player/"PackedStringArrayHIDDEN =["preset_name", "description"]- The settings every logic has that this control does not show (a name and a description of the old presets).
Variable descriptions ​
Resource holder ​
No description yet.
String property = "" ​
No description yet.
String base_name = "" ​
No description yet.
Array[Script] classes = [] ​
No description yet.
OptionButton type_option ​
No description yet.
VBoxContainer rows_holder ​
No description yet.
Dictionary doc_comments = ​
No description yet.
bool migrated = false ​
A logic that was a preset file was copied into the config when the control opened.
Method descriptions ​
void setup( config: Resource, property_name: String ) ​
holder is the config, property the name of its logic resource ("player_controller_logic" or "camera_logic"). The classes are found in the folder of the kind.
Array[Script] discover_classes( folder: String, base: String ) ​
The scripts of a folder that extend the base class, by display name.
bool extends_base( script: Script, base: String ) ​
No description yet.
String type_name_of( script: Script ) ​
The name the Type dropdown shows for a logic script.
Resource get_logic() ​
The logic the config holds now (null when it holds none).
void refresh() ​
Shows the type and the settings of the logic the config holds.
Dictionary read_doc_comments( script: GDScript ) ​
The ## comments above the @export lines of a script and its base scripts: name -> text (the tooltips).