Code formatted using GDQuest's formatter
This commit is contained in:
1 parent
74056af39a
commit
dfe34fb698
13 files changed
+198
-141
No files matched your search
@@ -3,18 +3,21 @@ extends FoldableContainer
|
||||
|
||||
@export var local_data: Node
|
||||
|
||||
|
||||
func _ready() -> void:
|
||||
%PickFolderButton.icon = get_theme_icon("FolderBrowse", "EditorIcons")
|
||||
%PickFolderButton.pressed.connect(func(): %FileDialog.show())
|
||||
%FileDialog.dir_selected.connect(_on_dir_selected)
|
||||
%FileDialog.current_dir = %PathLineEdit.text
|
||||
|
||||
|
||||
for c in %FormatsContainers.get_children():
|
||||
c.toggled.connect(_on_format_toggled)
|
||||
|
||||
|
||||
func _on_dir_selected(path: String) -> void:
|
||||
%PathLineEdit.text = path
|
||||
|
||||
|
||||
func _on_format_toggled(_toggled_on: bool) -> void:
|
||||
var has_pressed := false
|
||||
var has_unpressed := false
|
||||
@@ -24,13 +27,14 @@ func _on_format_toggled(_toggled_on: bool) -> void:
|
||||
has_pressed = true
|
||||
else:
|
||||
has_unpressed = true
|
||||
|
||||
|
||||
if not has_pressed:
|
||||
%PNGCheckBox.button_pressed = true
|
||||
|
||||
|
||||
|
||||
func get_formats() -> Array[String]:
|
||||
var arr: Array[String] = []
|
||||
for child : CheckBox in %FormatsContainers.get_children():
|
||||
for child: CheckBox in %FormatsContainers.get_children():
|
||||
if child.button_pressed:
|
||||
arr.append(child.text)
|
||||
return arr
|
||||
Reference in new issue
Block a user