|
1 |
| -extends WindowDialog |
| 1 | +extends PanelContainer |
2 | 2 |
|
3 | 3 |
|
4 |
| -var mod_data: ModData setget _set_mod_data |
5 |
| -var selected_config: ModConfig setget _set_selected_config |
| 4 | +var mod_data: ModData: set = _set_mod_data |
| 5 | +var selected_config: ModConfig: set = _set_selected_config |
6 | 6 | var edited_config: ModConfig
|
7 | 7 |
|
8 |
| -export(String) var error_text_add_config := "ERROR: Creating new config - check logs" |
9 |
| -export(String) var error_text_remove_config := "ERROR: Deleting config - check logs" |
10 |
| -export(String) var error_text_update_config := "ERROR: Updating config - check logs" |
11 |
| -export(String) var info_default_config := "INFO: The default config cannot be modified. \n Please create a new config instead." |
| 8 | +@export var error_text_add_config := "ERROR: Creating new config - check logs" |
| 9 | +@export var error_text_remove_config := "ERROR: Deleting config - check logs" |
| 10 | +@export var error_text_update_config := "ERROR: Updating config - check logs" |
| 11 | +@export var info_default_config := "INFO: The default config cannot be modified. \n Please create a new config instead." |
12 | 12 |
|
13 | 13 | const LABEL_CONFIG_FOR_TEXT := "Configs for"
|
14 | 14 |
|
15 |
| -onready var label_config_for := $"%LabelConfigFor" |
16 |
| -onready var config_selection := $"%ConfigSelection" |
17 |
| -onready var config_sections := $"%ConfigSections" |
18 |
| -onready var popup_new_config := $"%PopupNewConfig" |
19 |
| -onready var info_text := $"%InfoText" |
20 |
| -onready var button_save: Button = $"%ButtonSave" |
| 15 | +@onready var label_config_for := $"%LabelConfigFor" |
| 16 | +@onready var config_selection := $"%ConfigSelection" |
| 17 | +@onready var config_sections := $"%ConfigSections" |
| 18 | +@onready var popup_new_config := $"%PopupNewConfig" |
| 19 | +@onready var info_text := $"%InfoText" |
| 20 | +@onready var button_save: Button = $"%ButtonSave" |
21 | 21 |
|
22 | 22 |
|
23 | 23 | func _set_mod_data(new_mod_data: ModData) -> void:
|
@@ -53,12 +53,6 @@ func update_ui() -> void:
|
53 | 53 | func apply_config(config: ModConfig) -> void:
|
54 | 54 | var material_settings: Dictionary = config.data.material_settings
|
55 | 55 |
|
56 |
| - material.set_shader_param("animate", material_settings.animate) |
57 |
| - material.set_shader_param("square_scale", material_settings.square_scale) |
58 |
| - material.set_shader_param("blur_amount", material_settings.blur_amount) |
59 |
| - material.set_shader_param("mix_amount", material_settings.mix_amount) |
60 |
| - material.set_shader_param("color_over", Color(material_settings.color)) |
61 |
| - |
62 | 56 |
|
63 | 57 | func _populate_config_sections() -> void:
|
64 | 58 | config_sections.config = edited_config
|
@@ -115,7 +109,7 @@ func _on_PopupNewConfig_pressed_submit(config_name: String) -> void:
|
115 | 109 |
|
116 | 110 |
|
117 | 111 | func _on_ConfigSections_config_data_changed(input_component) -> void:
|
118 |
| - if input_component.parent.empty(): |
| 112 | + if input_component.parent.is_empty(): |
119 | 113 | edited_config.data[input_component.key] = input_component.value
|
120 | 114 | return
|
121 | 115 |
|
|
0 commit comments