[ADD] title screen placeholder

This commit is contained in:
baldas_h 2020-04-04 17:11:17 +02:00
parent db9f6cb2d5
commit a49ab80404
4 changed files with 83 additions and 0 deletions

BIN
Assets/titlescreen.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 115 KiB

View File

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="StreamTexture"
path="res://.import/titlescreen.png-a5b886865e7274aed0befe533ba6c0a4.stex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://Assets/titlescreen.png"
dest_files=[ "res://.import/titlescreen.png-a5b886865e7274aed0befe533ba6c0a4.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
stream=false
size_limit=0
detect_3d=false
svg/scale=1.0

15
Scene/TitleScreen.gd Normal file
View File

@ -0,0 +1,15 @@
extends Node2D
onready var startGameButton = $Sprite/MarginContainer/StartGameButton
func _ready():
startGameButton.grab_focus()
func _process(delta):
if startGameButton.is_hovered():
startGameButton.grab_focus()
func _on_StartGameButton_pressed():
get_tree().change_scene("res://Scene/TestScene.tscn")

34
Scene/TitleScreen.tscn Normal file
View File

@ -0,0 +1,34 @@
[gd_scene load_steps=4 format=2]
[ext_resource path="res://Assets/titlescreen.png" type="Texture" id=1]
[ext_resource path="res://Scene/TitleScreen.gd" type="Script" id=2]
[ext_resource path="res://icon.png" type="Texture" id=3]
[node name="TitleScreen" type="Node2D"]
script = ExtResource( 2 )
[node name="Sprite" type="Sprite" parent="."]
scale = Vector2( 0.203183, 0.209793 )
texture = ExtResource( 1 )
centered = false
[node name="MarginContainer" type="MarginContainer" parent="Sprite"]
anchor_right = 1.0
anchor_bottom = 1.0
custom_constants/margin_right = 0
custom_constants/margin_top = 20
custom_constants/margin_left = 0
custom_constants/margin_bottom = 20
__meta__ = {
"_edit_use_anchors_": false
}
[node name="StartGameButton" type="TextureButton" parent="Sprite/MarginContainer"]
margin_left = 756.0
margin_top = 771.0
margin_right = 820.0
margin_bottom = 835.0
size_flags_horizontal = 4
size_flags_vertical = 8
texture_normal = ExtResource( 3 )
[connection signal="pressed" from="Sprite/MarginContainer/StartGameButton" to="." method="_on_StartGameButton_pressed"]