-
Notifications
You must be signed in to change notification settings - Fork 0
/
HUD.tscn
62 lines (47 loc) · 1.62 KB
/
HUD.tscn
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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
[gd_scene load_steps=4 format=2]
[ext_resource path="res://assets/ilsscrp.ttf" type="DynamicFontData" id=1]
[sub_resource type="GDScript" id=2]
script/source = "extends Node2D
signal open_student
# Declare member variables here. Examples:
# var a = 2
# var b = \"text\"
var message_has_mouse = false
# Called when the node enters the scene tree for the first time.
func _ready():
pass
# Called every frame. 'delta' is the elapsed time since the previous frame.
func _process(_delta):
if Input.is_action_just_pressed(\"ui_right\"):
emit_signal(\"open_student\")
func show_message(msg):
$StarMessage.scroll_to_line(0)
$StarMessage.text = \"\"
$StarMessage.append_bbcode(\"[center]\" + msg + \"[/center]\")
func _on_StarMessage_mouse_entered():
message_has_mouse = true
func _on_StarMessage_mouse_exited():
message_has_mouse = false
"
[sub_resource type="DynamicFont" id=1]
size = 32
outline_color = Color( 0, 0, 0, 1 )
font_data = ExtResource( 1 )
[node name="HUD" type="Node2D"]
script = SubResource( 2 )
[node name="StarMessage" type="RichTextLabel" parent="."]
anchor_top = 1.0
anchor_right = 1.0
anchor_bottom = 1.0
margin_top = -138.0
focus_mode = 2
custom_fonts/normal_font = SubResource( 1 )
custom_colors/default_color = Color( 1, 1, 1, 1 )
custom_colors/selection_color = Color( 1, 1, 0.466667, 1 )
custom_colors/font_color_selected = Color( 0, 0, 0, 1 )
selection_enabled = true
__meta__ = {
"_edit_use_anchors_": false
}
[connection signal="mouse_entered" from="StarMessage" to="." method="_on_StarMessage_mouse_entered"]
[connection signal="mouse_exited" from="StarMessage" to="." method="_on_StarMessage_mouse_exited"]