barebones menu and credits
This commit is contained in:
parent
78d24cecfa
commit
1a00e03306
5 changed files with 166 additions and 4 deletions
31
Scripts/menu.gd
Normal file
31
Scripts/menu.gd
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
extends Control
|
||||
|
||||
var credits_shown : bool = false
|
||||
|
||||
@export var level_node : Control
|
||||
@export var credits_node : Control
|
||||
@export var credits_button : Button
|
||||
|
||||
# Called when the node enters the scene tree for the first time.
|
||||
func _ready():
|
||||
pass # Replace with function body.
|
||||
|
||||
|
||||
# Called every frame. 'delta' is the elapsed time since the previous frame.
|
||||
func _process(delta):
|
||||
if credits_shown:
|
||||
credits_node.visible = true
|
||||
level_node.visible = false
|
||||
credits_button.text = "Back to Level Select"
|
||||
else:
|
||||
credits_node.visible = false
|
||||
level_node.visible = true
|
||||
credits_button.text = "Credits"
|
||||
|
||||
|
||||
func _on_credits_button_pressed():
|
||||
credits_shown = !credits_shown
|
||||
|
||||
|
||||
func _on_credits_page_meta_clicked(meta):
|
||||
OS.shell_open(str(meta))
|
||||
Loading…
Add table
Add a link
Reference in a new issue