summaryrefslogtreecommitdiff
path: root/client/menu
diff options
context:
space:
mode:
Diffstat (limited to 'client/menu')
-rw-r--r--client/menu/about.gd141
-rw-r--r--client/menu/about.tscn84
-rw-r--r--client/menu/credits.gd74
-rw-r--r--client/menu/main.gd4
-rw-r--r--client/menu/main.tscn6
5 files changed, 231 insertions, 78 deletions
diff --git a/client/menu/about.gd b/client/menu/about.gd
new file mode 100644
index 00000000..70d4bb73
--- /dev/null
+++ b/client/menu/about.gd
@@ -0,0 +1,141 @@
+# Hurry Curry! - a game about cooking
+# Copyright 2025 nokoe
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Affero General Public License as published by
+# the Free Software Foundation, version 3 of the License only.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Affero General Public License for more details.
+#
+# You should have received a copy of the GNU Affero General Public License
+# along with this program. If not, see <https://www.gnu.org/licenses/>.
+#
+
+extends Menu
+
+var authors := ["metamuffin", "nokoe", "tpart"]
+var contributors := ["sofviic", "BigBrotherNii", "Miner34"]
+const cc_by_4 := "CC-BY 4.0"
+const cc_by_3 := "CC-BY 3.0"
+const cc0 := "CC0"
+
+const AGPL_NOTICE := """This program is free software: you can redistribute it and/or modify
+it under the terms of the GNU Affero General Public License as
+published by the Free Software Foundation, either version 3 of the
+License, or (at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU Affero General Public License for more details.
+
+You should have received a copy of the GNU Affero General Public License
+along with this program. If not, see <https://www.gnu.org/licenses/>."""
+
+const SOURCE_CODE := "https://codeberg.org/hurrycurry/hurrycurry"
+
+func _ready() -> void:
+ $side/margin/options/first/source.tooltip_text = SOURCE_CODE
+
+var credits := [
+ [tr("c.credits.models"), [
+ ["kenney.nl", "Various Models", cc0],
+ ["Kay Lousberg", "Kitchen tiles", cc0],
+ ["Poly by Google", "Strawberry", cc_by_3],
+ ["Poly by Google", "Fish", cc_by_3]
+ ]],
+ [tr("c.credits.sounds"), [
+ ["Dryoma", "Footstep sounds", cc_by_4],
+ ["Koops", "Page_Turn_24.wav", cc_by_4],
+ ["InspectorJ", "Pencil, Writing, Close, A.wav", cc_by_4],
+ ["Dillon Becker", "Super Dialogue Audio Pack", cc_by_4],
+ ["Ellr", "Universal UI/Menu Soundpack", cc_by_4],
+ ["toyoto", "Woosh Fleuret Escrime B.wav", cc_by_4],
+ ["deleted_user_877451", "Game_over.wav", cc_by_3],
+ ["Quaternius", "Someting, dont remember...", cc0],
+ ["Dillon Becker", "Super Dialogue Audio Pack V1", cc_by_4]
+ ]],
+ [tr("c.credits.translations"), {
+ tr("c.settings.ui.language.zh_Hans"): ["Outbreak2096"],
+ tr("c.settings.ui.language.zh_Hant"): ["hugoalh"],
+ tr("c.settings.ui.language.nl"): ["Vistaus"],
+ tr("c.settings.ui.language.it"): ["Miner34", "solemden"],
+ tr("c.settings.ui.language.eu"): ["josuigoa"],
+ tr("c.settings.ui.language.fr"): ["fnetX", "lejun"],
+ tr("c.settings.ui.language.pl"): ["tranzystorekk"],
+ tr("c.settings.ui.language.he"): ["RustyStriker"],
+ tr("c.settings.ui.language.el"): ["n0toose"],
+ tr("c.settings.ui.language.ja"): ["BigBrotherNii"],
+ tr("c.settings.ui.language.ar"): ["sofviic"],
+ tr("c.settings.ui.language.tr"): ["furkanunsalan", "tekrei"],
+ tr("c.settings.ui.language.ru"): ["0ko"],
+ }]
+]
+
+func _menu_cover(state):
+ $side.visible = not state
+
+func credits_text() -> String:
+ var text = "[center]"
+
+ text += "\n\n\n[b]%s[/b]\n\n%s\n\n[b]%s[/b]\n\n%s\n\n[b]%s[/b]\n\n\n" % [
+ tr("c.credits.title"),
+ tr("c.credits.developed_by"),
+ "\n".join(authors),
+ tr("c.credits.contributors"),
+ ", ".join(contributors),
+ ]
+
+ for section in credits:
+ text += "[b]%s[/b]\n\n" % section[0]
+ if typeof(section[1]) == TYPE_DICTIONARY:
+ text += "[table=2]"
+ for key in section[1]:
+ text += "[cell][right]%s[/right][/cell]" % key
+ text += "[cell][left]%s[/left][/cell]" % ", ".join(section[1][key])
+ text += "[/table]"
+ else:
+ text += "[table=3]"
+ for entry in section[1]:
+ text += "[cell][right]%s[/right][/cell]" % entry[0]
+ text += "[cell][left]%s[/left][/cell]" % entry[1]
+ text += "[cell][left]%s[/left][/cell]" % entry[2]
+ text += "[/table]"
+ text += "\n\n\n"
+
+ text += "\n[b]%s[/b]\n\n\n[/center]" % tr("c.credits.thanks")
+ return text
+
+func legal_text() -> String:
+ var all: Array[String] = []
+ authors.shuffle()
+ contributors.shuffle()
+ all.append_array(authors)
+ all.append_array(contributors)
+ var translators: Array[String] = []
+ for c in credits[2][1].values():
+ translators.append_array(c)
+ translators.shuffle()
+ all.append_array(translators)
+ var text := "Hurry Curry! - a game about cooking\n"
+ text += "[code]Copyright 2024, 2025 %s\n\n" % ", ".join(all)
+ text += "%s[/code]\n\n" % AGPL_NOTICE
+ text += tr("c.legal.using_godot")
+ text += "\n\n[code]%s[/code]" % Engine.get_license_text()
+ return text
+
+func _on_credits_pressed() -> void:
+ submenu("res://menu/credits.tscn", credits_text())
+
+func _on_legal_pressed() -> void:
+ submenu("res://menu/credits.tscn", legal_text())
+
+func _on_back_pressed() -> void:
+ exit()
+
+
+func _on_source_pressed() -> void:
+ OS.shell_open(SOURCE_CODE)
diff --git a/client/menu/about.tscn b/client/menu/about.tscn
new file mode 100644
index 00000000..e02b22da
--- /dev/null
+++ b/client/menu/about.tscn
@@ -0,0 +1,84 @@
+[gd_scene load_steps=6 format=3 uid="uid://bpaenm8c6nmo8"]
+
+[ext_resource type="Script" path="res://menu/about.gd" id="1_0acu0"]
+[ext_resource type="Material" uid="uid://2j8a0c0a2ta5" path="res://menu/theme/materials/blur_material.tres" id="1_ai5pk"]
+[ext_resource type="StyleBox" uid="uid://bw4jamyna1top" path="res://menu/theme/style/panel_style_sidebar.tres" id="2_pya1x"]
+[ext_resource type="FontFile" uid="uid://bo4vh5xkpvrh1" path="res://menu/theme/fonts/font-sansita-swashed.woff2" id="4_kx3j7"]
+
+[sub_resource type="FontVariation" id="FontVariation_o2r3e"]
+base_font = ExtResource("4_kx3j7")
+variation_embolden = 0.5
+
+[node name="AboutMenu" type="Control"]
+layout_mode = 3
+anchors_preset = 15
+anchor_right = 1.0
+anchor_bottom = 1.0
+grow_horizontal = 2
+grow_vertical = 2
+script = ExtResource("1_0acu0")
+
+[node name="side" type="PanelContainer" parent="."]
+material = ExtResource("1_ai5pk")
+layout_mode = 1
+anchors_preset = 9
+anchor_bottom = 1.0
+offset_right = 294.0
+grow_vertical = 2
+theme_override_styles/panel = ExtResource("2_pya1x")
+
+[node name="margin" type="MarginContainer" parent="side"]
+layout_mode = 2
+theme_override_constants/margin_left = 20
+theme_override_constants/margin_top = 20
+theme_override_constants/margin_right = 20
+theme_override_constants/margin_bottom = 20
+
+[node name="options" type="VBoxContainer" parent="side/margin"]
+layout_mode = 2
+
+[node name="title" type="Label" parent="side/margin/options"]
+auto_translate_mode = 2
+layout_mode = 2
+theme_override_colors/font_outline_color = Color(0.566408, 0.208917, 0.266045, 1)
+theme_override_constants/outline_size = 10
+theme_override_fonts/font = SubResource("FontVariation_o2r3e")
+theme_override_font_sizes/font_size = 48
+text = "Hurry Curry!"
+
+[node name="spacer" type="Control" parent="side/margin/options"]
+custom_minimum_size = Vector2(0, 10)
+layout_mode = 2
+
+[node name="first" type="VBoxContainer" parent="side/margin/options"]
+layout_mode = 2
+
+[node name="credits" type="Button" parent="side/margin/options/first"]
+layout_mode = 2
+text = "c.menu.about.credits"
+alignment = 0
+
+[node name="legal" type="Button" parent="side/margin/options/first"]
+layout_mode = 2
+text = "c.menu.about.legal"
+alignment = 0
+
+[node name="source" type="Button" parent="side/margin/options/first"]
+layout_mode = 2
+text = "c.menu.about.source"
+alignment = 0
+
+[node name="first2" type="VBoxContainer" parent="side/margin/options"]
+layout_mode = 2
+size_flags_vertical = 3
+alignment = 2
+
+[node name="back" type="Button" parent="side/margin/options/first2"]
+layout_mode = 2
+text = "c.menu.back"
+alignment = 0
+
+[connection signal="pressed" from="side/margin/options/first/credits" to="." method="_on_credits_pressed"]
+[connection signal="pressed" from="side/margin/options/first/legal" to="." method="_on_legal_pressed"]
+[connection signal="pressed" from="side/margin/options/first/source" to="." method="_on_source_pressed"]
+[connection signal="pressed" from="side/margin/options/first2/back" to="." method="_on_back_pressed"]
diff --git a/client/menu/credits.gd b/client/menu/credits.gd
index 2d5d01b8..d935f874 100644
--- a/client/menu/credits.gd
+++ b/client/menu/credits.gd
@@ -17,83 +17,11 @@
#
extends Menu
-var authors := ["metamuffin", "nokoe", "tpart"]
-var contributors := ["sofviic", "BigBrotherNii", "Miner34"]
-const cc_by_4 := "CC-BY 4.0"
-const cc_by_3 := "CC-BY 3.0"
-const cc0 := "CC0"
-var credits := [
- [tr("c.credits.models"), [
- ["kenney.nl", "Various Models", cc0],
- ["Kay Lousberg", "Kitchen tiles", cc0],
- ["Poly by Google", "Strawberry", cc_by_3],
- ["Poly by Google", "Fish", cc_by_3]
- ]],
- [tr("c.credits.sounds"), [
- ["Dryoma", "Footstep sounds", cc_by_4],
- ["Koops", "Page_Turn_24.wav", cc_by_4],
- ["InspectorJ", "Pencil, Writing, Close, A.wav", cc_by_4],
- ["Dillon Becker", "Super Dialogue Audio Pack", cc_by_4],
- ["Ellr", "Universal UI/Menu Soundpack", cc_by_4],
- ["toyoto", "Woosh Fleuret Escrime B.wav", cc_by_4],
- ["deleted_user_877451", "Game_over.wav", cc_by_3],
- ["Quaternius", "Someting, dont remember...", cc0],
- ["Dillon Becker", "Super Dialogue Audio Pack V1", cc_by_4]
- ]],
- [tr("c.credits.translations"), {
- tr("c.settings.ui.language.zh_Hans"): ["Outbreak2096"],
- tr("c.settings.ui.language.zh_Hant"): ["hugoalh"],
- tr("c.settings.ui.language.nl"): ["Vistaus"],
- tr("c.settings.ui.language.it"): ["Miner34", "solemden"],
- tr("c.settings.ui.language.eu"): ["josuigoa"],
- tr("c.settings.ui.language.fr"): ["fnetX", "lejun"],
- tr("c.settings.ui.language.pl"): ["tranzystorekk"],
- tr("c.settings.ui.language.he"): ["RustyStriker"],
- tr("c.settings.ui.language.el"): ["n0toose"],
- tr("c.settings.ui.language.ja"): ["BigBrotherNii"],
- tr("c.settings.ui.language.ar"): ["sofviic"],
- tr("c.settings.ui.language.tr"): ["furkanunsalan", "tekrei"],
- tr("c.settings.ui.language.ru"): ["0ko"],
- }]
-]
-
@onready var label = $OuterMargin/Panel/InnerMargin/Vert/ScrollContainer/CreditsText
func _ready():
super()
- authors.shuffle()
- contributors.shuffle()
-
- var text = "[center]"
-
- text += "\n\n\n[b]%s[/b]\n\n%s\n\n[b]%s[/b]\n\n%s\n\n[b]%s[/b]\n\n\n" % [
- tr("c.credits.title"),
- tr("c.credits.developed_by"),
- "\n".join(authors),
- tr("c.credits.contributors"),
- ", ".join(contributors),
- ]
-
- for section in credits:
- text += "[b]%s[/b]\n\n" % section[0]
- if typeof(section[1]) == TYPE_DICTIONARY:
- text += "[table=2]"
- for key in section[1]:
- text += "[cell][right]%s[/right][/cell]" % key
- text += "[cell][left]%s[/left][/cell]" % ", ".join(section[1][key])
- text += "[/table]"
- else:
- text += "[table=3]"
- for entry in section[1]:
- text += "[cell][right]%s[/right][/cell]" % entry[0]
- text += "[cell][left]%s[/left][/cell]" % entry[1]
- text += "[cell][left]%s[/left][/cell]" % entry[2]
- text += "[/table]"
- text += "\n\n\n"
-
- text += "\n[b]%s[/b]\n\n\n[/center]" % tr("c.credits.thanks")
-
- label.text = text
+ label.text = data
func _on_back_pressed():
exit()
diff --git a/client/menu/main.gd b/client/menu/main.gd
index 5aa3fbaa..6ae6df45 100644
--- a/client/menu/main.gd
+++ b/client/menu/main.gd
@@ -32,8 +32,8 @@ func _menu_cover(state):
func _on_quit_pressed():
quit()
-func _on_credits_pressed():
- submenu("res://menu/credits.tscn")
+func _on_about_pressed():
+ submenu("res://menu/about.tscn")
func _on_change_character_pressed():
replace_menu("res://menu/character.tscn")
diff --git a/client/menu/main.tscn b/client/menu/main.tscn
index 7ec73085..685ad902 100644
--- a/client/menu/main.tscn
+++ b/client/menu/main.tscn
@@ -75,9 +75,9 @@ layout_mode = 2
text = "c.menu.settings"
alignment = 0
-[node name="credits" type="Button" parent="side/margin/options/first"]
+[node name="about" type="Button" parent="side/margin/options/first"]
layout_mode = 2
-text = "c.menu.credits"
+text = "c.menu.about"
alignment = 0
[node name="quit" type="Button" parent="side/margin/options/first"]
@@ -88,5 +88,5 @@ alignment = 0
[connection signal="pressed" from="side/margin/options/first/play" to="." method="_on_play_pressed"]
[connection signal="pressed" from="side/margin/options/first/change_character" to="." method="_on_change_character_pressed"]
[connection signal="pressed" from="side/margin/options/first/settings" to="." method="_on_settings_pressed"]
-[connection signal="pressed" from="side/margin/options/first/credits" to="." method="_on_credits_pressed"]
+[connection signal="pressed" from="side/margin/options/first/about" to="." method="_on_about_pressed"]
[connection signal="pressed" from="side/margin/options/first/quit" to="." method="_on_quit_pressed"]