diff --git a/Resources/Fonts/Beon-Regular.otf b/Resources/Fonts/Beon-Regular.otf new file mode 100644 index 0000000..107b5eb Binary files /dev/null and b/Resources/Fonts/Beon-Regular.otf differ diff --git a/UI/ExitButton.gd b/UI/ExitButton.gd new file mode 100644 index 0000000..2a74143 --- /dev/null +++ b/UI/ExitButton.gd @@ -0,0 +1,9 @@ +extends Button + +func _ready(): + pass # Replace with function body. + + + +func _on_ExitButton_pressed(): + get_tree().quit() diff --git a/UI/MainMenu.tscn b/UI/MainMenu.tscn new file mode 100644 index 0000000..2f1b506 --- /dev/null +++ b/UI/MainMenu.tscn @@ -0,0 +1,67 @@ +[gd_scene load_steps=7 format=2] + +[ext_resource path="res://Resources/Fonts/Beon-Regular.otf" type="DynamicFontData" id=1] +[ext_resource path="res://UI/PlayButton.gd" type="Script" id=2] +[ext_resource path="res://UI/ExitButton.gd" type="Script" id=3] + +[sub_resource type="DynamicFont" id=1] +size = 120 +font_data = ExtResource( 1 ) + +[sub_resource type="DynamicFont" id=2] +size = 32 +font_data = ExtResource( 1 ) + +[sub_resource type="DynamicFont" id=3] +size = 32 +font_data = ExtResource( 1 ) + +[node name="MainMenu" type="Control"] +anchor_right = 1.0 +anchor_bottom = 1.0 + +[node name="BackgroundColorRed" type="ColorRect" parent="."] +margin_right = 1024.0 +margin_bottom = 600.0 +color = Color( 1, 0, 0, 1 ) + +[node name="BackgroundColorWhite" type="ColorRect" parent="BackgroundColorRed"] +margin_right = 1024.0 +margin_bottom = 400.0 + +[node name="GameTitle" type="Label" parent="."] +margin_left = 1.0 +margin_right = 1025.0 +margin_bottom = 400.0 +custom_fonts/font = SubResource( 1 ) +custom_colors/font_color = Color( 1, 1, 1, 1 ) +custom_colors/font_color_shadow = Color( 1, 0, 0, 1 ) +custom_constants/shadow_offset_x = 4 +text = "Retrace" +align = 1 +valign = 1 + +[node name="PlayButton" type="Button" parent="."] +margin_left = 380.0 +margin_top = 410.0 +margin_right = 620.0 +margin_bottom = 470.0 +custom_fonts/font = SubResource( 2 ) +custom_colors/font_color = Color( 1, 1, 1, 1 ) +custom_colors/font_color_hover = Color( 0.980392, 0.839216, 0.619608, 1 ) +text = "Embark" +flat = true +script = ExtResource( 2 ) + +[node name="ExitButton" type="Button" parent="."] +margin_left = 380.0 +margin_top = 470.0 +margin_right = 620.0 +margin_bottom = 530.0 +custom_fonts/font = SubResource( 3 ) +custom_colors/font_color = Color( 1, 1, 1, 1 ) +text = "Disembark" +flat = true +script = ExtResource( 3 ) +[connection signal="pressed" from="PlayButton" to="PlayButton" method="_on_PlayButton_pressed"] +[connection signal="pressed" from="ExitButton" to="ExitButton" method="_on_ExitButton_pressed"] diff --git a/UI/PlayButton.gd b/UI/PlayButton.gd new file mode 100644 index 0000000..70ce177 --- /dev/null +++ b/UI/PlayButton.gd @@ -0,0 +1,8 @@ +extends Button + +func _ready(): + pass # Replace with function body. + + +func _on_PlayButton_pressed(): + get_tree().change_scene("res://Level/World.tscn")