add menu
This commit is contained in:
parent
e44e063bb5
commit
4e1edaf8d8
18 changed files with 514 additions and 4 deletions
|
@ -11,3 +11,5 @@ var coins = 0
|
|||
var health = 100
|
||||
|
||||
var player : KinematicBody2D = null
|
||||
|
||||
const MENU_SCENE = "res://scenes/menu/menu.tscn"
|
||||
|
|
|
@ -11,7 +11,7 @@ config_version=4
|
|||
[application]
|
||||
|
||||
config/name="Flopsy the Dog"
|
||||
run/main_scene="res://scenes/main.tscn"
|
||||
run/main_scene="res://scenes/menu/menu.tscn"
|
||||
config/icon="res://common/player_head.png"
|
||||
|
||||
[autoload]
|
||||
|
|
|
@ -4,4 +4,8 @@ func _ready():
|
|||
$CanvasLayer/CreditsScroller.play("scroll")
|
||||
|
||||
func _on_CreditsScroller_finished(anim_name):
|
||||
get_tree().quit()
|
||||
get_tree().change_scene(GlobalState.MENU_SCENE)
|
||||
|
||||
func _process(delta):
|
||||
if Input.is_action_just_pressed("ui_cancel"):
|
||||
get_tree().change_scene(GlobalState.MENU_SCENE)
|
||||
|
|
|
@ -25,11 +25,12 @@ tracks/0/keys = {
|
|||
"times": PoolRealArray( 0, 60 ),
|
||||
"transitions": PoolRealArray( 1, 1 ),
|
||||
"update": 0,
|
||||
"values": [ Vector2( 0, 1080 ), Vector2( 0, -2350 ) ]
|
||||
"values": [ Vector2( 0, 1080 ), Vector2( 0, -2560 ) ]
|
||||
}
|
||||
|
||||
[node name="Credits" type="Node2D"]
|
||||
script = ExtResource( 1 )
|
||||
bgm_path = "res://scenes/levels/02/assets/interlude.ogg"
|
||||
hud_visible = false
|
||||
clear_color = Color( 0, 0, 0, 1 )
|
||||
|
||||
|
@ -38,7 +39,7 @@ clear_color = Color( 0, 0, 0, 1 )
|
|||
[node name="RichTextLabel" type="RichTextLabel" parent="CanvasLayer"]
|
||||
margin_top = 1080.0
|
||||
margin_right = 1925.0
|
||||
margin_bottom = 3430.0
|
||||
margin_bottom = 3640.0
|
||||
custom_fonts/bold_font = SubResource( 1 )
|
||||
custom_fonts/normal_font = SubResource( 2 )
|
||||
bbcode_enabled = true
|
||||
|
@ -56,6 +57,8 @@ Fusselkater
|
|||
[b]Testing[/b]
|
||||
xtristrix
|
||||
oile
|
||||
Giggles
|
||||
Snuggo
|
||||
|
||||
|
||||
[b]Assets[/b]
|
||||
|
@ -97,6 +100,8 @@ Fusselkater
|
|||
Testing
|
||||
xtristrix
|
||||
oile
|
||||
Giggles
|
||||
Snuggo
|
||||
|
||||
|
||||
Assets
|
||||
|
|
BIN
scenes/menu/assets/cloud1.png
Normal file
BIN
scenes/menu/assets/cloud1.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 3.1 KiB |
35
scenes/menu/assets/cloud1.png.import
Normal file
35
scenes/menu/assets/cloud1.png.import
Normal file
|
@ -0,0 +1,35 @@
|
|||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="StreamTexture"
|
||||
path="res://.import/cloud1.png-0fe2af1d9d1e77db1cb404e8bead9afd.stex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://scenes/menu/assets/cloud1.png"
|
||||
dest_files=[ "res://.import/cloud1.png-0fe2af1d9d1e77db1cb404e8bead9afd.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=true
|
||||
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
|
||||
process/normal_map_invert_y=false
|
||||
stream=false
|
||||
size_limit=0
|
||||
detect_3d=true
|
||||
svg/scale=1.0
|
BIN
scenes/menu/assets/cloud2.png
Normal file
BIN
scenes/menu/assets/cloud2.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 4.2 KiB |
35
scenes/menu/assets/cloud2.png.import
Normal file
35
scenes/menu/assets/cloud2.png.import
Normal file
|
@ -0,0 +1,35 @@
|
|||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="StreamTexture"
|
||||
path="res://.import/cloud2.png-da45286331c48a611e52e233c726851a.stex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://scenes/menu/assets/cloud2.png"
|
||||
dest_files=[ "res://.import/cloud2.png-da45286331c48a611e52e233c726851a.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=true
|
||||
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
|
||||
process/normal_map_invert_y=false
|
||||
stream=false
|
||||
size_limit=0
|
||||
detect_3d=true
|
||||
svg/scale=1.0
|
68
scenes/menu/assets/ui/button_normal.svg
Normal file
68
scenes/menu/assets/ui/button_normal.svg
Normal file
|
@ -0,0 +1,68 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||
|
||||
<svg
|
||||
width="190.00012"
|
||||
height="49.000015"
|
||||
viewBox="0 0 50.270865 12.964587"
|
||||
version="1.1"
|
||||
id="svg1364"
|
||||
inkscape:version="1.2.1 (9c6d41e410, 2022-07-14)"
|
||||
sodipodi:docname="button_normal.svg"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:svg="http://www.w3.org/2000/svg">
|
||||
<sodipodi:namedview
|
||||
id="namedview1366"
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#000000"
|
||||
borderopacity="0.25"
|
||||
inkscape:showpageshadow="2"
|
||||
inkscape:pageopacity="0.0"
|
||||
inkscape:pagecheckerboard="0"
|
||||
inkscape:deskcolor="#d1d1d1"
|
||||
inkscape:document-units="mm"
|
||||
showgrid="false"
|
||||
inkscape:zoom="5.1754899"
|
||||
inkscape:cx="55.067251"
|
||||
inkscape:cy="19.321842"
|
||||
inkscape:window-width="3440"
|
||||
inkscape:window-height="1367"
|
||||
inkscape:window-x="0"
|
||||
inkscape:window-y="0"
|
||||
inkscape:window-maximized="1"
|
||||
inkscape:current-layer="layer1" />
|
||||
<defs
|
||||
id="defs1361" />
|
||||
<g
|
||||
inkscape:label="Ebene 1"
|
||||
inkscape:groupmode="layer"
|
||||
id="layer1"
|
||||
transform="translate(-91.842675,-99.072723)">
|
||||
<g
|
||||
id="g4037"
|
||||
transform="matrix(0.26458333,0,0,0.26458333,-10.815657,74.99564)">
|
||||
<path
|
||||
stroke="none"
|
||||
fill="#97714a"
|
||||
d="M 574,96.35 573.95,96.3 574,97 v 5.3 l -2.4,2.4 2.4,2.4 V 130 q 0,2 -2,2 h -34.95 l -1.55,-1.55 -1.55,1.55 H 491.4 l -2.75,-2.75 -2.75,2.75 H 394 q -2,0 -2,-2 v -3.6 l 2.75,-2.75 L 392,120.9 V 97 l 0.05,-0.5 0.05,-0.2 Q 392.35,95 394,95 h 17.05 l 2.25,2.25 2.25,-2.25 h 9.35 l 2.8,2.8 2.8,-2.8 H 572 q 1.65,0 2,1.35"
|
||||
id="path1800" />
|
||||
<path
|
||||
stroke="none"
|
||||
fill="#b7916a"
|
||||
d="M 574,96.35 Q 573.65,95 572,95 H 430.5 l -2.8,2.8 -2.8,-2.8 h -9.35 L 413.3,97.25 411.05,95 H 394 q -1.65,0 -1.9,1.3 L 392.05,96.5 392,97 v 23.9 l 2.75,2.75 -2.75,2.75 v 3.6 q 0,2 2,2 h 91.9 l 2.75,-2.75 2.75,2.75 h 42.55 l 1.55,-1.55 1.55,1.55 H 572 q 2,0 2,-2 v -22.9 l -2.4,-2.4 2.4,-2.4 V 97 l -0.05,-0.7 0.05,0.05 m 1.95,-0.3 L 576,97 v 33 q 0,4 -4,4 H 394 q -4,0 -4,-4 V 97 l 0.1,-0.95 Q 390.5,93 394,93 h 178 q 3.5,0 3.95,3.05"
|
||||
id="path1802" />
|
||||
<path
|
||||
stroke="none"
|
||||
fill="#886644"
|
||||
d="M 575.95,96.05 Q 575.5,93 572,93 H 394 q -3.5,0 -3.9,3.05 L 390,97 v 33 q 0,4 4,4 h 178 q 4,0 4,-4 V 97 l -0.05,-0.95 M 388,130.25 V 97 q 0,-6 6,-6 h 178 q 6,0 6,6 v 33.25 Q 577.85,136 572,136 H 394 q -5.85,0 -6,-5.75"
|
||||
id="path1804" />
|
||||
<path
|
||||
stroke="none"
|
||||
fill="#6d543a"
|
||||
d="m 388,130.25 q 0.15,5.75 6,5.75 h 178 q 5.85,0 6,-5.75 V 134 q 0,6 -6,6 H 394 q -6,0 -6,-6 v -3.75"
|
||||
id="path1806" />
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 2.8 KiB |
35
scenes/menu/assets/ui/button_normal.svg.import
Normal file
35
scenes/menu/assets/ui/button_normal.svg.import
Normal file
|
@ -0,0 +1,35 @@
|
|||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="StreamTexture"
|
||||
path="res://.import/button_normal.svg-6ff2901dbc984c729920dec4abff8045.stex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://scenes/menu/assets/ui/button_normal.svg"
|
||||
dest_files=[ "res://.import/button_normal.svg-6ff2901dbc984c729920dec4abff8045.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=true
|
||||
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
|
||||
process/normal_map_invert_y=false
|
||||
stream=false
|
||||
size_limit=0
|
||||
detect_3d=true
|
||||
svg/scale=1.0
|
66
scenes/menu/assets/ui/button_pressed.svg
Normal file
66
scenes/menu/assets/ui/button_pressed.svg
Normal file
|
@ -0,0 +1,66 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||
|
||||
<svg
|
||||
width="190.00012"
|
||||
height="49.000015"
|
||||
viewBox="0 0 50.270865 12.964587"
|
||||
version="1.1"
|
||||
id="svg1364"
|
||||
inkscape:version="1.2.1 (9c6d41e410, 2022-07-14)"
|
||||
sodipodi:docname="button_pressed.svg"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:svg="http://www.w3.org/2000/svg">
|
||||
<sodipodi:namedview
|
||||
id="namedview1366"
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#000000"
|
||||
borderopacity="0.25"
|
||||
inkscape:showpageshadow="2"
|
||||
inkscape:pageopacity="0.0"
|
||||
inkscape:pagecheckerboard="0"
|
||||
inkscape:deskcolor="#d1d1d1"
|
||||
inkscape:document-units="mm"
|
||||
showgrid="false"
|
||||
inkscape:zoom="5.1754899"
|
||||
inkscape:cx="55.067251"
|
||||
inkscape:cy="19.321842"
|
||||
inkscape:window-width="3440"
|
||||
inkscape:window-height="1367"
|
||||
inkscape:window-x="0"
|
||||
inkscape:window-y="0"
|
||||
inkscape:window-maximized="1"
|
||||
inkscape:current-layer="layer1" />
|
||||
<defs
|
||||
id="defs1361" />
|
||||
<g
|
||||
inkscape:label="Ebene 1"
|
||||
inkscape:groupmode="layer"
|
||||
id="layer1"
|
||||
transform="translate(-91.842675,-99.072723)">
|
||||
<g
|
||||
id="g6367"
|
||||
transform="translate(-11.314885,-13.28412)">
|
||||
<path
|
||||
stroke="none"
|
||||
fill="#97714a"
|
||||
d="m 152.37001,115.00268 v 1.40229 l -0.635,0.635 0.635,0.635 v 6.05896 q 0,0.51594 -0.48948,0.52917 h -9.28687 l -0.41011,-0.41011 -0.4101,0.41011 h -11.25802 l -0.72761,-0.72761 -0.7276,0.72761 h -24.34167 q -0.50271,-0.0132 -0.50271,-0.52917 v -0.9525 l 0.72761,-0.7276 -0.72761,-0.72761 v -6.32354 l 0.0132,-0.13229 0.0132,-0.0529 q 0.0661,-0.34396 0.50271,-0.34396 h 4.51115 l 0.59531,0.59532 0.59531,-0.59532 h 2.47386 l 0.74083,0.74084 0.74083,-0.74084 h 37.43854 q 0.43657,0 0.52917,0.35719 l -0.0132,-0.0132 0.0132,0.18521"
|
||||
id="path1862"
|
||||
style="stroke-width:0.264583" />
|
||||
<path
|
||||
stroke="none"
|
||||
fill="#b7916a"
|
||||
d="m 152.37001,115.00268 -0.0132,-0.18521 0.0132,0.0132 q -0.0926,-0.35719 -0.52917,-0.35719 H 114.4023 l -0.74083,0.74084 -0.74083,-0.74084 h -2.47386 l -0.59531,0.59532 -0.59531,-0.59532 h -4.51115 q -0.43656,0 -0.50271,0.34396 l -0.0132,0.0529 -0.0132,0.13229 v 6.32354 l 0.72761,0.72761 -0.72761,0.7276 v 0.9525 q 0,0.51594 0.50271,0.52917 h 24.34167 l 0.7276,-0.72761 0.72761,0.72761 h 11.25802 l 0.4101,-0.41011 0.41011,0.41011 h 9.28687 q 0.48948,-0.0132 0.48948,-0.52917 v -6.05896 l -0.635,-0.635 0.635,-0.635 v -1.40229 m 0.51594,-0.25135 0.0132,0.25135 v 8.73125 l -0.0132,0.26458 q -0.11906,0.79375 -1.04511,0.79375 h -47.09583 q -0.92604,0 -1.03187,-0.79375 l -0.0265,-0.26458 v -8.73125 l 0.0265,-0.25135 q 0.10583,-0.80698 1.03187,-0.80698 h 47.09583 q 0.92605,0 1.04511,0.80698"
|
||||
id="path1864"
|
||||
style="stroke-width:0.264583" />
|
||||
<path
|
||||
stroke="none"
|
||||
fill="#886644"
|
||||
d="m 152.88595,114.75133 q -0.11906,-0.80698 -1.04511,-0.80698 h -47.09583 q -0.92604,0 -1.03187,0.80698 l -0.0265,0.25135 v 8.73125 l 0.0265,0.26458 q 0.10583,0.79375 1.03187,0.79375 h 47.09583 q 0.92605,0 1.04511,-0.79375 l 0.0132,-0.26458 v -8.73125 l -0.0132,-0.25135 m 0.54239,9.04875 q -0.0397,1.52135 -1.5875,1.52135 h -47.09583 -0.0661 -0.0397 -0.0529 -0.0265 -0.0265 -0.0264 q -1.24355,-0.10583 -1.33615,-1.3626 l -0.0132,-0.15875 v -8.7974 q 0,-1.5875 1.5875,-1.5875 h 47.09583 q 1.5875,0 1.5875,1.5875 v 8.73125 0.0661"
|
||||
id="path1866"
|
||||
style="stroke-width:0.264583" />
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 3.6 KiB |
35
scenes/menu/assets/ui/button_pressed.svg.import
Normal file
35
scenes/menu/assets/ui/button_pressed.svg.import
Normal file
|
@ -0,0 +1,35 @@
|
|||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="StreamTexture"
|
||||
path="res://.import/button_pressed.svg-66a54f8ffc6687cb5f4358307dff97d7.stex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://scenes/menu/assets/ui/button_pressed.svg"
|
||||
dest_files=[ "res://.import/button_pressed.svg-66a54f8ffc6687cb5f4358307dff97d7.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=true
|
||||
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
|
||||
process/normal_map_invert_y=false
|
||||
stream=false
|
||||
size_limit=0
|
||||
detect_3d=true
|
||||
svg/scale=1.0
|
68
scenes/menu/assets/ui/button_selected.svg
Normal file
68
scenes/menu/assets/ui/button_selected.svg
Normal file
|
@ -0,0 +1,68 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||
|
||||
<svg
|
||||
width="190.00012"
|
||||
height="49.000015"
|
||||
viewBox="0 0 50.270865 12.964587"
|
||||
version="1.1"
|
||||
id="svg1364"
|
||||
inkscape:version="1.2.1 (9c6d41e410, 2022-07-14)"
|
||||
sodipodi:docname="button_selected.svg"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:svg="http://www.w3.org/2000/svg">
|
||||
<sodipodi:namedview
|
||||
id="namedview1366"
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#000000"
|
||||
borderopacity="0.25"
|
||||
inkscape:showpageshadow="2"
|
||||
inkscape:pageopacity="0.0"
|
||||
inkscape:pagecheckerboard="0"
|
||||
inkscape:deskcolor="#d1d1d1"
|
||||
inkscape:document-units="mm"
|
||||
showgrid="false"
|
||||
inkscape:zoom="5.1754899"
|
||||
inkscape:cx="55.067251"
|
||||
inkscape:cy="19.321842"
|
||||
inkscape:window-width="3440"
|
||||
inkscape:window-height="1367"
|
||||
inkscape:window-x="0"
|
||||
inkscape:window-y="0"
|
||||
inkscape:window-maximized="1"
|
||||
inkscape:current-layer="layer1" />
|
||||
<defs
|
||||
id="defs1361" />
|
||||
<g
|
||||
inkscape:label="Ebene 1"
|
||||
inkscape:groupmode="layer"
|
||||
id="layer1"
|
||||
transform="translate(-91.842675,-99.072723)">
|
||||
<g
|
||||
id="g4037"
|
||||
transform="matrix(0.26458333,0,0,0.26458333,-10.815624,74.99564)">
|
||||
<path
|
||||
stroke="none"
|
||||
fill="#97714a"
|
||||
d="M 574,96.35 573.95,96.3 574,97 v 5.3 l -2.4,2.4 2.4,2.4 V 130 q 0,2 -2,2 h -34.95 l -1.55,-1.55 -1.55,1.55 H 491.4 l -2.75,-2.75 -2.75,2.75 H 394 q -2,0 -2,-2 v -3.6 l 2.75,-2.75 L 392,120.9 V 97 l 0.05,-0.5 0.05,-0.2 Q 392.35,95 394,95 h 17.05 l 2.25,2.25 2.25,-2.25 h 9.35 l 2.8,2.8 2.8,-2.8 H 572 q 1.65,0 2,1.35"
|
||||
id="path1800" />
|
||||
<path
|
||||
stroke="none"
|
||||
fill="#b7916a"
|
||||
d="M 574,96.35 Q 573.65,95 572,95 H 430.5 l -2.8,2.8 -2.8,-2.8 h -9.35 L 413.3,97.25 411.05,95 H 394 q -1.65,0 -1.9,1.3 L 392.05,96.5 392,97 v 23.9 l 2.75,2.75 -2.75,2.75 v 3.6 q 0,2 2,2 h 91.9 l 2.75,-2.75 2.75,2.75 h 42.55 l 1.55,-1.55 1.55,1.55 H 572 q 2,0 2,-2 v -22.9 l -2.4,-2.4 2.4,-2.4 V 97 l -0.05,-0.7 0.05,0.05 m 1.95,-0.3 L 576,97 v 33 q 0,4 -4,4 H 394 q -4,0 -4,-4 V 97 l 0.1,-0.95 Q 390.5,93 394,93 h 178 q 3.5,0 3.95,3.05"
|
||||
id="path1802" />
|
||||
<path
|
||||
stroke="none"
|
||||
fill="#886644"
|
||||
d="M 575.95,96.05 Q 575.5,93 572,93 H 394 q -3.5,0 -3.9,3.05 L 390,97 v 33 q 0,4 4,4 h 178 q 4,0 4,-4 V 97 l -0.05,-0.95 M 388,130.25 V 97 q 0,-6 6,-6 h 178 q 6,0 6,6 v 33.25 Q 577.85,136 572,136 H 394 q -5.85,0 -6,-5.75"
|
||||
id="path1804" />
|
||||
<path
|
||||
stroke="none"
|
||||
fill="#6d543a"
|
||||
d="m 388,130.25 q 0.15,5.75 6,5.75 h 178 q 5.85,0 6,-5.75 V 134 q 0,6 -6,6 H 394 q -6,0 -6,-6 v -3.75"
|
||||
id="path1806" />
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 2.8 KiB |
35
scenes/menu/assets/ui/button_selected.svg.import
Normal file
35
scenes/menu/assets/ui/button_selected.svg.import
Normal file
|
@ -0,0 +1,35 @@
|
|||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="StreamTexture"
|
||||
path="res://.import/button_selected.svg-0797fd18c0b166d2a9ca0fd029cc2bfb.stex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://scenes/menu/assets/ui/button_selected.svg"
|
||||
dest_files=[ "res://.import/button_selected.svg-0797fd18c0b166d2a9ca0fd029cc2bfb.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=true
|
||||
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
|
||||
process/normal_map_invert_y=false
|
||||
stream=false
|
||||
size_limit=0
|
||||
detect_3d=true
|
||||
svg/scale=1.0
|
12
scenes/menu/button.gd
Normal file
12
scenes/menu/button.gd
Normal file
|
@ -0,0 +1,12 @@
|
|||
extends TextureButton
|
||||
|
||||
export(String) var text = ""
|
||||
|
||||
func _ready():
|
||||
$Label.text = text
|
||||
|
||||
func _on_button_down():
|
||||
$Label.rect_position.y = 3
|
||||
|
||||
func _on_button_up():
|
||||
$Label.rect_position.y = -1
|
34
scenes/menu/button.tscn
Normal file
34
scenes/menu/button.tscn
Normal file
|
@ -0,0 +1,34 @@
|
|||
[gd_scene load_steps=6 format=2]
|
||||
|
||||
[ext_resource path="res://scenes/menu/assets/ui/button_pressed.svg" type="Texture" id=1]
|
||||
[ext_resource path="res://scenes/menu/assets/ui/button_normal.svg" type="Texture" id=2]
|
||||
[ext_resource path="res://common/fonts/ComicNeue-Regular.ttf" type="DynamicFontData" id=3]
|
||||
[ext_resource path="res://scenes/menu/button.gd" type="Script" id=4]
|
||||
|
||||
[sub_resource type="DynamicFont" id=1]
|
||||
size = 18
|
||||
outline_size = 2
|
||||
outline_color = Color( 0.427451, 0.329412, 0.227451, 1 )
|
||||
font_data = ExtResource( 3 )
|
||||
|
||||
[node name="AdventureButton" type="TextureButton"]
|
||||
margin_left = 910.0
|
||||
margin_top = 490.0
|
||||
margin_right = 1100.0
|
||||
margin_bottom = 539.0
|
||||
texture_normal = ExtResource( 2 )
|
||||
texture_pressed = ExtResource( 1 )
|
||||
script = ExtResource( 4 )
|
||||
|
||||
[node name="Label" type="Label" parent="."]
|
||||
margin_top = -1.0
|
||||
margin_right = 190.0
|
||||
margin_bottom = 48.0
|
||||
custom_colors/font_color = Color( 0.717647, 0.568627, 0.415686, 1 )
|
||||
custom_fonts/font = SubResource( 1 )
|
||||
text = "Start Game"
|
||||
align = 1
|
||||
valign = 1
|
||||
|
||||
[connection signal="button_down" from="." to="." method="_on_button_down"]
|
||||
[connection signal="button_up" from="." to="." method="_on_button_up"]
|
12
scenes/menu/menu.gd
Normal file
12
scenes/menu/menu.gd
Normal file
|
@ -0,0 +1,12 @@
|
|||
extends Control
|
||||
export(String, FILE, "*.ogg") var bgm_path
|
||||
export(String, FILE, "*.tscn") var next_level
|
||||
|
||||
func _ready():
|
||||
VisualServer.set_default_clear_color("cfeffc")
|
||||
|
||||
func _on_button_play_pressed():
|
||||
get_tree().change_scene(next_level)
|
||||
|
||||
func _on_button_quit_pressed():
|
||||
get_tree().quit()
|
64
scenes/menu/menu.tscn
Normal file
64
scenes/menu/menu.tscn
Normal file
|
@ -0,0 +1,64 @@
|
|||
[gd_scene load_steps=7 format=2]
|
||||
|
||||
[ext_resource path="res://scenes/menu/menu.gd" type="Script" id=1]
|
||||
[ext_resource path="res://common/tiles/grasland.tres" type="TileSet" id=2]
|
||||
[ext_resource path="res://scenes/menu/assets/cloud1.png" type="Texture" id=3]
|
||||
[ext_resource path="res://scenes/menu/assets/cloud2.png" type="Texture" id=4]
|
||||
[ext_resource path="res://scenes/menu/button.tscn" type="PackedScene" id=5]
|
||||
[ext_resource path="res://objects/characters/flopsy/flopsy.tscn" type="PackedScene" id=6]
|
||||
|
||||
[node name="Menu" type="Control"]
|
||||
script = ExtResource( 1 )
|
||||
next_level = "res://scenes/main.tscn"
|
||||
|
||||
[node name="Cloud1" type="TextureRect" parent="."]
|
||||
margin_right = 1925.0
|
||||
margin_bottom = 770.0
|
||||
texture = ExtResource( 3 )
|
||||
expand = true
|
||||
stretch_mode = 5
|
||||
|
||||
[node name="Cloud2" type="TextureRect" parent="."]
|
||||
margin_top = 245.0
|
||||
margin_right = 1925.0
|
||||
margin_bottom = 1050.0
|
||||
texture = ExtResource( 4 )
|
||||
expand = true
|
||||
stretch_mode = 5
|
||||
|
||||
[node name="TileMap" type="TileMap" parent="."]
|
||||
tile_set = ExtResource( 2 )
|
||||
collision_layer = 4
|
||||
collision_mask = 0
|
||||
format = 1
|
||||
tile_data = PoolIntArray( 983037, 4, 0, 983038, 4, 0, 983039, 4, 0, 917504, 4, 0, 917505, 4, 0, 917506, 4, 0, 917507, 4, 0, 917508, 4, 0, 917509, 4, 0, 917510, 4, 0, 917511, 4, 0, 917512, 4, 0, 917513, 4, 0, 917514, 4, 0, 917515, 4, 0, 917516, 4, 0, 917517, 4, 0, 917518, 4, 0, 917519, 4, 0, 917520, 4, 0, 917521, 4, 0, 917522, 4, 0, 917523, 4, 0, 917524, 4, 0, 917525, 4, 0, 917526, 4, 0, 917527, 4, 0, 917528, 4, 0, 917529, 4, 0, 917530, 4, 0, 917531, 4, 0, 917532, 4, 0, 917533, 4, 0, 917534, 4, 0, 917535, 4, 0, 917536, 4, 0, 1048573, 5, 0, 1048574, 5, 0, 1048575, 5, 0, 983040, 5, 0, 983041, 5, 0, 983042, 5, 0, 983043, 5, 0, 983044, 5, 0, 983045, 5, 0, 983046, 5, 0, 983047, 5, 0, 983048, 5, 0, 983049, 5, 0, 983050, 5, 0, 983051, 5, 0, 983052, 5, 0, 983053, 5, 0, 983054, 5, 0, 983055, 5, 0, 983056, 5, 0, 983057, 5, 0, 983058, 5, 0, 983059, 5, 0, 983060, 5, 0, 983061, 5, 0, 983062, 5, 0, 983063, 5, 0, 983064, 5, 0, 983065, 5, 0, 983066, 5, 0, 983067, 5, 0, 983068, 5, 0, 983069, 5, 0, 983070, 5, 0, 983071, 5, 0, 983072, 5, 0, 1114109, 5, 0, 1114110, 5, 0, 1114111, 5, 0, 1048576, 5, 0, 1048577, 5, 0, 1048578, 5, 0, 1048579, 5, 0, 1048580, 5, 0, 1048581, 5, 0, 1048582, 5, 0, 1048583, 5, 0, 1048584, 5, 0, 1048585, 5, 0, 1048586, 5, 0, 1048587, 5, 0, 1048588, 5, 0, 1048589, 5, 0, 1048590, 5, 0, 1048591, 5, 0, 1048592, 5, 0, 1048593, 5, 0, 1048594, 5, 0, 1048595, 5, 0, 1048596, 5, 0, 1048597, 5, 0, 1048598, 5, 0, 1048599, 5, 0, 1048600, 5, 0, 1048601, 5, 0, 1048602, 5, 0, 1048603, 5, 0, 1048604, 5, 0, 1048605, 5, 0, 1048606, 5, 0, 1048607, 5, 0, 1048608, 5, 0, 1179645, 5, 0, 1179646, 5, 0, 1179647, 5, 0, 1114112, 5, 0, 1114113, 5, 0, 1114114, 5, 0, 1114115, 5, 0, 1114116, 5, 0, 1114117, 5, 0, 1114118, 5, 0, 1114119, 5, 0, 1114120, 5, 0, 1114121, 5, 0, 1114122, 5, 0, 1114123, 5, 0, 1114124, 5, 0, 1114125, 5, 0, 1114126, 5, 0, 1114127, 5, 0, 1114128, 5, 0, 1114129, 5, 0, 1114130, 5, 0, 1114131, 5, 0, 1114132, 5, 0, 1114133, 5, 0, 1114134, 5, 0, 1114135, 5, 0, 1114136, 5, 0, 1114137, 5, 0, 1114138, 5, 0, 1114139, 5, 0, 1114140, 5, 0, 1114141, 5, 0, 1114142, 5, 0, 1114143, 5, 0, 1114144, 5, 0 )
|
||||
|
||||
[node name="VBoxContainer" type="VBoxContainer" parent="."]
|
||||
anchor_left = 0.5
|
||||
anchor_top = 0.5
|
||||
anchor_right = 0.5
|
||||
anchor_bottom = 0.5
|
||||
margin_left = 865.0
|
||||
margin_top = 489.0
|
||||
margin_right = 1055.0
|
||||
margin_bottom = 591.0
|
||||
|
||||
[node name="button_play" parent="VBoxContainer" instance=ExtResource( 5 )]
|
||||
margin_left = 0.0
|
||||
margin_top = 0.0
|
||||
margin_right = 190.0
|
||||
margin_bottom = 49.0
|
||||
text = "Start Game"
|
||||
|
||||
[node name="button_quit" parent="VBoxContainer" instance=ExtResource( 5 )]
|
||||
margin_left = 0.0
|
||||
margin_top = 53.0
|
||||
margin_right = 190.0
|
||||
margin_bottom = 102.0
|
||||
text = "Quit Game"
|
||||
|
||||
[node name="Flopsy" parent="." instance=ExtResource( 6 )]
|
||||
position = Vector2( 271, 671 )
|
||||
|
||||
[connection signal="pressed" from="VBoxContainer/button_play" to="." method="_on_button_play_pressed"]
|
||||
[connection signal="pressed" from="VBoxContainer/button_quit" to="." method="_on_button_quit_pressed"]
|
Loading…
Reference in a new issue