From c424e0beff71f73bfee1a6196576bda1e5fb664c Mon Sep 17 00:00:00 2001 From: betalars Date: Fri, 18 Oct 2024 18:11:45 +0200 Subject: [PATCH] bump testing scene --- src/dev-util/testing.tscn | 4 +-- src/dev-util/ui-testing.tscn | 54 +++++++++++++++++++++++++++++------- 2 files changed, 46 insertions(+), 12 deletions(-) diff --git a/src/dev-util/testing.tscn b/src/dev-util/testing.tscn index eba3d99..6f849b0 100644 --- a/src/dev-util/testing.tscn +++ b/src/dev-util/testing.tscn @@ -16,7 +16,7 @@ func _process(delta): pass -func _on_animation_player_animation_finished(anim_name): +func _on_scene_actors_animation_finished(anim_name): print(\"yay\") " @@ -70,4 +70,4 @@ libraries = { } autoplay = "test" -[connection signal="animation_finished" from="AnimationPlayer" to="." method="_on_animation_player_animation_finished"] +[connection signal="animation_finished" from="AnimationPlayer" to="." method="_on_scene_actors_animation_finished"] diff --git a/src/dev-util/ui-testing.tscn b/src/dev-util/ui-testing.tscn index 1c55a1f..ecc06d3 100644 --- a/src/dev-util/ui-testing.tscn +++ b/src/dev-util/ui-testing.tscn @@ -1,4 +1,26 @@ -[gd_scene format=3 uid="uid://52mr50b01ibd"] +[gd_scene load_steps=4 format=3 uid="uid://52mr50b01ibd"] + +[ext_resource type="Theme" uid="uid://d00g441vb4f6i" path="res://dev-util/test_theme.tres" id="1_v0n80"] + +[sub_resource type="GDScript" id="GDScript_qm6fo"] +script/source = "extends Button + + +# Called when the node enters the scene tree for the first time. +func _ready() -> void: + ProjectSettings.set_setting(\"gui/theme/custom\", \"res://dev-util/test_theme.tres\") +" + +[sub_resource type="GDScript" id="GDScript_rovd7"] +script/source = "extends MenuButton + +func _ready() -> void: + mouse_entered.connect(func(id): print(\"mouse_entered\")) + get_popup().id_pressed.connect(func(id): print(\"id_pressed\")) + get_popup().index_pressed.connect(func(id): print(\"id_pressed\")) + get_popup().id_focused.connect(func(id): print(\"id_focused\")) + +" [node name="Control" type="Control"] layout_mode = 3 @@ -10,17 +32,29 @@ grow_vertical = 2 [node name="Button" type="Button" parent="."] layout_mode = 0 -offset_left = 495.0 -offset_top = 163.0 -offset_right = 634.0 -offset_bottom = 235.0 +offset_left = 458.0 +offset_top = 209.0 +offset_right = 611.0 +offset_bottom = 281.0 +theme = ExtResource("1_v0n80") text = "small boi" +script = SubResource("GDScript_qm6fo") [node name="Button2" type="Button" parent="."] -visible = false layout_mode = 0 -offset_left = 441.0 -offset_top = 119.0 -offset_right = 694.0 -offset_bottom = 320.0 +offset_left = 662.0 +offset_top = 198.0 +offset_right = 915.0 +offset_bottom = 399.0 text = "big boi" + +[node name="OptionButton" type="MenuButton" parent="."] +layout_mode = 0 +offset_right = 569.0 +offset_bottom = 174.0 +text = "Hello" +item_count = 2 +popup/item_0/text = "asdf" +popup/item_1/text = "werty" +popup/item_1/id = 1 +script = SubResource("GDScript_rovd7")