diff --git a/godot_ship/.import/Title-Screen-Background.png-0858ea44e9c9235fceac088a9c0f7d28.md5 b/godot_ship/.import/Title-Screen-Background.png-0858ea44e9c9235fceac088a9c0f7d28.md5 new file mode 100644 index 0000000..65f245f --- /dev/null +++ b/godot_ship/.import/Title-Screen-Background.png-0858ea44e9c9235fceac088a9c0f7d28.md5 @@ -0,0 +1,3 @@ +source_md5="a88d669f1f058a347cc4de2244bac64b" +dest_md5="1073062c6e594eff250036d7489d44a7" + diff --git a/godot_ship/.import/Title-Screen-Background.png-0858ea44e9c9235fceac088a9c0f7d28.stex b/godot_ship/.import/Title-Screen-Background.png-0858ea44e9c9235fceac088a9c0f7d28.stex new file mode 100644 index 0000000..1ea8a2a Binary files /dev/null and b/godot_ship/.import/Title-Screen-Background.png-0858ea44e9c9235fceac088a9c0f7d28.stex differ diff --git a/godot_ship/scenes/Title Screen.gd b/godot_ship/scenes/Title Screen.gd new file mode 100644 index 0000000..51d6f25 --- /dev/null +++ b/godot_ship/scenes/Title Screen.gd @@ -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() diff --git a/godot_ship/scenes/Title Screen.tscn b/godot_ship/scenes/Title Screen.tscn index 7127ecc..f0133f8 100644 --- a/godot_ship/scenes/Title Screen.tscn +++ b/godot_ship/scenes/Title Screen.tscn @@ -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"] diff --git a/godot_ship/scenes/Title-Screen-Background.png b/godot_ship/scenes/Title-Screen-Background.png new file mode 100644 index 0000000..830ec9b Binary files /dev/null and b/godot_ship/scenes/Title-Screen-Background.png differ diff --git a/godot_ship/scenes/Title-Screen-Background.png.import b/godot_ship/scenes/Title-Screen-Background.png.import new file mode 100644 index 0000000..61bcece --- /dev/null +++ b/godot_ship/scenes/Title-Screen-Background.png.import @@ -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