Mennu
This commit is contained in:
40
Start.gd
Normal file
40
Start.gd
Normal file
@@ -0,0 +1,40 @@
|
||||
extends Control
|
||||
|
||||
var ingame = false
|
||||
onready var NewGame = $"New Game"
|
||||
onready var QuitGame = $"Quit Game"
|
||||
onready var QuitDesktop = $"Quit to Desktop"
|
||||
|
||||
func _ready():
|
||||
get_tree().paused = true
|
||||
QuitGame.hide()
|
||||
QuitDesktop.margin_top -= 44
|
||||
QuitDesktop.margin_bottom -= 44
|
||||
Input.set_mouse_mode(Input.MOUSE_MODE_VISIBLE)
|
||||
|
||||
|
||||
func _on_Quit_to_Desktop_Button_pressed():
|
||||
get_tree().quit()
|
||||
|
||||
func _on_New_Game_pressed():
|
||||
self.hide()
|
||||
Input.set_mouse_mode(Input.MOUSE_MODE_CAPTURED)
|
||||
get_tree().paused = false
|
||||
ingame = true
|
||||
|
||||
func openMenu():
|
||||
if (ingame):
|
||||
NewGame.set_text("Continue Game")
|
||||
QuitGame.show();
|
||||
|
||||
QuitDesktop.margin_top = 491
|
||||
QuitDesktop.margin_bottom = 535
|
||||
|
||||
self.show()
|
||||
get_tree().paused = true
|
||||
Input.set_mouse_mode(Input.MOUSE_MODE_VISIBLE)
|
||||
|
||||
|
||||
|
||||
func _on_Quit_Game_pressed():
|
||||
get_tree().reload_current_scene()
|
||||
Reference in New Issue
Block a user