From 56af57cf20d2c8f5a919d2f62e6d3b1047f9bc2f Mon Sep 17 00:00:00 2001 From: Clemens Tolboom Date: Fri, 30 Jun 2023 12:49:39 +0200 Subject: [PATCH] Make user_data @tool. --- addons/gd-openai/user_data.gd | 5 ++++- addons/gd-openai/user_data.tscn | 5 +++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/addons/gd-openai/user_data.gd b/addons/gd-openai/user_data.gd index 443a343..eea0fd4 100644 --- a/addons/gd-openai/user_data.gd +++ b/addons/gd-openai/user_data.gd @@ -1,3 +1,4 @@ +@tool extends Control @export var user_data:OpenAiUserData @@ -18,8 +19,10 @@ func _on_button_pressed(): load_data() # FIXME: how to close depending on parent? - if not get_parent().find_child("OpenAiApiRequest", false) == null: + if not get_parent().find_child("OpenAiApiRequest", true) == null: + printt("Found OpenAiApiRequest") queue_free() else: + printt("Quiting") get_tree().quit() diff --git a/addons/gd-openai/user_data.tscn b/addons/gd-openai/user_data.tscn index 3fca1ae..0521bdd 100644 --- a/addons/gd-openai/user_data.tscn +++ b/addons/gd-openai/user_data.tscn @@ -4,9 +4,10 @@ [node name="user_data" type="Control"] layout_mode = 3 -anchors_preset = 15 +anchors_preset = 14 +anchor_top = 0.5 anchor_right = 1.0 -anchor_bottom = 1.0 +anchor_bottom = 0.5 grow_horizontal = 2 grow_vertical = 2 script = ExtResource("1_3tabx")