28 lines
590 B
GDScript
28 lines
590 B
GDScript
extends Control
|
|
|
|
var window_tween
|
|
|
|
|
|
func _ready() -> void:
|
|
Triggerer.listen("show_info", _show_info_window)
|
|
Triggerer.listen("hide_info", _hide_info_window)
|
|
|
|
|
|
func _show_info_window(data):
|
|
visible = true
|
|
|
|
if window_tween:
|
|
window_tween.kill()
|
|
|
|
window_tween = create_tween()
|
|
window_tween.set_ease(Tween.EASE_OUT)
|
|
window_tween.set_trans(Tween.TRANS_BACK)
|
|
window_tween.tween_property(self, "scale", Vector2.ONE, 1)
|
|
|
|
|
|
func _hide_info_window(_data):
|
|
if window_tween:
|
|
window_tween.kill()
|
|
|
|
window_tween = create_tween()
|
|
window_tween.tween_property(self, "scale", Vector2.ZERO, 1)
|