From 51601d5ad118c0a22c889b2705d01259d5cb0fac Mon Sep 17 00:00:00 2001 From: pennyrigate Date: Fri, 2 Jun 2023 02:14:07 -0400 Subject: [PATCH] started work on menus --- graphics/borders/skaborder.png | Bin 0 -> 318 bytes graphics/borders/skaborder.png.import | 35 ++++++++++ graphics/hud/sg_menu.png | Bin 0 -> 2314 bytes graphics/hud/sg_menu.png.import | 35 ++++++++++ menus/main_menu.gd | 15 ++++ menus/main_menu.tscn | 94 ++++++++++++++++++++++++++ menus/title_screen.gd | 7 ++ menus/title_screen.tscn | 33 +++++++++ project.godot | 13 ++++ 9 files changed, 232 insertions(+) create mode 100644 graphics/borders/skaborder.png create mode 100644 graphics/borders/skaborder.png.import create mode 100644 graphics/hud/sg_menu.png create mode 100644 graphics/hud/sg_menu.png.import create mode 100644 menus/main_menu.gd create mode 100644 menus/main_menu.tscn create mode 100644 menus/title_screen.gd create mode 100644 menus/title_screen.tscn diff --git a/graphics/borders/skaborder.png b/graphics/borders/skaborder.png new file mode 100644 index 0000000000000000000000000000000000000000..474cb80f0e0e8008342638876a2b9687a04b96dc GIT binary patch literal 318 zcmeAS@N?(olHy`uVBq!ia0y~yUCI@$qZ}Hz8nIa#yZr;2*?DC%YN!`B>pMrr|zkBP`Q(<7P!L}O)Yhd7C zco-C1(|z5t@n~BjOx@T0n_wU>QoTplj7J*^R{x(01Er^}5_2{tMnpov-}Nwq*F<0A nOz!4|yW&+n%-~enO=|47^d0|tf7g5j^bCWitDnm{r-UW|KBI=n literal 0 HcmV?d00001 diff --git a/graphics/borders/skaborder.png.import b/graphics/borders/skaborder.png.import new file mode 100644 index 0000000..e1ae3a3 --- /dev/null +++ b/graphics/borders/skaborder.png.import @@ -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 diff --git a/graphics/hud/sg_menu.png b/graphics/hud/sg_menu.png new file mode 100644 index 0000000000000000000000000000000000000000..5429f7c3f79172324ec12815b432356fc00ebc7f GIT binary patch literal 2314 zcmV+l3HA1gP)Px#1ZP1_K>z@;j|==^1poj5KTu3mMaPF(cS|w1X+GkNSM_x^`ifEh)t*H(FMM-? zR8L_4|Nn=3iRp7V@y?-KJ0?6S9!xSJMlK*!HX{H4000002IilS0000LbW%=J|NsC0 z|NsC0|NsC0|NsC0|NsC004v#j>Hq)$32;bRa{vGi!Ty#v_Loi|E+gsB-^r+LfVHr>_Xy5$0OMZG%c@{4t}t$9f&mf!4Gm-0iMhu~2l(d^L0gD4 zO~)SumIpO$Ag1YbJbB87rg59B5!3PX1OUY7V?^ZX1U+*Bh{w7Hgb@gNqQS?2n9>f! z(2gEaJUk~1HabMAh*yx9)+0P!^5AX#gh=}lv62qq$tDlpR@~^}Fng}cgSU0sMkHi; zI^?lGX&b>bqj=a;wZwLWI{fM$g=T~!JRb(Nn|^)ww>1ffm5b@%2V{+qw#h3ZcP2Fd zbSQa%aU=y!Ta$Ls-QY+#@IhD3C`=rt*+Te&AORo9I2_VhKJb+2qzI8RaQHIdc`5ExziJC26M=^&gr&j5f12|7tZ5U!3UCNSW_==Hw(@;n z-H;#`NCD!^tn)b^P=b!m=V=0F0$UTEPNNIe!7c!i@z1h|NPc+EEQZC207gl*k1P|s za%?$Lfl(?5k5@8|r|h`_;V$4{uCi1=fygO{vaI&O^=9wcixe_e2n^H>R4OsVbYc}) zK`_?k9CwV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86HzBc9e;HZ+sVDy`n$KCHACIRM(UP`1B0FyqW-r+RGLKvJ$IqsW_5sN z*iff60x6XKy4EJB&7rLg8ykpa{wlihv>;U2u0oc@^C_P4DK1xaq}K)larYZk5;%7= zwq~pl9(cb!zP>#kr{CXS_s8RLyW?16K_f!>59HuKGtqw*MPV`tdYogR03YwC|DO3ce{JEYvn>gh;APAD&y2MgjY?~K9pCzB6d_n zC=x}ml9pRv9IjV_0>UGAy`n}JdtX6AFZRBoIz)(h{_4~tLe#TYuK@wY*sa$}YXlTC k`q!2=5mLjy2%f7X!Y_=rh|^#A|>07*qoM6N<$f*(yLI{*Lx literal 0 HcmV?d00001 diff --git a/graphics/hud/sg_menu.png.import b/graphics/hud/sg_menu.png.import new file mode 100644 index 0000000..0b0937d --- /dev/null +++ b/graphics/hud/sg_menu.png.import @@ -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 diff --git a/menus/main_menu.gd b/menus/main_menu.gd new file mode 100644 index 0000000..daae36a --- /dev/null +++ b/menus/main_menu.gd @@ -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() + diff --git a/menus/main_menu.tscn b/menus/main_menu.tscn new file mode 100644 index 0000000..09a71e6 --- /dev/null +++ b/menus/main_menu.tscn @@ -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 ) diff --git a/menus/title_screen.gd b/menus/title_screen.gd new file mode 100644 index 0000000..4109598 --- /dev/null +++ b/menus/title_screen.gd @@ -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() diff --git a/menus/title_screen.tscn b/menus/title_screen.tscn new file mode 100644 index 0000000..f82eae3 --- /dev/null +++ b/menus/title_screen.tscn @@ -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 diff --git a/project.godot b/project.godot index 162691e..22e7337 100644 --- a/project.godot +++ b/project.godot @@ -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) ] } +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]