-
Notifications
You must be signed in to change notification settings - Fork 3
/
high_score_example.tscn
96 lines (76 loc) · 3.09 KB
/
high_score_example.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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
[gd_scene load_steps=3 format=3 uid="uid://8726w0yv488e"]
[ext_resource type="Script" path="res://HighScoreExample.gd" id="1_a1y26"]
[ext_resource type="PackedScene" uid="uid://ktm7k0co2o7l" path="res://addons/mqtt/mqtt.tscn" id="2_8e2pi"]
[node name="HighScoreExample" type="Control"]
layout_mode = 3
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
script = ExtResource("1_a1y26")
[node name="MQTT" parent="." instance=ExtResource("2_8e2pi")]
[node name="VBox" type="VBoxContainer" parent="."]
layout_mode = 0
offset_right = 40.0
offset_bottom = 40.0
[node name="Label" type="Label" parent="VBox"]
custom_minimum_size = Vector2(400, 0)
layout_mode = 2
text = "MQTT Based High Score System"
horizontal_alignment = 1
[node name="HBoxGamename" type="HBoxContainer" parent="VBox"]
layout_mode = 2
[node name="Label" type="Label" parent="VBox/HBoxGamename"]
custom_minimum_size = Vector2(200, 0)
layout_mode = 2
text = "Game name"
[node name="LineEdit" type="LineEdit" parent="VBox/HBoxGamename"]
custom_minimum_size = Vector2(200, 0)
layout_mode = 2
text = "A_Great_Godot_Game"
[node name="HBoxPlayername" type="HBoxContainer" parent="VBox"]
layout_mode = 2
[node name="Label" type="Label" parent="VBox/HBoxPlayername"]
custom_minimum_size = Vector2(200, 0)
layout_mode = 2
text = "Player name"
[node name="LineEdit" type="LineEdit" parent="VBox/HBoxPlayername"]
custom_minimum_size = Vector2(200, 0)
layout_mode = 2
text = "Jonathan"
[node name="HBoxHighScore" type="HBoxContainer" parent="VBox"]
layout_mode = 2
[node name="Label" type="Label" parent="VBox/HBoxHighScore"]
custom_minimum_size = Vector2(200, 0)
layout_mode = 2
text = "High score"
[node name="LineEdit" type="LineEdit" parent="VBox/HBoxHighScore"]
custom_minimum_size = Vector2(200, 0)
layout_mode = 2
text = "1000"
[node name="HBoxButtons" type="HBoxContainer" parent="VBox"]
layout_mode = 2
[node name="SendScore" type="Button" parent="VBox/HBoxButtons"]
custom_minimum_size = Vector2(200, 0)
layout_mode = 2
text = "Send score"
[node name="FetchScores" type="Button" parent="VBox/HBoxButtons"]
custom_minimum_size = Vector2(200, 0)
layout_mode = 2
text = "Fetch Scores"
[node name="HBoxTopscores" type="HBoxContainer" parent="VBox"]
layout_mode = 2
[node name="RichTextLabel" type="RichTextLabel" parent="VBox/HBoxTopscores"]
custom_minimum_size = Vector2(400, 300)
layout_mode = 2
bbcode_enabled = true
text = "[u]Top ten[/u]
"
[connection signal="broker_connected" from="MQTT" to="." method="_on_mqtt_broker_connected"]
[connection signal="broker_connection_failed" from="MQTT" to="." method="_on_mqtt_broker_connection_failed"]
[connection signal="broker_disconnected" from="MQTT" to="." method="_on_mqtt_broker_disconnected"]
[connection signal="publish_acknowledge" from="MQTT" to="." method="_on_mqtt_publish_acknowledge"]
[connection signal="received_message" from="MQTT" to="." method="_on_mqtt_received_message"]
[connection signal="pressed" from="VBox/HBoxButtons/SendScore" to="." method="_on_send_score_pressed"]
[connection signal="pressed" from="VBox/HBoxButtons/FetchScores" to="." method="_on_fetch_scores_pressed"]