From e8561556fc43f1786ea24cc8dc527d46e5de011a Mon Sep 17 00:00:00 2001 From: Ali Wallick Date: Fri, 17 Jan 2025 16:33:43 -0800 Subject: [PATCH] Inherited scene button test --- prefabs/inherited_custom_button.tscn | 6 ++++++ test_scene.tscn | 9 ++++++++- 2 files changed, 14 insertions(+), 1 deletion(-) create mode 100644 prefabs/inherited_custom_button.tscn diff --git a/prefabs/inherited_custom_button.tscn b/prefabs/inherited_custom_button.tscn new file mode 100644 index 0000000..a03b446 --- /dev/null +++ b/prefabs/inherited_custom_button.tscn @@ -0,0 +1,6 @@ +[gd_scene load_steps=2 format=3 uid="uid://bji4rxxv8uv41"] + +[ext_resource type="PackedScene" uid="uid://c4csoc2csl8xd" path="res://prefabs/custom_button.tscn" id="1_ndvfc"] + +[node name="InheritedCustomButton" instance=ExtResource("1_ndvfc")] +text = "Inherited Custom Button" diff --git a/test_scene.tscn b/test_scene.tscn index 4a8901e..6581ab4 100644 --- a/test_scene.tscn +++ b/test_scene.tscn @@ -1,8 +1,9 @@ -[gd_scene load_steps=4 format=3 uid="uid://bkkk7tvtlqhbj"] +[gd_scene load_steps=5 format=3 uid="uid://bkkk7tvtlqhbj"] [ext_resource type="PackedScene" uid="uid://c4csoc2csl8xd" path="res://prefabs/custom_button.tscn" id="1_lr74r"] [ext_resource type="Texture2D" uid="uid://drdhidkv20ly4" path="res://icon.svg" id="2_5ocx1"] [ext_resource type="Script" path="res://prefabs/custom_button.gd" id="2_ssy3s"] +[ext_resource type="PackedScene" uid="uid://bji4rxxv8uv41" path="res://prefabs/inherited_custom_button.tscn" id="4_bmpu7"] [node name="TestScene" type="Control"] layout_mode = 3 @@ -13,6 +14,7 @@ grow_horizontal = 2 grow_vertical = 2 [node name="CustomButton" parent="." instance=ExtResource("1_lr74r")] +layout_mode = 0 offset_right = 125.0 offset_bottom = 31.0 @@ -31,6 +33,7 @@ offset_right = 8.0 offset_bottom = 8.0 [node name="Button" type="Button" parent="Icon2/TextEdit"] +layout_mode = 0 offset_right = 8.0 offset_bottom = 8.0 @@ -45,12 +48,16 @@ offset_bottom = 40.0 [node name="Node" type="Node" parent="Icon2"] [node name="CustomButton2" type="Button" parent="."] +layout_mode = 0 offset_left = 140.0 offset_top = 417.0 offset_right = 148.0 offset_bottom = 425.0 script = ExtResource("2_ssy3s") +[node name="InheritedCustomButton" parent="." instance=ExtResource("4_bmpu7")] +layout_mode = 0 + [node name="Node" type="Node" parent="."] [node name="Node" type="Node" parent="Node"]