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):
3333 if event is InputEventKey and event .is_pressed ():
3434 return next (event .as_text ())
3535 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" )
4041
4142func next (action ):
4243 """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
3737margin_right = 562.0
3838margin_bottom = 19.0
3939size_flags_horizontal = 3
40- text = "<--"
41- align = 2
40+ text = " <--"
41+ align = 0
4242
4343[node name ="Current" type ="Button" parent ="Levels/NamesContainer/Names" ]
4444margin_left = 570.0
@@ -54,8 +54,8 @@ margin_left = 648.0
5454margin_right = 1032.0
5555margin_bottom = 19.0
5656size_flags_horizontal = 3
57- text = "-->"
58- align = 0
57+ text = "--> "
58+ align = 2
5959
6060[node name ="BigPicture" type ="Button" parent ="Levels/NamesContainer/Names" ]
6161margin_left = 1040.0
Original file line number Diff line number Diff line change @@ -27,17 +27,25 @@ margin_top = 20.0
2727margin_right = 1220.0
2828margin_bottom = 39.0
2929
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+
3036[node name ="Level" type ="Label" parent ="GameDisplay/HUDBorder/HUD" ]
31- margin_right = 596.0
37+ margin_left = 48.0
38+ margin_right = 1142.0
3239margin_bottom = 19.0
3340size_flags_horizontal = 3
3441text = "LEVEL"
42+ align = 1
3543
3644[node name ="Score" type ="Label" parent ="GameDisplay/HUDBorder/HUD" ]
37- margin_left = 604 .0
45+ margin_left = 1150 .0
3846margin_right = 1200.0
3947margin_bottom = 19.0
40- size_flags_horizontal = 3
48+ size_flags_horizontal = 8
4149text = "0.000"
4250align = 2
4351
@@ -60,4 +68,5 @@ align = 1
6068one_shot = true
6169autostart = true
6270
71+ [connection signal ="pressed" from ="GameDisplay/HUDBorder/HUD/Exit" to ="GameDisplay" method ="_on_Exit_pressed" ]
6372[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):
2828
2929func _on_Level_done ():
3030 set_process (false )
31+ $ HUDBorder/HUD/Exit .queue_free ()
3132 var time = get_score ()
3233 var restart = Button .new ()
3334 restart .text = "RESTART LEVEL"
@@ -58,3 +59,6 @@ func _on_Button_pressed(scene):
5859 {"level" : GlobalScene .get_param ("level" ),
5960 "size" : GlobalScene .get_param ("size" ),
6061 "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