-
Notifications
You must be signed in to change notification settings - Fork 0
/
demon_ranktrack_label.gd
44 lines (36 loc) · 988 Bytes
/
demon_ranktrack_label.gd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
extends Label
signal mouseEntered(demonRank)
signal mouseExited()
var active = false
var tw1
func _on_mouse_entered():
print("hedfre")
mouseEntered.emit(text)
func _on_gui_input(_event):
if Input.is_action_just_pressed("click"):
mouseEntered.emit(text)
active = true
func _input(_event):
if active:
if Input.is_action_just_pressed("right_click"):
mouseExited.emit()
active = false
#func _process(delta):
# if tw1:
# print(self)
#func stopTween():
# if tw1:
# tw1.stop()
func startTween():
tw1 = create_tween()
tw1.set_loops(50) # value here or endless warnings get printed...
tw1.set_trans(Tween.TRANS_CUBIC)
tw1.set_ease(Tween.EASE_IN)
tw1.tween_property(self, "scale", Vector2(1.2, 1.2), 1.0)
# tw1.tween_property(n, "modulate:a", 0.8, 1.0)
tw1.tween_interval(0.01)
tw1.set_trans(Tween.TRANS_SINE)
tw1.set_ease(Tween.EASE_OUT)
tw1.tween_property(self, "scale", Vector2(1.0, 1.0), 1.0)
# tw1.tween_property(n, "modulate:a", 0.4, 1.5)
tw1.play()