mirror of
https://github.com/JohnBreaux/Boat-Battle.git
synced 2024-11-15 05:25:57 +00:00
Updated Title Screen
- Added buttons that change scene - Added Background
This commit is contained in:
parent
07340d2fe6
commit
f420fd9c38
@ -0,0 +1,3 @@
|
||||
source_md5="a88d669f1f058a347cc4de2244bac64b"
|
||||
dest_md5="1073062c6e594eff250036d7489d44a7"
|
||||
|
Binary file not shown.
29
godot_ship/scenes/Title Screen.gd
Normal file
29
godot_ship/scenes/Title Screen.gd
Normal file
@ -0,0 +1,29 @@
|
||||
extends Control
|
||||
|
||||
|
||||
# Declare member variables here. Examples:
|
||||
# var a = 2
|
||||
# var b = "text"
|
||||
|
||||
|
||||
# Called when the node enters the scene tree for the first time.
|
||||
func _ready():
|
||||
$VBoxContainer/Singleplayer.grab_focus()
|
||||
|
||||
|
||||
# Called every frame. 'delta' is the elapsed time since the previous frame.
|
||||
#func _process(delta):
|
||||
# pass
|
||||
|
||||
|
||||
func _on_Singleplayer_pressed():
|
||||
get_tree().change_scene("res://scenes/Gameplay.tscn")
|
||||
|
||||
func _on_Multiplayer_pressed():
|
||||
get_tree().change_scene("res://scenes/Gameplay.tscn")
|
||||
|
||||
func _on_Options_pressed():
|
||||
get_tree().change_scene("res://scenes/Options.tscn")
|
||||
|
||||
func _on_Quit_pressed():
|
||||
get_tree().quit()
|
@ -1,8 +1,59 @@
|
||||
[gd_scene format=2]
|
||||
[gd_scene load_steps=3 format=2]
|
||||
|
||||
[ext_resource path="res://scenes/Title-Screen-Background.png" type="Texture" id=1]
|
||||
[ext_resource path="res://scenes/Title Screen.gd" type="Script" id=2]
|
||||
|
||||
[node name="Title Node" type="Control"]
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
script = ExtResource( 2 )
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
}
|
||||
|
||||
[node name="Title-Screen-Background" type="Sprite" parent="."]
|
||||
position = Vector2( 320, 180 )
|
||||
texture = ExtResource( 1 )
|
||||
|
||||
[node name="VBoxContainer" type="VBoxContainer" parent="."]
|
||||
anchor_left = 0.5
|
||||
anchor_top = 1.0
|
||||
anchor_right = 0.5
|
||||
anchor_bottom = 1.0
|
||||
margin_left = -46.5
|
||||
margin_top = -171.0
|
||||
margin_right = 46.5
|
||||
margin_bottom = -79.0
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
}
|
||||
|
||||
[node name="Singleplayer" type="Button" parent="VBoxContainer"]
|
||||
margin_right = 93.0
|
||||
margin_bottom = 20.0
|
||||
focus_neighbour_top = NodePath("../Quit")
|
||||
text = "Single Player"
|
||||
|
||||
[node name="Multiplayer" type="Button" parent="VBoxContainer"]
|
||||
margin_top = 24.0
|
||||
margin_right = 93.0
|
||||
margin_bottom = 44.0
|
||||
text = "Multiplayer"
|
||||
|
||||
[node name="Options" type="Button" parent="VBoxContainer"]
|
||||
margin_top = 48.0
|
||||
margin_right = 93.0
|
||||
margin_bottom = 68.0
|
||||
text = "Options"
|
||||
|
||||
[node name="Quit" type="Button" parent="VBoxContainer"]
|
||||
margin_top = 72.0
|
||||
margin_right = 93.0
|
||||
margin_bottom = 92.0
|
||||
focus_neighbour_bottom = NodePath("../Singleplayer")
|
||||
text = "Quit"
|
||||
|
||||
[connection signal="pressed" from="VBoxContainer/Singleplayer" to="." method="_on_Singleplayer_pressed"]
|
||||
[connection signal="pressed" from="VBoxContainer/Multiplayer" to="." method="_on_Multiplayer_pressed"]
|
||||
[connection signal="pressed" from="VBoxContainer/Options" to="." method="_on_Options_pressed"]
|
||||
[connection signal="pressed" from="VBoxContainer/Quit" to="." method="_on_Quit_pressed"]
|
||||
|
BIN
godot_ship/scenes/Title-Screen-Background.png
Normal file
BIN
godot_ship/scenes/Title-Screen-Background.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 9.2 KiB |
34
godot_ship/scenes/Title-Screen-Background.png.import
Normal file
34
godot_ship/scenes/Title-Screen-Background.png.import
Normal file
@ -0,0 +1,34 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="StreamTexture"
|
||||
path="res://.import/Title-Screen-Background.png-0858ea44e9c9235fceac088a9c0f7d28.stex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://scenes/Title-Screen-Background.png"
|
||||
dest_files=[ "res://.import/Title-Screen-Background.png-0858ea44e9c9235fceac088a9c0f7d28.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
|
||||
stream=false
|
||||
size_limit=0
|
||||
detect_3d=true
|
||||
svg/scale=1.0
|
Loading…
Reference in New Issue
Block a user