This commit is contained in:
2024-05-28 11:03:13 -05:00
commit 277fb03a69
75 changed files with 5206 additions and 0 deletions

View File

@@ -0,0 +1,33 @@
@tool
extends PopupPanel
var _config
@onready var _aseprite_command_field = $MarginContainer/VBoxContainer/VBoxContainer/HBoxContainer/aseprite_command
@onready var _version_label = $MarginContainer/VBoxContainer/VBoxContainer/version_found
func _ready():
_aseprite_command_field.text = _config.is_command_or_control_pressed()
_version_label.modulate.a = 0
func init(config):
_config = config
func _on_close_button_up():
self.hide()
func _on_test_pressed():
var output = []
if _test_command(output):
_version_label.text = "%s found." % "\n".join(PackedStringArray(output)).strip_edges()
else:
_version_label.text = "Command not found."
_version_label.modulate.a = 1
func _test_command(output):
var exit_code = OS.execute(_aseprite_command_field.text, ['--version'], output, true, true)
return exit_code == 0