Basic title screen

This commit is contained in:
Rob Kelly 2024-12-16 17:17:52 -07:00
parent 35389925e0
commit f7acce772f
13 changed files with 1615 additions and 13 deletions

View File

@ -25,7 +25,7 @@ hinting=1
subpixel_positioning=1
oversampling=0.0
Fallbacks=null
fallbacks=[]
fallbacks=[Resource("res://assets/fonts/promptfont/promptfont.otf")]
Compress=null
compress=true
preload=[]

View File

@ -25,7 +25,7 @@ hinting=1
subpixel_positioning=1
oversampling=0.0
Fallbacks=null
fallbacks=[]
fallbacks=[Resource("res://assets/fonts/promptfont/promptfont.otf")]
Compress=null
compress=true
preload=[]

View File

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://clesl8lljs6of"
path="res://.godot/imported/subtitle.png-c337aafe5885358fb0ffc36ef2953f5b.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://assets/logo/subtitle.png"
dest_files=["res://.godot/imported/subtitle.png-c337aafe5885358fb0ffc36ef2953f5b.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=true
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1

View File

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://880x5n8j3b5l"
path="res://.godot/imported/title.png-774088d389fa729175f3ae1a98440e19.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://assets/logo/title.png"
dest_files=["res://.godot/imported/title.png-774088d389fa729175f3ae1a98440e19.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=true
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1

View File

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://dgoie75rgayew"
path="res://.godot/imported/title_full.png-ed2553ec8464e1717dc08430fa286164.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://assets/logo/title_full.png"
dest_files=["res://.godot/imported/title_full.png-ed2553ec8464e1717dc08430fa286164.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=true
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1

View File

@ -5,8 +5,25 @@ UI_CANCEL,Cancel
UI_ACCEPT,Accept
UI_ON,On
UI_OFF,Off
UI_BACK,"⏎ Back"
UI_GOAL,Goal!
,
TITLE_START,"- Press Start -"
TITLE_SINGLE_PLAYER,"Single Player"
TITLE_STORY,"World Tour"
TITLE_SERIES,Series
TITLE_ROGUELIKE,Campaign
TITLE_PRACTICE,Practice
TITLE_MULTI_PLAYER,Multiplayer
TITLE_DEATHMATCH,"Real GFOLF"
TITLE_VS_SERIES,"Death Run"
TITLE_BATTLE_ROYALE,"GFOLF Royale"
TITLE_LOCAL_MULTI,"Local Multiplayer"
TITLE_NETWORK_MULTI,"Online Multiplayer"
TITLE_PROFILE,Profile
TITLE_CREDITS,Credits
,
,
PAUSE_HEADING,Paused
PAUSE_RESUME,Resume
PAUSE_SETTINGS,Settings

1 keys en
5 UI_ACCEPT Accept
6 UI_ON On
7 UI_OFF Off
8 UI_BACK ⏎ Back
9 UI_GOAL Goal!
10
11 TITLE_START - Press Start -
12 TITLE_SINGLE_PLAYER Single Player
13 TITLE_STORY World Tour
14 TITLE_SERIES Series
15 TITLE_ROGUELIKE Campaign
16 TITLE_PRACTICE Practice
17 TITLE_MULTI_PLAYER Multiplayer
18 TITLE_DEATHMATCH Real GFOLF
19 TITLE_VS_SERIES Death Run
20 TITLE_BATTLE_ROYALE GFOLF Royale
21 TITLE_LOCAL_MULTI Local Multiplayer
22 TITLE_NETWORK_MULTI Online Multiplayer
23 TITLE_PROFILE Profile
24 TITLE_CREDITS Credits
25
26
27 PAUSE_HEADING Paused
28 PAUSE_RESUME Resume
29 PAUSE_SETTINGS Settings

View File

@ -19,6 +19,7 @@ run/max_fps=60
[autoload]
GameRuntime="*res://src/game/game_runtime.gd"
ClubCatalog="*res://src/equipment/clubs/club_catalog.tscn"
GameSettings="*res://src/game/game_settings.gd"

View File

@ -102,12 +102,3 @@ func _process(_delta: float) -> void:
if not _loading_resources and loading_screen.visible:
loader_transition.play("fade_out")
func _notification(what: int) -> void:
if what == NOTIFICATION_WM_CLOSE_REQUEST:
# Handle close request here
# TODO: save?
get_tree().quit()
elif what == NOTIFICATION_CRASH:
print_debug("CRASHING!")

11
src/game/game_runtime.gd Normal file
View File

@ -0,0 +1,11 @@
class_name GameRuntimeType extends Node
## Autoloaded runtime manager
func _notification(what: int) -> void:
if what == NOTIFICATION_WM_CLOSE_REQUEST:
# Handle close request here
# TODO: save?
get_tree().quit()
elif what == NOTIFICATION_CRASH:
print_debug("CRASHING!")

View File

@ -137,5 +137,9 @@ ShotFeedback/constants/shadow_offset_x = 6
ShotFeedback/constants/shadow_offset_y = 4
ShotFeedback/font_sizes/normal_font_size = 272
ShotFeedback/fonts/normal_font = ExtResource("1_eha6a")
TitleScreenMenuLabel/base_type = &"Label"
TitleScreenMenuLabel/colors/font_outline_color = Color(0, 0, 0, 1)
TitleScreenMenuLabel/constants/outline_size = 6
TitleScreenMenuLabel/font_sizes/font_size = 32
UIButton/base_type = &"Button"
UIButton/styles/normal = SubResource("StyleBoxFlat_ynsl8")

View File

@ -0,0 +1,54 @@
extends Control
@export var settings_scene: PackedScene
@onready var menu: Control = %Menu
@onready var settings_container: MarginContainer = %SettingsContainer
@onready var state_machine: AnimationTree = $Menu/MenuStateMachine
@onready var menu_state: AnimationNodeStateMachinePlayback = state_machine["parameters/playback"]
func _input(event: InputEvent) -> void:
if event is InputEventKey or event is InputEventJoypadButton or event is InputEventMouseButton:
if menu_state.get_current_node() in ["press_start_fade_in", "press_start_idle"]:
_to_main_menu()
func _unhide() -> void:
menu.show()
func _hide() -> void:
menu.hide()
func _to_main_menu() -> void:
menu_state.travel("main_idle")
func _to_single_player() -> void:
menu_state.travel("single_player_idle")
func _to_multi_player() -> void:
menu_state.travel("multi_player_idle")
func _to_local_multi() -> void:
menu_state.travel("local_idle")
func _to_network_multi() -> void:
menu_state.travel("network_idle")
func _on_quit() -> void:
get_tree().root.propagate_notification(NOTIFICATION_WM_CLOSE_REQUEST)
func _open_settings() -> void:
var instance: Control = settings_scene.instantiate()
settings_container.add_child(instance)
instance.tree_exited.connect(_unhide)
_hide()

File diff suppressed because it is too large Load Diff

View File

@ -46,7 +46,7 @@ custom_minimum_size = Vector2(120, 0)
layout_mode = 0
offset_top = 50.0
offset_right = 120.0
offset_bottom = 173.0
offset_bottom = 205.0
theme_override_constants/separation = 5
[node name="BasicIcon" parent="GradientMask/BallList" instance=ExtResource("1_1v8xg")]