|
@@ -0,0 +1,45 @@
|
|
|
+[gd_scene load_steps=2 format=3 uid="uid://c7m7hu5uvgbit"]
|
|
|
+
|
|
|
+[sub_resource type="GDScript" id="GDScript_d7xax"]
|
|
|
+script/source = "@tool
|
|
|
+extends Control
|
|
|
+
|
|
|
+var path: String
|
|
|
+var _config_path: String
|
|
|
+var _config := ConfigFile.new()
|
|
|
+
|
|
|
+const _config_section := 'CONFIG'
|
|
|
+
|
|
|
+func _enter_tree() -> void:
|
|
|
+ _config_path = path.path_join('config-importer.ini')
|
|
|
+ _config.load(_config_path)
|
|
|
+ $config_path.text = _config.get_value(_config_section, 'config_path', '')
|
|
|
+
|
|
|
+func _exit_tree() -> void:
|
|
|
+ _config_save()
|
|
|
+
|
|
|
+func _config_save() -> void:
|
|
|
+ _config.set_value(_config_section, 'config_path', $config_path.text)
|
|
|
+ _config.save(_config_path)
|
|
|
+
|
|
|
+func _on_import_perform_button_down():
|
|
|
+ print(_config_path)
|
|
|
+"
|
|
|
+
|
|
|
+[node name="配置" type="VBoxContainer"]
|
|
|
+anchors_preset = 15
|
|
|
+anchor_right = 1.0
|
|
|
+anchor_bottom = 1.0
|
|
|
+grow_horizontal = 2
|
|
|
+grow_vertical = 2
|
|
|
+script = SubResource("GDScript_d7xax")
|
|
|
+
|
|
|
+[node name="config_path" type="LineEdit" parent="."]
|
|
|
+layout_mode = 2
|
|
|
+placeholder_text = "配置路径"
|
|
|
+
|
|
|
+[node name="import_perform" type="Button" parent="."]
|
|
|
+layout_mode = 2
|
|
|
+text = "读取表格生成配置"
|
|
|
+
|
|
|
+[connection signal="button_down" from="import_perform" to="." method="_on_import_perform_button_down"]
|