forked from team-sg/hero-mark-2
started work on menus
This commit is contained in:
parent
6e16aead24
commit
51601d5ad1
9 changed files with 232 additions and 0 deletions
BIN
graphics/borders/skaborder.png
Normal file
BIN
graphics/borders/skaborder.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 318 B |
35
graphics/borders/skaborder.png.import
Normal file
35
graphics/borders/skaborder.png.import
Normal file
|
@ -0,0 +1,35 @@
|
||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="texture"
|
||||||
|
type="StreamTexture"
|
||||||
|
path="res://.import/skaborder.png-b93f5de83ccf5fbcedd55382465c1432.stex"
|
||||||
|
metadata={
|
||||||
|
"vram_texture": false
|
||||||
|
}
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://graphics/borders/skaborder.png"
|
||||||
|
dest_files=[ "res://.import/skaborder.png-b93f5de83ccf5fbcedd55382465c1432.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
|
||||||
|
process/normal_map_invert_y=false
|
||||||
|
stream=false
|
||||||
|
size_limit=0
|
||||||
|
detect_3d=true
|
||||||
|
svg/scale=1.0
|
BIN
graphics/hud/sg_menu.png
Normal file
BIN
graphics/hud/sg_menu.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 2.3 KiB |
35
graphics/hud/sg_menu.png.import
Normal file
35
graphics/hud/sg_menu.png.import
Normal file
|
@ -0,0 +1,35 @@
|
||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="texture"
|
||||||
|
type="StreamTexture"
|
||||||
|
path="res://.import/sg_menu.png-1059e958ce9fae654e7b5a67b2bbfacf.stex"
|
||||||
|
metadata={
|
||||||
|
"vram_texture": false
|
||||||
|
}
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://graphics/hud/sg_menu.png"
|
||||||
|
dest_files=[ "res://.import/sg_menu.png-1059e958ce9fae654e7b5a67b2bbfacf.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
|
||||||
|
process/normal_map_invert_y=false
|
||||||
|
stream=false
|
||||||
|
size_limit=0
|
||||||
|
detect_3d=true
|
||||||
|
svg/scale=1.0
|
15
menus/main_menu.gd
Normal file
15
menus/main_menu.gd
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
extends Node
|
||||||
|
|
||||||
|
onready var continue_button = $Panel/Continue
|
||||||
|
|
||||||
|
func _ready():
|
||||||
|
#Grey out continue if no save files
|
||||||
|
yield(get_tree(),"idle_frame")
|
||||||
|
var file = File.new()
|
||||||
|
if file.file_exists("user://file1.pr") or file.file_exists("user://file2.pr") or file.file_exists("user://file3.pr"):
|
||||||
|
$Panel/Continue.grab_focus()
|
||||||
|
else:
|
||||||
|
$Panel/Body/GreyedContinue.visible = true
|
||||||
|
continue_button.visible = false
|
||||||
|
$Panel/FileSelect.grab_focus()
|
||||||
|
|
94
menus/main_menu.tscn
Normal file
94
menus/main_menu.tscn
Normal file
|
@ -0,0 +1,94 @@
|
||||||
|
[gd_scene load_steps=6 format=2]
|
||||||
|
|
||||||
|
[ext_resource path="res://ui/theme.tres" type="Theme" id=1]
|
||||||
|
[ext_resource path="res://graphics/borders/skaborder.png" type="Texture" id=2]
|
||||||
|
[ext_resource path="res://graphics/hud/sg_menu.png" type="Texture" id=3]
|
||||||
|
[ext_resource path="res://graphics/hud/pause_arrow.png" type="Texture" id=4]
|
||||||
|
[ext_resource path="res://menus/main_menu.gd" type="Script" id=5]
|
||||||
|
|
||||||
|
[node name="MainMenu" type="Node"]
|
||||||
|
script = ExtResource( 5 )
|
||||||
|
|
||||||
|
[node name="TextureRect" type="TextureRect" parent="."]
|
||||||
|
anchor_right = 1.0
|
||||||
|
anchor_bottom = 1.0
|
||||||
|
texture = ExtResource( 2 )
|
||||||
|
expand = true
|
||||||
|
stretch_mode = 2
|
||||||
|
|
||||||
|
[node name="TextureRect2" type="TextureRect" parent="."]
|
||||||
|
margin_left = 176.0
|
||||||
|
margin_top = 40.0
|
||||||
|
margin_right = 242.0
|
||||||
|
margin_bottom = 187.0
|
||||||
|
texture = ExtResource( 3 )
|
||||||
|
|
||||||
|
[node name="Panel" type="Panel" parent="."]
|
||||||
|
margin_left = 16.0
|
||||||
|
margin_top = 32.0
|
||||||
|
margin_right = 136.0
|
||||||
|
margin_bottom = 112.0
|
||||||
|
theme = ExtResource( 1 )
|
||||||
|
|
||||||
|
[node name="Body" type="Label" parent="Panel"]
|
||||||
|
margin_left = 16.0
|
||||||
|
margin_top = 8.0
|
||||||
|
margin_right = 112.0
|
||||||
|
margin_bottom = 57.0
|
||||||
|
text = "continue
|
||||||
|
file select
|
||||||
|
marathon mode
|
||||||
|
augmentations
|
||||||
|
options"
|
||||||
|
|
||||||
|
[node name="GreyedContinue" type="Label" parent="Panel/Body"]
|
||||||
|
visible = false
|
||||||
|
margin_right = 56.0
|
||||||
|
margin_bottom = 10.0
|
||||||
|
custom_colors/font_color = Color( 0.690196, 0.690196, 0.690196, 1 )
|
||||||
|
text = "Continue"
|
||||||
|
|
||||||
|
[node name="Continue" type="TextureButton" parent="Panel"]
|
||||||
|
margin_left = 8.0
|
||||||
|
margin_top = 9.0
|
||||||
|
margin_right = 16.0
|
||||||
|
margin_bottom = 17.0
|
||||||
|
focus_neighbour_top = NodePath("../Augmentations")
|
||||||
|
focus_neighbour_bottom = NodePath("../FileSelect")
|
||||||
|
texture_focused = ExtResource( 4 )
|
||||||
|
|
||||||
|
[node name="FileSelect" type="TextureButton" parent="Panel"]
|
||||||
|
margin_left = 8.0
|
||||||
|
margin_top = 22.0
|
||||||
|
margin_right = 16.0
|
||||||
|
margin_bottom = 30.0
|
||||||
|
focus_neighbour_top = NodePath("../Continue")
|
||||||
|
focus_neighbour_bottom = NodePath("../MarathonMode")
|
||||||
|
texture_focused = ExtResource( 4 )
|
||||||
|
|
||||||
|
[node name="MarathonMode" type="TextureButton" parent="Panel"]
|
||||||
|
margin_left = 8.0
|
||||||
|
margin_top = 35.0
|
||||||
|
margin_right = 16.0
|
||||||
|
margin_bottom = 43.0
|
||||||
|
focus_neighbour_top = NodePath("../FileSelect")
|
||||||
|
focus_neighbour_bottom = NodePath("../Augmentations")
|
||||||
|
texture_focused = ExtResource( 4 )
|
||||||
|
|
||||||
|
[node name="Augmentations" type="TextureButton" parent="Panel"]
|
||||||
|
margin_left = 8.0
|
||||||
|
margin_top = 48.0
|
||||||
|
margin_right = 16.0
|
||||||
|
margin_bottom = 56.0
|
||||||
|
focus_neighbour_top = NodePath("../MarathonMode")
|
||||||
|
focus_neighbour_bottom = NodePath("../Options")
|
||||||
|
texture_focused = ExtResource( 4 )
|
||||||
|
|
||||||
|
[node name="Options" type="TextureButton" parent="Panel"]
|
||||||
|
margin_left = 8.0
|
||||||
|
margin_top = 61.0
|
||||||
|
margin_right = 16.0
|
||||||
|
margin_bottom = 69.0
|
||||||
|
focus_neighbour_top = NodePath("../Augmentations")
|
||||||
|
focus_neighbour_bottom = NodePath("../Continue")
|
||||||
|
texture_focused = ExtResource( 4 )
|
7
menus/title_screen.gd
Normal file
7
menus/title_screen.gd
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
extends Node
|
||||||
|
|
||||||
|
export var next_menu: PackedScene
|
||||||
|
|
||||||
|
func _input(event):
|
||||||
|
if (event is InputEventKey or event is InputEventJoypadButton) and event.pressed:
|
||||||
|
SceneManager.current_scene = next_menu.instance()
|
33
menus/title_screen.tscn
Normal file
33
menus/title_screen.tscn
Normal file
|
@ -0,0 +1,33 @@
|
||||||
|
[gd_scene load_steps=7 format=2]
|
||||||
|
|
||||||
|
[ext_resource path="res://graphics/borders/prideborder.png" type="Texture" id=1]
|
||||||
|
[ext_resource path="res://ui/2ndpuberty_outline.tres" type="Material" id=2]
|
||||||
|
[ext_resource path="res://ui/theme.tres" type="Theme" id=3]
|
||||||
|
[ext_resource path="res://tilesets/t_factory.tres" type="TileSet" id=4]
|
||||||
|
[ext_resource path="res://menus/title_screen.gd" type="Script" id=5]
|
||||||
|
[ext_resource path="res://menus/main_menu.tscn" type="PackedScene" id=6]
|
||||||
|
|
||||||
|
[node name="TitleScreen" type="Node"]
|
||||||
|
script = ExtResource( 5 )
|
||||||
|
next_menu = ExtResource( 6 )
|
||||||
|
|
||||||
|
[node name="Sprite" type="TextureRect" parent="."]
|
||||||
|
anchor_right = 1.0
|
||||||
|
anchor_bottom = 1.0
|
||||||
|
texture = ExtResource( 1 )
|
||||||
|
expand = true
|
||||||
|
|
||||||
|
[node name="TileMap" type="TileMap" parent="."]
|
||||||
|
tile_set = ExtResource( 4 )
|
||||||
|
cell_size = Vector2( 8, 8 )
|
||||||
|
format = 1
|
||||||
|
tile_data = PoolIntArray( 262149, 0, 0, 262150, 0, 0, 262151, 0, 0, 262153, 0, 0, 262154, 0, 0, 262155, 0, 0, 262157, 0, 0, 262158, 0, 0, 262161, 0, 0, 262162, 0, 0, 262163, 0, 0, 327685, 0, 0, 327687, 0, 0, 327689, 0, 0, 327691, 0, 0, 327693, 0, 0, 327695, 0, 0, 327697, 0, 0, 327699, 0, 0, 393221, 0, 0, 393222, 0, 0, 393223, 0, 0, 393225, 0, 0, 393227, 0, 0, 393229, 0, 0, 393231, 0, 0, 393233, 0, 0, 393235, 0, 0, 458757, 0, 0, 458758, 0, 0, 458761, 0, 0, 458763, 0, 0, 458765, 0, 0, 458766, 0, 0, 458769, 0, 0, 458771, 0, 0, 524293, 0, 0, 524295, 0, 0, 524297, 0, 0, 524299, 0, 0, 524301, 0, 0, 524303, 0, 0, 524305, 0, 0, 524307, 0, 0, 589829, 0, 0, 589831, 0, 0, 589833, 0, 0, 589835, 0, 0, 589837, 0, 0, 589839, 0, 0, 589841, 0, 0, 589843, 0, 0, 655365, 0, 0, 655367, 0, 0, 655369, 0, 0, 655370, 0, 0, 655371, 0, 0, 655373, 0, 0, 655374, 0, 0, 655377, 0, 0, 655378, 0, 0, 655379, 0, 0, 786441, 0, 0, 786442, 0, 0, 786445, 0, 0, 786446, 0, 0, 786447, 0, 0, 786449, 0, 0, 786450, 0, 0, 786453, 0, 0, 786454, 0, 0, 786455, 0, 0, 851977, 0, 0, 851979, 0, 0, 851981, 0, 0, 851983, 0, 0, 851985, 0, 0, 851987, 0, 0, 851989, 0, 0, 851991, 0, 0, 917513, 0, 0, 917515, 0, 0, 917517, 0, 0, 917519, 0, 0, 917521, 0, 0, 917523, 0, 0, 917525, 0, 0, 917527, 0, 0, 983049, 0, 0, 983050, 0, 0, 983053, 0, 0, 983055, 0, 0, 983057, 0, 0, 983059, 0, 0, 983061, 0, 0, 983062, 0, 0, 983063, 0, 0, 1048585, 0, 0, 1048587, 0, 0, 1048589, 0, 0, 1048591, 0, 0, 1048593, 0, 0, 1048595, 0, 0, 1048599, 0, 0, 1114121, 0, 0, 1114123, 0, 0, 1114125, 0, 0, 1114127, 0, 0, 1114129, 0, 0, 1114131, 0, 0, 1114133, 0, 0, 1114135, 0, 0, 1179657, 0, 0, 1179658, 0, 0, 1179661, 0, 0, 1179662, 0, 0, 1179663, 0, 0, 1179665, 0, 0, 1179667, 0, 0, 1179669, 0, 0, 1179670, 0, 0, 1179671, 0, 0 )
|
||||||
|
|
||||||
|
[node name="Label" type="Label" parent="."]
|
||||||
|
material = ExtResource( 2 )
|
||||||
|
margin_top = 168.0
|
||||||
|
margin_right = 256.0
|
||||||
|
margin_bottom = 182.0
|
||||||
|
theme = ExtResource( 3 )
|
||||||
|
text = "Press start!"
|
||||||
|
align = 1
|
|
@ -290,6 +290,19 @@ exit_hatch={
|
||||||
, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":88,"physical_scancode":0,"unicode":0,"echo":false,"script":null)
|
, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":88,"physical_scancode":0,"unicode":0,"echo":false,"script":null)
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
start={
|
||||||
|
"deadzone": 0.5,
|
||||||
|
"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777221,"physical_scancode":0,"unicode":0,"echo":false,"script":null)
|
||||||
|
, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777217,"physical_scancode":0,"unicode":0,"echo":false,"script":null)
|
||||||
|
, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":0,"physical_scancode":90,"unicode":0,"echo":false,"script":null)
|
||||||
|
, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":0,"physical_scancode":88,"unicode":0,"echo":false,"script":null)
|
||||||
|
, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":0,"physical_scancode":67,"unicode":0,"echo":false,"script":null)
|
||||||
|
, Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":0,"button_index":0,"pressure":0.0,"pressed":false,"script":null)
|
||||||
|
, Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":0,"button_index":1,"pressure":0.0,"pressed":false,"script":null)
|
||||||
|
, Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":0,"button_index":2,"pressure":0.0,"pressed":false,"script":null)
|
||||||
|
, Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":0,"button_index":11,"pressure":0.0,"pressed":false,"script":null)
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
||||||
[input_devices]
|
[input_devices]
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue