Skip to content

Commit

Permalink
Make user_data @tool.
Browse files Browse the repository at this point in the history
  • Loading branch information
clemens-tolboom committed Jun 30, 2023
1 parent 03019b2 commit 56af57c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
5 changes: 4 additions & 1 deletion addons/gd-openai/user_data.gd
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
@tool
extends Control

@export var user_data:OpenAiUserData
Expand All @@ -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()

5 changes: 3 additions & 2 deletions addons/gd-openai/user_data.tscn
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down

0 comments on commit 56af57c

Please sign in to comment.