improved menu

This commit is contained in:
zoe 2021-09-14 12:22:39 +02:00
parent 2637008a33
commit 81bc9fa37f
59 changed files with 783 additions and 78 deletions

View file

@ -0,0 +1,6 @@
extends TextureButton
func _on_FullscreenButton_toggled(_button_pressed):
OS.window_fullscreen = !OS.window_fullscreen

View file

@ -0,0 +1,20 @@
[gd_scene load_steps=5 format=2]
[ext_resource path="res://Menu/Buttons/Fullscreen/fullscreen1.png" type="Texture" id=1]
[ext_resource path="res://Menu/Buttons/Fullscreen/fullscreen3.png" type="Texture" id=2]
[ext_resource path="res://Menu/Buttons/Fullscreen/fullscreen2.png" type="Texture" id=3]
[ext_resource path="res://Menu/Buttons/Fullscreen/FullscreenButton.gd" type="Script" id=4]
[node name="FullscreenButton" type="TextureButton"]
anchor_right = 1.0
anchor_bottom = 1.0
toggle_mode = true
texture_normal = ExtResource( 1 )
texture_pressed = ExtResource( 2 )
texture_hover = ExtResource( 3 )
script = ExtResource( 4 )
__meta__ = {
"_edit_use_anchors_": false
}
[connection signal="toggled" from="." to="." method="_on_FullscreenButton_toggled"]

Binary file not shown.

After

Width:  |  Height:  |  Size: 310 B

View file

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="StreamTexture"
path="res://.import/fullscreen1.png-00aa35465225806464ffbd1a65663e10.stex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://Menu/Buttons/Fullscreen/fullscreen1.png"
dest_files=[ "res://.import/fullscreen1.png-00aa35465225806464ffbd1a65663e10.stex" ]
[params]
compress/mode=0
compress/lossy_quality=0.7
compress/hdr_mode=0
compress/bptc_ldr=0
compress/normal_map=0
flags/repeat=0
flags/filter=false
flags/mipmaps=false
flags/anisotropic=false
flags/srgb=2
process/fix_alpha_border=true
process/premult_alpha=false
process/HDR_as_SRGB=false
process/invert_color=false
stream=false
size_limit=0
detect_3d=false
svg/scale=1.0

Binary file not shown.

After

Width:  |  Height:  |  Size: 309 B

View file

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="StreamTexture"
path="res://.import/fullscreen2.png-ff32dc36788017c4e4c9e3f3262a15c5.stex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://Menu/Buttons/Fullscreen/fullscreen2.png"
dest_files=[ "res://.import/fullscreen2.png-ff32dc36788017c4e4c9e3f3262a15c5.stex" ]
[params]
compress/mode=0
compress/lossy_quality=0.7
compress/hdr_mode=0
compress/bptc_ldr=0
compress/normal_map=0
flags/repeat=0
flags/filter=false
flags/mipmaps=false
flags/anisotropic=false
flags/srgb=2
process/fix_alpha_border=true
process/premult_alpha=false
process/HDR_as_SRGB=false
process/invert_color=false
stream=false
size_limit=0
detect_3d=false
svg/scale=1.0

Binary file not shown.

After

Width:  |  Height:  |  Size: 317 B

View file

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="StreamTexture"
path="res://.import/fullscreen3.png-ba83eaafec43dc300c050aa1346b0f84.stex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://Menu/Buttons/Fullscreen/fullscreen3.png"
dest_files=[ "res://.import/fullscreen3.png-ba83eaafec43dc300c050aa1346b0f84.stex" ]
[params]
compress/mode=0
compress/lossy_quality=0.7
compress/hdr_mode=0
compress/bptc_ldr=0
compress/normal_map=0
flags/repeat=0
flags/filter=false
flags/mipmaps=false
flags/anisotropic=false
flags/srgb=2
process/fix_alpha_border=true
process/premult_alpha=false
process/HDR_as_SRGB=false
process/invert_color=false
stream=false
size_limit=0
detect_3d=false
svg/scale=1.0

Binary file not shown.

After

Width:  |  Height:  |  Size: 189 B

View file

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="StreamTexture"
path="res://.import/fullscreen4.png-ddeabed65ea59091e12f23177622bbd8.stex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://Menu/Buttons/Fullscreen/fullscreen4.png"
dest_files=[ "res://.import/fullscreen4.png-ddeabed65ea59091e12f23177622bbd8.stex" ]
[params]
compress/mode=0
compress/lossy_quality=0.7
compress/hdr_mode=0
compress/bptc_ldr=0
compress/normal_map=0
flags/repeat=0
flags/filter=false
flags/mipmaps=false
flags/anisotropic=false
flags/srgb=2
process/fix_alpha_border=true
process/premult_alpha=false
process/HDR_as_SRGB=false
process/invert_color=false
stream=false
size_limit=0
detect_3d=false
svg/scale=1.0

View file

@ -2,13 +2,5 @@ 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)
func _on_SceneSelectButton_pressed():
GameStats.set_current_scene(scene)

View file

@ -0,0 +1,5 @@
extends TextureButton
func _on_PlayButton_pressed():
GameStats.restart_level()
disabled = true

View file

@ -0,0 +1,19 @@
[gd_scene load_steps=5 format=2]
[ext_resource path="res://Menu/Icons/Play/Play3.png" type="Texture" id=1]
[ext_resource path="res://Menu/Icons/Play/Play2.png" type="Texture" id=2]
[ext_resource path="res://Menu/Icons/Play/Play1.png" type="Texture" id=3]
[ext_resource path="res://Menu/Buttons/PlayButton.gd" type="Script" id=4]
[node name="PlayButton" type="TextureButton"]
margin_right = 40.0
margin_bottom = 40.0
texture_normal = ExtResource( 3 )
texture_pressed = ExtResource( 1 )
texture_hover = ExtResource( 2 )
script = ExtResource( 4 )
__meta__ = {
"_edit_use_anchors_": false
}
[connection signal="pressed" from="." to="." method="_on_PlayButton_pressed"]

View file

@ -0,0 +1,2 @@
extends Button

View file

@ -3,15 +3,16 @@
[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
[node name="SceneSelectButton" type="Button"]
anchor_right = 1.0
anchor_bottom = 1.0
mouse_filter = 1
theme = ExtResource( 1 )
text = "01"
flat = true
text = "> empty stage"
align = 0
script = ExtResource( 2 )
__meta__ = {
"_edit_use_anchors_": false
}
[connection signal="pressed" from="." to="." method="_on_LevelSelectButton_pressed"]
[connection signal="pressed" from="." to="." method="_on_SceneSelectButton_pressed"]