From f61114dce957882aef2a8d7289e87273c9b3e157 Mon Sep 17 00:00:00 2001 From: lexzach Date: Sat, 22 Mar 2025 20:15:41 -0400 Subject: [PATCH] fixed some title stuff --- godot/main_scenes/menu.tscn | 63 ++++++++++++++++++++++++------------- godot/project.godot | 1 + godot/scripts/menu.gd | 5 +++ 3 files changed, 47 insertions(+), 22 deletions(-) diff --git a/godot/main_scenes/menu.tscn b/godot/main_scenes/menu.tscn index 9e227ae..940468d 100644 --- a/godot/main_scenes/menu.tscn +++ b/godot/main_scenes/menu.tscn @@ -1,56 +1,47 @@ -[gd_scene load_steps=6 format=3 uid="uid://v7vh1typhj0k"] +[gd_scene load_steps=5 format=3 uid="uid://v7vh1typhj0k"] [ext_resource type="FontFile" uid="uid://crvjehkpjh5r4" path="res://assets/fonts/autobahn.ttf" id="1_38vls"] [ext_resource type="Script" uid="uid://xilsm8v1rt1t" path="res://scripts/menu.gd" id="1_f5540"] [ext_resource type="FontFile" uid="uid://byv0ntqpvosrc" path="res://assets/fonts/18938.ttf" id="2_1xsbm"] -[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_1xsbm"] -content_margin_left = 40.0 -content_margin_top = 40.0 -content_margin_right = 40.0 -content_margin_bottom = 40.0 - [sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_38vls"] -[node name="Menu" type="Control"] -layout_mode = 3 +[node name="Menu" type="MarginContainer"] anchors_preset = 15 anchor_right = 1.0 anchor_bottom = 1.0 grow_horizontal = 2 grow_vertical = 2 +theme_override_constants/margin_left = 40 +theme_override_constants/margin_top = 40 +theme_override_constants/margin_right = 40 +theme_override_constants/margin_bottom = 40 script = ExtResource("1_f5540") -[node name="PanelContainer" type="PanelContainer" parent="."] -layout_mode = 0 -offset_right = 40.0 -offset_bottom = 40.0 -theme_override_styles/panel = SubResource("StyleBoxEmpty_1xsbm") - -[node name="HBoxContainer" type="HBoxContainer" parent="PanelContainer"] +[node name="HBoxContainer" type="HBoxContainer" parent="."] layout_mode = 2 -[node name="VBoxContainer" type="VBoxContainer" parent="PanelContainer/HBoxContainer"] +[node name="VBoxContainer" type="VBoxContainer" parent="HBoxContainer"] layout_mode = 2 -[node name="title" type="Label" parent="PanelContainer/HBoxContainer/VBoxContainer"] +[node name="title" type="Label" parent="HBoxContainer/VBoxContainer"] layout_mode = 2 theme_override_fonts/font = ExtResource("1_38vls") theme_override_font_sizes/font_size = 120 text = "Extreme Intense Mathematics" -[node name="author" type="Label" parent="PanelContainer/HBoxContainer/VBoxContainer"] +[node name="author" type="Label" parent="HBoxContainer/VBoxContainer"] layout_mode = 2 theme_override_fonts/font = ExtResource("2_1xsbm") theme_override_font_sizes/font_size = 50 text = "Made by Lexzach (Zach Bowden)" -[node name="HSeparator" type="HSeparator" parent="PanelContainer/HBoxContainer/VBoxContainer"] +[node name="HSeparator" type="HSeparator" parent="HBoxContainer/VBoxContainer"] layout_mode = 2 theme_override_constants/separation = 180 theme_override_styles/separator = SubResource("StyleBoxEmpty_38vls") -[node name="start_button" type="Button" parent="PanelContainer/HBoxContainer/VBoxContainer"] +[node name="start_button" type="Button" parent="HBoxContainer/VBoxContainer"] custom_minimum_size = Vector2(400, 0) layout_mode = 2 size_flags_horizontal = 0 @@ -60,4 +51,32 @@ theme_override_fonts/font = ExtResource("1_38vls") theme_override_font_sizes/font_size = 96 text = "Play" -[connection signal="pressed" from="PanelContainer/HBoxContainer/VBoxContainer/start_button" to="." method="_on_start_button_pressed"] +[node name="HSeparator2" type="HSeparator" parent="HBoxContainer/VBoxContainer"] +layout_mode = 2 +theme_override_constants/separation = 65 +theme_override_styles/separator = SubResource("StyleBoxEmpty_38vls") + +[node name="quit_button" type="Button" parent="HBoxContainer/VBoxContainer"] +custom_minimum_size = Vector2(400, 0) +layout_mode = 2 +size_flags_horizontal = 0 +size_flags_vertical = 4 +mouse_default_cursor_shape = 2 +theme_override_fonts/font = ExtResource("1_38vls") +theme_override_font_sizes/font_size = 96 +text = "Quit" + +[node name="VBoxContainer" type="VBoxContainer" parent="."] +layout_mode = 2 +mouse_filter = 2 +alignment = 2 + +[node name="VERSION" type="Label" parent="VBoxContainer"] +unique_name_in_owner = true +layout_mode = 2 +theme_override_fonts/font = ExtResource("2_1xsbm") +theme_override_font_sizes/font_size = 50 +text = "Version" + +[connection signal="pressed" from="HBoxContainer/VBoxContainer/start_button" to="." method="_on_start_button_pressed"] +[connection signal="pressed" from="HBoxContainer/VBoxContainer/quit_button" to="." method="_on_quit_button_pressed"] diff --git a/godot/project.godot b/godot/project.godot index 8f33e92..275123e 100644 --- a/godot/project.godot +++ b/godot/project.godot @@ -11,6 +11,7 @@ config_version=5 [application] config/name="Extremely Intense Math" +config/version="v0.1" run/main_scene="uid://v7vh1typhj0k" config/features=PackedStringArray("4.4", "Forward Plus") config/icon="res://icon.svg" diff --git a/godot/scripts/menu.gd b/godot/scripts/menu.gd index cdf3445..8337cea 100644 --- a/godot/scripts/menu.gd +++ b/godot/scripts/menu.gd @@ -1,6 +1,11 @@ extends Node +func _ready() -> void: + %VERSION.text = ProjectSettings.get_setting("application/config/version") func _on_start_button_pressed() -> void: GLOBALVARS.reset_variables() get_tree().change_scene_to_file("res://main_scenes/game.tscn") + +func _on_quit_button_pressed() -> void: + get_tree().quit(0)