File tree Expand file tree Collapse file tree 4 files changed +25
-11
lines changed Expand file tree Collapse file tree 4 files changed +25
-11
lines changed Original file line number Diff line number Diff line change @@ -33,10 +33,11 @@ func _input(event):
33
33
if event is InputEventKey and event .is_pressed ():
34
34
return next (event .as_text ())
35
35
if event is InputEventMouseButton and event .is_pressed ():
36
- if event .position .x < ProjectSettings .get_setting ("display/window/size/width" ) / 2 :
37
- return next ("Left" )
38
- else :
39
- return next ("Right" )
36
+ if event .position .y > 100 :
37
+ if event .position .x < ProjectSettings .get_setting ("display/window/size/width" ) / 2 :
38
+ return next ("Left" )
39
+ else :
40
+ return next ("Right" )
40
41
41
42
func next (action ):
42
43
"""Check the action and advance state or emit signal as needed."""
Original file line number Diff line number Diff line change @@ -37,8 +37,8 @@ margin_left = 178.0
37
37
margin_right = 562.0
38
38
margin_bottom = 19.0
39
39
size_flags_horizontal = 3
40
- text = "<--"
41
- align = 2
40
+ text = " <--"
41
+ align = 0
42
42
43
43
[node name ="Current" type ="Button" parent ="Levels/NamesContainer/Names" ]
44
44
margin_left = 570.0
@@ -54,8 +54,8 @@ margin_left = 648.0
54
54
margin_right = 1032.0
55
55
margin_bottom = 19.0
56
56
size_flags_horizontal = 3
57
- text = "-->"
58
- align = 0
57
+ text = "--> "
58
+ align = 2
59
59
60
60
[node name ="BigPicture" type ="Button" parent ="Levels/NamesContainer/Names" ]
61
61
margin_left = 1040.0
Original file line number Diff line number Diff line change @@ -27,17 +27,25 @@ margin_top = 20.0
27
27
margin_right = 1220.0
28
28
margin_bottom = 39.0
29
29
30
+ [node name ="Exit" type ="Button" parent ="GameDisplay/HUDBorder/HUD" ]
31
+ margin_right = 40.0
32
+ margin_bottom = 19.0
33
+ text = "EXIT"
34
+ align = 0
35
+
30
36
[node name ="Level" type ="Label" parent ="GameDisplay/HUDBorder/HUD" ]
31
- margin_right = 596.0
37
+ margin_left = 48.0
38
+ margin_right = 1142.0
32
39
margin_bottom = 19.0
33
40
size_flags_horizontal = 3
34
41
text = "LEVEL"
42
+ align = 1
35
43
36
44
[node name ="Score" type ="Label" parent ="GameDisplay/HUDBorder/HUD" ]
37
- margin_left = 604 .0
45
+ margin_left = 1150 .0
38
46
margin_right = 1200.0
39
47
margin_bottom = 19.0
40
- size_flags_horizontal = 3
48
+ size_flags_horizontal = 8
41
49
text = "0.000"
42
50
align = 2
43
51
@@ -60,4 +68,5 @@ align = 1
60
68
one_shot = true
61
69
autostart = true
62
70
71
+ [connection signal ="pressed" from ="GameDisplay/HUDBorder/HUD/Exit" to ="GameDisplay" method ="_on_Exit_pressed" ]
63
72
[connection signal ="timeout" from ="GameDisplay/Timer" to ="GameDisplay" method ="_on_Timer_timeout" ]
Original file line number Diff line number Diff line change @@ -28,6 +28,7 @@ func _input(event):
28
28
29
29
func _on_Level_done ():
30
30
set_process (false )
31
+ $ HUDBorder/HUD/Exit .queue_free ()
31
32
var time = get_score ()
32
33
var restart = Button .new ()
33
34
restart .text = "RESTART LEVEL"
@@ -58,3 +59,6 @@ func _on_Button_pressed(scene):
58
59
{"level" : GlobalScene .get_param ("level" ),
59
60
"size" : GlobalScene .get_param ("size" ),
60
61
"data_type" : GlobalScene .get_param ("data_type" )})
62
+
63
+ func _on_Exit_pressed ():
64
+ _on_Button_pressed ("levels" )
You can’t perform that action at this time.
0 commit comments