fix: text updates now forced to deferred
This commit is contained in:
parent
71bf3724da
commit
99c4302a52
|
|
@ -32,7 +32,7 @@ var transfor_arr: Array[Transform2D] = [
|
||||||
@export var text: String = "" :
|
@export var text: String = "" :
|
||||||
set(value):
|
set(value):
|
||||||
text = value
|
text = value
|
||||||
_on_text_updated()
|
_on_text_updated.call_deferred()
|
||||||
|
|
||||||
@onready var label: Label = $Label
|
@onready var label: Label = $Label
|
||||||
@onready var background_sprite: AnimatedSprite2D = $AnimatedSprite2D
|
@onready var background_sprite: AnimatedSprite2D = $AnimatedSprite2D
|
||||||
|
|
|
||||||
|
|
@ -23,7 +23,7 @@ signal transform_tween_finished
|
||||||
@export var text: String = "" :
|
@export var text: String = "" :
|
||||||
set (value):
|
set (value):
|
||||||
if is_node_ready():
|
if is_node_ready():
|
||||||
_on_text_updated()
|
_on_text_updated.call_deferred()
|
||||||
text = value
|
text = value
|
||||||
var content: Node2D
|
var content: Node2D
|
||||||
var label: Label
|
var label: Label
|
||||||
|
|
@ -112,7 +112,7 @@ func _ready() -> void:
|
||||||
label = $Content/Label
|
label = $Content/Label
|
||||||
background_sprite = $Content/BackgroundSprite
|
background_sprite = $Content/BackgroundSprite
|
||||||
content = $Content
|
content = $Content
|
||||||
_on_text_updated()
|
_on_text_updated.call_deferred()
|
||||||
|
|
||||||
input_event.connect(_on_input_event)
|
input_event.connect(_on_input_event)
|
||||||
mouse_entered.connect(_on_mouse_entered)
|
mouse_entered.connect(_on_mouse_entered)
|
||||||
|
|
|
||||||
|
|
@ -1,17 +1,17 @@
|
||||||
[gd_scene load_steps=15 format=3 uid="uid://g2a27jwdapai"]
|
[gd_scene load_steps=15 format=3 uid="uid://g2a27jwdapai"]
|
||||||
|
|
||||||
[ext_resource type="Script" uid="uid://bbia2hcdwctyn" path="res://logic-scenes/card_burner/card_burner.gd" id="1_copuj"]
|
[ext_resource type="Script" uid="uid://bbia2hcdwctyn" path="res://logic-scenes/card_burner/card_burner.gd" id="1_copuj"]
|
||||||
[ext_resource type="Script" uid="uid://2loic2eeec5b" path="res://logic-scenes/board/card.gd" id="2_l4ogr"]
|
|
||||||
[ext_resource type="Texture2D" uid="uid://615hvpuiacvm" path="res://addons/input_prompts/icons/xbox/X.png" id="3_ckmi5"]
|
[ext_resource type="Texture2D" uid="uid://615hvpuiacvm" path="res://addons/input_prompts/icons/xbox/X.png" id="3_ckmi5"]
|
||||||
[ext_resource type="PackedScene" uid="uid://uc6urpgv7n1y" path="res://logic-scenes/card_burner/cursor_candle.tscn" id="3_l4ogr"]
|
[ext_resource type="PackedScene" uid="uid://uc6urpgv7n1y" path="res://logic-scenes/card_burner/cursor_candle.tscn" id="3_l4ogr"]
|
||||||
[ext_resource type="Script" uid="uid://bbs1u7ojno7xo" path="res://addons/input_prompts/action_prompt/action_prompt.gd" id="4_x6cxt"]
|
[ext_resource type="Script" uid="uid://bbs1u7ojno7xo" path="res://addons/input_prompts/action_prompt/action_prompt.gd" id="4_x6cxt"]
|
||||||
|
[ext_resource type="PackedScene" uid="uid://dy5rd437h5hsw" path="res://logic-scenes/board/card.tscn" id="5_ckmi5"]
|
||||||
|
|
||||||
[sub_resource type="InputEventKey" id="InputEventKey_ckmi5"]
|
[sub_resource type="InputEventKey" id="InputEventKey_x6cxt"]
|
||||||
device = -1
|
device = -1
|
||||||
physical_keycode = 88
|
physical_keycode = 88
|
||||||
unicode = 120
|
unicode = 120
|
||||||
|
|
||||||
[sub_resource type="InputEventJoypadButton" id="InputEventJoypadButton_x6cxt"]
|
[sub_resource type="InputEventJoypadButton" id="InputEventJoypadButton_23lqb"]
|
||||||
device = -1
|
device = -1
|
||||||
button_index = 2
|
button_index = 2
|
||||||
pressed = true
|
pressed = true
|
||||||
|
|
@ -128,11 +128,6 @@ offset_right = -518.0
|
||||||
offset_bottom = 14.0
|
offset_bottom = 14.0
|
||||||
rotation = -0.0352522
|
rotation = -0.0352522
|
||||||
|
|
||||||
[node name="Card" type="Area2D" parent="Control/Ancor1"]
|
|
||||||
script = ExtResource("2_l4ogr")
|
|
||||||
text = "card"
|
|
||||||
metadata/_custom_type_script = "uid://2loic2eeec5b"
|
|
||||||
|
|
||||||
[node name="Ancor2" type="Control" parent="Control"]
|
[node name="Ancor2" type="Control" parent="Control"]
|
||||||
unique_name_in_owner = true
|
unique_name_in_owner = true
|
||||||
anchors_preset = 0
|
anchors_preset = 0
|
||||||
|
|
@ -142,11 +137,6 @@ offset_right = -183.0
|
||||||
offset_bottom = 35.0
|
offset_bottom = 35.0
|
||||||
rotation = 0.0120591
|
rotation = 0.0120591
|
||||||
|
|
||||||
[node name="card" type="Area2D" parent="Control/Ancor2"]
|
|
||||||
script = ExtResource("2_l4ogr")
|
|
||||||
text = "card"
|
|
||||||
metadata/_custom_type_script = "uid://2loic2eeec5b"
|
|
||||||
|
|
||||||
[node name="Ancor3" type="Control" parent="Control"]
|
[node name="Ancor3" type="Control" parent="Control"]
|
||||||
unique_name_in_owner = true
|
unique_name_in_owner = true
|
||||||
anchors_preset = 0
|
anchors_preset = 0
|
||||||
|
|
@ -156,11 +146,6 @@ offset_right = 153.0
|
||||||
offset_bottom = 22.0
|
offset_bottom = 22.0
|
||||||
rotation = -0.0139755
|
rotation = -0.0139755
|
||||||
|
|
||||||
[node name="card" type="Area2D" parent="Control/Ancor3"]
|
|
||||||
script = ExtResource("2_l4ogr")
|
|
||||||
text = "card"
|
|
||||||
metadata/_custom_type_script = "uid://2loic2eeec5b"
|
|
||||||
|
|
||||||
[node name="Ancor4" type="Control" parent="Control"]
|
[node name="Ancor4" type="Control" parent="Control"]
|
||||||
unique_name_in_owner = true
|
unique_name_in_owner = true
|
||||||
anchors_preset = 0
|
anchors_preset = 0
|
||||||
|
|
@ -170,11 +155,6 @@ offset_right = 495.0
|
||||||
offset_bottom = 15.0
|
offset_bottom = 15.0
|
||||||
rotation = 0.0245775
|
rotation = 0.0245775
|
||||||
|
|
||||||
[node name="card" type="Area2D" parent="Control/Ancor4"]
|
|
||||||
script = ExtResource("2_l4ogr")
|
|
||||||
text = "card"
|
|
||||||
metadata/_custom_type_script = "uid://2loic2eeec5b"
|
|
||||||
|
|
||||||
[node name="HSplitContainer" type="HSplitContainer" parent="Control"]
|
[node name="HSplitContainer" type="HSplitContainer" parent="Control"]
|
||||||
layout_mode = 1
|
layout_mode = 1
|
||||||
anchors_preset = 5
|
anchors_preset = 5
|
||||||
|
|
@ -196,7 +176,7 @@ stretch_mode = 5
|
||||||
script = ExtResource("4_x6cxt")
|
script = ExtResource("4_x6cxt")
|
||||||
action = "skip"
|
action = "skip"
|
||||||
icon = 0
|
icon = 0
|
||||||
events = Array[InputEvent]([null, SubResource("InputEventKey_ckmi5"), SubResource("InputEventJoypadButton_x6cxt")])
|
events = Array[InputEvent]([null, SubResource("InputEventKey_x6cxt"), SubResource("InputEventJoypadButton_23lqb")])
|
||||||
metadata/_custom_type_script = "uid://bbs1u7ojno7xo"
|
metadata/_custom_type_script = "uid://bbs1u7ojno7xo"
|
||||||
|
|
||||||
[node name="SkipButton" type="Button" parent="Control/HSplitContainer"]
|
[node name="SkipButton" type="Button" parent="Control/HSplitContainer"]
|
||||||
|
|
@ -218,3 +198,11 @@ root_node = NodePath("../Control/HSplitContainer")
|
||||||
libraries = {
|
libraries = {
|
||||||
&"": SubResource("AnimationLibrary_kaqqi")
|
&"": SubResource("AnimationLibrary_kaqqi")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[node name="Card1" parent="." instance=ExtResource("5_ckmi5")]
|
||||||
|
|
||||||
|
[node name="Card2" parent="." instance=ExtResource("5_ckmi5")]
|
||||||
|
|
||||||
|
[node name="Card3" parent="." instance=ExtResource("5_ckmi5")]
|
||||||
|
|
||||||
|
[node name="Card4" parent="." instance=ExtResource("5_ckmi5")]
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue