mirror of
https://git.kittycat.homes/zoe/pegchamp.git
synced 2024-08-15 03:15:39 +00:00
added basic level selection menu
This commit is contained in:
parent
8639876921
commit
2637008a33
54 changed files with 756 additions and 32 deletions
14
Menu/Buttons/LevelSelectButton.gd
Normal file
14
Menu/Buttons/LevelSelectButton.gd
Normal file
|
@ -0,0 +1,14 @@
|
|||
extends Button
|
||||
|
||||
export var scene = "res://Menu/MainMenu.tscn"
|
||||
|
||||
func _on_LevelSelectButton_pressed():
|
||||
disabled = true
|
||||
|
||||
GameStats.reset_board()
|
||||
|
||||
var main = get_tree().current_scene
|
||||
var Fadeout = load("res://Effects/FadeOut.tscn")
|
||||
var fadeout = Fadeout.instance()
|
||||
fadeout.scene_to_load = scene
|
||||
main.add_child(fadeout)
|
11
Menu/Buttons/LevelSelectIconButton.gd
Normal file
11
Menu/Buttons/LevelSelectIconButton.gd
Normal file
|
@ -0,0 +1,11 @@
|
|||
extends TextureButton
|
||||
|
||||
export var scene = "res://Menu/MainMenu.tscn"
|
||||
|
||||
func _on_LevelSelectIconButton_pressed():
|
||||
disabled = true
|
||||
var main = get_tree().current_scene
|
||||
var Fadeout = load("res://Effects/FadeOut.tscn")
|
||||
var fadeout = Fadeout.instance()
|
||||
fadeout.scene_to_load = scene
|
||||
main.add_child(fadeout)
|
13
Menu/Buttons/LevelSelectIconButton.tscn
Normal file
13
Menu/Buttons/LevelSelectIconButton.tscn
Normal file
|
@ -0,0 +1,13 @@
|
|||
[gd_scene load_steps=2 format=2]
|
||||
|
||||
[ext_resource path="res://Menu/Buttons/LevelSelectIconButton.gd" type="Script" id=1]
|
||||
|
||||
[node name="LevelSelectIconButton" type="TextureButton"]
|
||||
margin_right = 40.0
|
||||
margin_bottom = 40.0
|
||||
script = ExtResource( 1 )
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
}
|
||||
|
||||
[connection signal="pressed" from="." to="." method="_on_LevelSelectIconButton_pressed"]
|
17
Menu/Buttons/SceneSelectButton.tscn
Normal file
17
Menu/Buttons/SceneSelectButton.tscn
Normal file
|
@ -0,0 +1,17 @@
|
|||
[gd_scene load_steps=3 format=2]
|
||||
|
||||
[ext_resource path="res://Menu/Theme.tres" type="Theme" id=1]
|
||||
[ext_resource path="res://Menu/Buttons/LevelSelectButton.gd" type="Script" id=2]
|
||||
|
||||
[node name="LevelSelectButton" type="Button"]
|
||||
margin_right = 34.0
|
||||
margin_bottom = 23.0
|
||||
theme = ExtResource( 1 )
|
||||
text = "01"
|
||||
flat = true
|
||||
script = ExtResource( 2 )
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
}
|
||||
|
||||
[connection signal="pressed" from="." to="." method="_on_LevelSelectButton_pressed"]
|
Loading…
Add table
Add a link
Reference in a new issue