From 8695929012819eae873c27da7a6d0c43de468df1 Mon Sep 17 00:00:00 2001 From: TechieDamien Date: Sat, 2 Aug 2025 11:47:47 +0100 Subject: [PATCH] Adds credits --- Scenes/main_menu.tscn | 52 +++++++++++++++++++++++++++++++++++++++++++ Scripts/main_menu.gd | 8 +++++++ project.godot | 1 + 3 files changed, 61 insertions(+) diff --git a/Scenes/main_menu.tscn b/Scenes/main_menu.tscn index 49c9865..07371c6 100644 --- a/Scenes/main_menu.tscn +++ b/Scenes/main_menu.tscn @@ -85,6 +85,10 @@ visible = false layout_mode = 2 text = "Options" +[node name="Credits" type="Button" parent="Buttons"] +layout_mode = 2 +text = "Credits" + [node name="Tools" type="Button" parent="Buttons"] layout_mode = 2 text = "Tools Used" @@ -330,10 +334,58 @@ grow_horizontal = 2 grow_vertical = 0 text = "OK" +[node name="CreditsPanel" type="Panel" parent="."] +visible = false +layout_mode = 1 +anchors_preset = -1 +anchor_left = 0.2 +anchor_top = 0.375 +anchor_right = 0.8 +anchor_bottom = 0.9 +grow_horizontal = 2 +grow_vertical = 2 +theme_override_styles/panel = SubResource("StyleBoxFlat_trj04") + +[node name="Label" type="RichTextLabel" parent="CreditsPanel"] +layout_mode = 1 +anchors_preset = 15 +anchor_right = 1.0 +anchor_bottom = 1.0 +grow_horizontal = 2 +grow_vertical = 2 +bbcode_enabled = true +text = "Design and Development +TechieDamien + +QA Testing +InfoDuck + +Identifying and Solving that one bug +Jade + +Moral Support +My Parents" +scroll_active = false +horizontal_alignment = 1 +script = ExtResource("10_16hvj") + +[node name="Button" type="Button" parent="CreditsPanel"] +layout_mode = 1 +anchors_preset = -1 +anchor_top = 1.0 +anchor_right = 1.0 +anchor_bottom = 1.0 +offset_bottom = 27.0 +grow_horizontal = 2 +grow_vertical = 0 +text = "OK" + [connection signal="pressed" from="Buttons/Start" to="." method="start_game"] [connection signal="pressed" from="Buttons/Help" to="." method="show_help"] +[connection signal="pressed" from="Buttons/Credits" to="." method="show_credits"] [connection signal="pressed" from="Buttons/Tools" to="." method="show_tools"] [connection signal="pressed" from="Buttons/SourceCode" to="." method="show_source_code"] [connection signal="pressed" from="Buttons/Quit" to="." method="quit"] [connection signal="pressed" from="HelpPanel/Button" to="." method="hide_help"] [connection signal="pressed" from="ToolPanel/Button" to="." method="hide_tools"] +[connection signal="pressed" from="CreditsPanel/Button" to="." method="hide_credits"] diff --git a/Scripts/main_menu.gd b/Scripts/main_menu.gd index 2ee47b8..a5ca60c 100644 --- a/Scripts/main_menu.gd +++ b/Scripts/main_menu.gd @@ -6,6 +6,8 @@ var main_scene : PackedScene = preload("res://Scenes/main.tscn") var help_panel : Panel = $HelpPanel @onready var tool_panel : Panel = $ToolPanel +@onready +var credits_panel : Panel = $CreditsPanel func _ready() -> void: if OS.has_feature("web"): @@ -30,5 +32,11 @@ func show_tools() -> void: func hide_tools() -> void: tool_panel.visible = false +func show_credits() -> void: + credits_panel.visible = true + +func hide_credits() -> void: + credits_panel.visible = false + func show_source_code() -> void: OS.shell_open("https://git.techiedamien.xyz/TechieDamien/Ouroboros") diff --git a/project.godot b/project.godot index 5db20aa..79e3aba 100644 --- a/project.godot +++ b/project.godot @@ -70,6 +70,7 @@ up={ [rendering] +textures/canvas_textures/default_texture_filter=3 renderer/rendering_method="gl_compatibility" renderer/rendering_method.mobile="gl_compatibility" 2d/snap/snap_2d_transforms_to_pixel=true