[EDIT] implemented title screen assets

This commit is contained in:
baldas_h 2020-04-05 16:15:17 +02:00
parent ca1b21e95e
commit 853c0023f7
24 changed files with 380 additions and 43 deletions

BIN
Assets/CONTROLS BUTTON.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

View File

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="StreamTexture"
path="res://.import/CONTROLS BUTTON.png-63721ee21b549871543891f3e65777b2.stex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://Assets/CONTROLS BUTTON.png"
dest_files=[ "res://.import/CONTROLS BUTTON.png-63721ee21b549871543891f3e65777b2.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

BIN
Assets/CONTROLS.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 573 KiB

View File

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

BIN
Assets/CROIXQUIT.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

View File

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="StreamTexture"
path="res://.import/CROIXQUIT.png-20e1bff34bafd878ea4878ea0dc0e9f8.stex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://Assets/CROIXQUIT.png"
dest_files=[ "res://.import/CROIXQUIT.png-20e1bff34bafd878ea4878ea0dc0e9f8.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

Binary file not shown.

After

Width:  |  Height:  |  Size: 403 KiB

View File

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="StreamTexture"
path="res://.import/Ecran titre Paintkilller.png-14baa029673e912baa08491ea67c3d8e.stex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://Assets/Ecran titre Paintkilller.png"
dest_files=[ "res://.import/Ecran titre Paintkilller.png-14baa029673e912baa08491ea67c3d8e.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

BIN
Assets/QUIT BUTTON.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.8 KiB

View File

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="StreamTexture"
path="res://.import/QUIT BUTTON.png-10bf03934e59d556950562e60262de79.stex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://Assets/QUIT BUTTON.png"
dest_files=[ "res://.import/QUIT BUTTON.png-10bf03934e59d556950562e60262de79.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

BIN
Assets/QUIT WINNING.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.6 KiB

View File

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="StreamTexture"
path="res://.import/QUIT WINNING.png-3551c9935981f8ccea98576fcfe4ad99.stex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://Assets/QUIT WINNING.png"
dest_files=[ "res://.import/QUIT WINNING.png-3551c9935981f8ccea98576fcfe4ad99.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

BIN
Assets/RESTART WINNING.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.0 KiB

View File

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="StreamTexture"
path="res://.import/RESTART WINNING.png-1e45ff6cfb6f030f56114a3f8ff08fba.stex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://Assets/RESTART WINNING.png"
dest_files=[ "res://.import/RESTART WINNING.png-1e45ff6cfb6f030f56114a3f8ff08fba.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

BIN
Assets/START BUTTON.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.9 KiB

View File

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="StreamTexture"
path="res://.import/START BUTTON.png-e4c225b72724e2435af095d0ad6fa144.stex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://Assets/START BUTTON.png"
dest_files=[ "res://.import/START BUTTON.png-e4c225b72724e2435af095d0ad6fa144.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

BIN
Assets/WINNER.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 48 KiB

34
Assets/WINNER.png.import Normal file
View File

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

View File

@ -100,7 +100,7 @@ size_flags_vertical = 3
custom_fonts/font = ExtResource( 2 )
text = "Quit"
[node name="EndGameTheme" type="AudioStreamPlayer2D" parent="."]
[node name="EndGameTheme" type="AudioStreamPlayer" parent="."]
pause_mode = 2
stream = ExtResource( 3 )
[connection signal="pressed" from="Window/ColorRect/VBoxContainer/RestartButton" to="Window" method="_on_RestartButton_pressed"]

View File

@ -122,6 +122,6 @@ position = Vector2( 199.123, 592.532 )
]]
position = Vector2( 1730.27, 580.843 )
[node name="MainTheme" type="AudioStreamPlayer2D" parent="."]
[node name="MainTheme" type="AudioStreamPlayer" parent="."]
stream = ExtResource( 6 )
autoplay = true

View File

@ -275,5 +275,5 @@ scale = Vector2( 1.1136, 1.2906 )
z_index = -1
texture = ExtResource( 3 )
[node name="PickupPlayer" type="AudioStreamPlayer2D" parent="."]
[node name="PickupPlayer" type="AudioStreamPlayer" parent="."]
stream = ExtResource( 4 )

View File

@ -1,53 +1,72 @@
[gd_scene load_steps=5 format=2]
[gd_scene load_steps=10 format=2]
[ext_resource path="res://Assets/titlescreen.png" type="Texture" id=1]
[ext_resource path="res://Assets/CONTROLS BUTTON.png" type="Texture" id=1]
[ext_resource path="res://Scripts/TitleScreen.gd" type="Script" id=2]
[ext_resource path="res://icon.png" type="Texture" id=3]
[ext_resource path="res://Assets/QUIT BUTTON.png" type="Texture" id=3]
[ext_resource path="res://Sounds/PaintJamTitleScreen.wav" type="AudioStream" id=4]
[ext_resource path="res://Assets/Ecran titre Paintkilller.png" type="Texture" id=5]
[ext_resource path="res://Assets/START BUTTON.png" type="Texture" id=6]
[ext_resource path="res://Assets/CONTROLS.png" type="Texture" id=7]
[ext_resource path="res://Assets/CROIXQUIT.png" type="Texture" id=8]
[ext_resource path="res://Scripts/Controls.gd" type="Script" id=9]
[node name="TitleScreen" type="Node2D"]
script = ExtResource( 2 )
[node name="Sprite" type="Sprite" parent="."]
scale = Vector2( 1.21961, 1.26337 )
texture = ExtResource( 1 )
[node name="TitleScreen" type="Sprite" parent="."]
texture = ExtResource( 5 )
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
[node name="QuitButton" type="TextureButton" parent="TitleScreen"]
margin_left = 1269.34
margin_top = 828.657
margin_right = 1661.34
margin_bottom = 1009.66
texture_normal = ExtResource( 3 )
__meta__ = {
"_edit_use_anchors_": false
}
[node name="HBoxContainer" type="HBoxContainer" parent="Sprite/MarginContainer"]
margin_left = 674.0
margin_top = 771.0
margin_right = 902.0
margin_bottom = 835.0
size_flags_horizontal = 4
size_flags_vertical = 12
custom_constants/separation = 100
[node name="ControlsButton" type="TextureButton" parent="TitleScreen"]
margin_left = 667.99
margin_top = 826.657
margin_right = 1244.99
margin_bottom = 1020.66
texture_normal = ExtResource( 1 )
__meta__ = {
"_edit_use_anchors_": false
}
[node name="StartGameButton" type="TextureButton" parent="Sprite/MarginContainer/HBoxContainer"]
margin_right = 64.0
margin_bottom = 64.0
size_flags_horizontal = 4
size_flags_vertical = 8
texture_normal = ExtResource( 3 )
[node name="StartButton" type="TextureButton" parent="TitleScreen"]
margin_left = 249.108
margin_top = 848.87
margin_right = 639.108
margin_bottom = 1002.87
texture_normal = ExtResource( 6 )
__meta__ = {
"_edit_use_anchors_": false
}
[node name="QuitGameButton" type="TextureButton" parent="Sprite/MarginContainer/HBoxContainer"]
margin_left = 164.0
margin_right = 228.0
margin_bottom = 64.0
texture_normal = ExtResource( 3 )
[node name="AudioStreamPlayer2D" type="AudioStreamPlayer2D" parent="."]
[node name="AudioStreamPlayer" type="AudioStreamPlayer" parent="."]
stream = ExtResource( 4 )
autoplay = true
[connection signal="pressed" from="Sprite/MarginContainer/HBoxContainer/StartGameButton" to="." method="_on_StartGameButton_pressed"]
[connection signal="pressed" from="Sprite/MarginContainer/HBoxContainer/QuitGameButton" to="." method="_on_QuitGame_pressed"]
[node name="Controls" type="Sprite" parent="."]
visible = false
texture = ExtResource( 7 )
centered = false
script = ExtResource( 9 )
[node name="TextureButton" type="TextureButton" parent="Controls"]
margin_left = 1596.38
margin_top = -0.292526
margin_right = 1766.38
margin_bottom = 153.707
texture_normal = ExtResource( 8 )
__meta__ = {
"_edit_use_anchors_": false
}
[connection signal="pressed" from="TitleScreen/QuitButton" to="." method="_on_QuitButton_pressed"]
[connection signal="pressed" from="TitleScreen/ControlsButton" to="." method="_on_ControlsButton_pressed"]
[connection signal="pressed" from="TitleScreen/StartButton" to="." method="_on_StartButton_pressed"]
[connection signal="pressed" from="Controls/TextureButton" to="Controls" method="_on_TextureButton_pressed"]

5
Scripts/Controls.gd Normal file
View File

@ -0,0 +1,5 @@
extends Sprite
func _on_TextureButton_pressed():
self.visible = false
get_node("/root/TitleScreen/TitleScreen").visible = true

View File

@ -1,7 +1,9 @@
extends Node2D
onready var startGameButton = $Sprite/MarginContainer/HBoxContainer/StartGameButton
onready var quitGameButton = $Sprite/MarginContainer/HBoxContainer/QuitGameButton
onready var startGameButton = $TitleScreen/StartButton
onready var quitGameButton = $TitleScreen/QuitButton
onready var titleScreen = $TitleScreen
onready var controls = $Controls
func _ready():
startGameButton.grab_focus()
@ -12,8 +14,13 @@ func _process(_delta):
elif quitGameButton.is_hovered():
quitGameButton.grab_focus()
func _on_StartGameButton_pressed():
func _on_StartButton_pressed():
get_tree().change_scene("res://Scene/GameMap.tscn")
func _on_QuitGame_pressed():
func _on_QuitButton_pressed():
get_tree().quit()
func _on_ControlsButton_pressed():
titleScreen.visible = false
controls.visible = true