cancel ui collapse animation when mouse enters again

This commit is contained in:
betalars 2025-09-05 01:59:58 +02:00
parent 9ffd6eca97
commit eeed4f68dd
3 changed files with 6 additions and 5 deletions

View File

@ -13,7 +13,8 @@ var revealed: bool = false:
else:
ui.vanish()
await get_tree().create_timer(1).timeout
wrapper.hide()
if not ui.visible:
wrapper.hide()
var has_mouse: bool = false

View File

@ -180,7 +180,7 @@ func update_state():
func try_reveal() -> bool:
if is_exit and not State.active_save_game.is_childhood_board_complete: return false
if not visible:
if not visible or animation_player.get_animation("vanish") or animation_player.get_animation("vanish_all"):
update_state()
visible = true
animation_player.play("reveal")

View File

@ -538,10 +538,10 @@ tracks/6/path = NodePath(".:visible")
tracks/6/interp = 1
tracks/6/loop_wrap = true
tracks/6/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"times": PackedFloat32Array(0, 0.6),
"transitions": PackedFloat32Array(1, 1),
"update": 1,
"values": [true]
"values": [true, true]
}
tracks/7/type = "value"
tracks/7/imported = false