init
This commit is contained in:
33
rougelikeaboutmechs/ui/screens/title-screen/title_screen.gd
Normal file
33
rougelikeaboutmechs/ui/screens/title-screen/title_screen.gd
Normal file
@@ -0,0 +1,33 @@
|
||||
extends Control
|
||||
|
||||
signal start_game()
|
||||
signal show_credits()
|
||||
signal show_level_select()
|
||||
signal show_settings_screen()
|
||||
signal quit()
|
||||
|
||||
func _ready():
|
||||
$CenterContainer2/VBoxContainer/Start.grab_focus()
|
||||
|
||||
func _on_start_pressed() -> void:
|
||||
start_game.emit()
|
||||
queue_free()
|
||||
|
||||
func _on_credit_pressed() -> void:
|
||||
show_credits.emit()
|
||||
queue_free()
|
||||
|
||||
func _on_level_select_pressed() -> void:
|
||||
show_level_select.emit()
|
||||
queue_free()
|
||||
|
||||
func _on_options_pressed() -> void:
|
||||
show_settings_screen.emit()
|
||||
queue_free()
|
||||
|
||||
func _on_quit_pressed():
|
||||
quit.emit()
|
||||
queue_free()
|
||||
|
||||
func show_levels(b: bool) -> void:
|
||||
$CenterContainer2/VBoxContainer/LevelSelect.visible = b
|
||||
@@ -0,0 +1 @@
|
||||
uid://1mjt83fygiua
|
||||
116
rougelikeaboutmechs/ui/screens/title-screen/title_screen.tscn
Normal file
116
rougelikeaboutmechs/ui/screens/title-screen/title_screen.tscn
Normal file
@@ -0,0 +1,116 @@
|
||||
[gd_scene format=3 uid="uid://ddc3qfst7mbgc"]
|
||||
|
||||
[ext_resource type="Theme" uid="uid://hheneshfv1b2" path="res://ui/themes/your_theme.tres" id="1_qt2rq"]
|
||||
[ext_resource type="Script" uid="uid://1mjt83fygiua" path="res://ui/screens/title-screen/title_screen.gd" id="1_rm86k"]
|
||||
|
||||
[sub_resource type="LabelSettings" id="LabelSettings_s0ue6"]
|
||||
font_size = 150
|
||||
|
||||
[sub_resource type="LabelSettings" id="LabelSettings_73xnf"]
|
||||
font_size = 50
|
||||
|
||||
[sub_resource type="LabelSettings" id="LabelSettings_wly7t"]
|
||||
font_size = 12
|
||||
|
||||
[node name="TitleScreen" type="Control" unique_id=165552926]
|
||||
layout_mode = 3
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
theme = ExtResource("1_qt2rq")
|
||||
script = ExtResource("1_rm86k")
|
||||
|
||||
[node name="CenterContainer" type="CenterContainer" parent="." unique_id=129658239]
|
||||
layout_mode = 1
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
offset_left = 2.0
|
||||
offset_top = 20.0
|
||||
offset_right = 2.0
|
||||
offset_bottom = -269.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
|
||||
[node name="VBoxContainer" type="VBoxContainer" parent="CenterContainer" unique_id=1543886662]
|
||||
layout_mode = 2
|
||||
|
||||
[node name="Label" type="Label" parent="CenterContainer/VBoxContainer" unique_id=457043767]
|
||||
custom_minimum_size = Vector2(731.345, 0)
|
||||
layout_mode = 2
|
||||
text = "R.A.M."
|
||||
label_settings = SubResource("LabelSettings_s0ue6")
|
||||
horizontal_alignment = 1
|
||||
autowrap_mode = 2
|
||||
|
||||
[node name="Label2" type="Label" parent="CenterContainer/VBoxContainer" unique_id=2117014839]
|
||||
custom_minimum_size = Vector2(731.345, 0)
|
||||
layout_mode = 2
|
||||
text = "rouge-like about machines"
|
||||
label_settings = SubResource("LabelSettings_73xnf")
|
||||
horizontal_alignment = 1
|
||||
autowrap_mode = 2
|
||||
|
||||
[node name="CenterContainer2" type="CenterContainer" parent="." unique_id=1706430698]
|
||||
layout_mode = 1
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
offset_top = 309.0
|
||||
offset_bottom = -28.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
|
||||
[node name="VBoxContainer" type="VBoxContainer" parent="CenterContainer2" unique_id=11688683]
|
||||
custom_minimum_size = Vector2(300, 0)
|
||||
layout_mode = 2
|
||||
|
||||
[node name="Start" type="Button" parent="CenterContainer2/VBoxContainer" unique_id=603626461]
|
||||
layout_mode = 2
|
||||
theme_override_font_sizes/font_size = 16
|
||||
text = "Start"
|
||||
|
||||
[node name="LevelSelect" type="Button" parent="CenterContainer2/VBoxContainer" unique_id=1964255967]
|
||||
layout_mode = 2
|
||||
theme_override_font_sizes/font_size = 16
|
||||
text = "Level Select"
|
||||
|
||||
[node name="Options" type="Button" parent="CenterContainer2/VBoxContainer" unique_id=1650158032]
|
||||
layout_mode = 2
|
||||
theme_override_font_sizes/font_size = 16
|
||||
text = "Settings"
|
||||
|
||||
[node name="Credit" type="Button" parent="CenterContainer2/VBoxContainer" unique_id=426848008]
|
||||
layout_mode = 2
|
||||
theme_override_font_sizes/font_size = 16
|
||||
text = "Credits"
|
||||
|
||||
[node name="Quit" type="Button" parent="CenterContainer2/VBoxContainer" unique_id=2004677633]
|
||||
layout_mode = 2
|
||||
theme_override_font_sizes/font_size = 16
|
||||
text = "Quit"
|
||||
|
||||
[node name="Label" type="Label" parent="." unique_id=1786336606]
|
||||
layout_mode = 1
|
||||
anchors_preset = 7
|
||||
anchor_left = 0.5
|
||||
anchor_top = 1.0
|
||||
anchor_right = 0.5
|
||||
anchor_bottom = 1.0
|
||||
offset_left = -76.5
|
||||
offset_top = -25.0
|
||||
offset_right = 76.5
|
||||
offset_bottom = -2.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 0
|
||||
text = "My Version"
|
||||
label_settings = SubResource("LabelSettings_wly7t")
|
||||
horizontal_alignment = 1
|
||||
|
||||
[connection signal="pressed" from="CenterContainer2/VBoxContainer/Start" to="." method="_on_start_pressed"]
|
||||
[connection signal="pressed" from="CenterContainer2/VBoxContainer/LevelSelect" to="." method="_on_level_select_pressed"]
|
||||
[connection signal="pressed" from="CenterContainer2/VBoxContainer/Options" to="." method="_on_options_pressed"]
|
||||
[connection signal="pressed" from="CenterContainer2/VBoxContainer/Credit" to="." method="_on_credit_pressed"]
|
||||
[connection signal="pressed" from="CenterContainer2/VBoxContainer/Quit" to="." method="_on_quit_pressed"]
|
||||
Reference in New Issue
Block a user