aboutsummaryrefslogtreecommitdiff
path: root/client/gui
diff options
context:
space:
mode:
authormetamuffin <metamuffin@disroot.org>2025-10-09 17:20:38 +0200
committermetamuffin <metamuffin@disroot.org>2025-10-09 17:20:38 +0200
commitb064de97514deadb2bdadc4b942d61a254ae73f9 (patch)
tree4bfde1140722d7962543ca8973ceffbb0c66ed67 /client/gui
parent27919ac3e6c274f82a7b93e0941738188773020c (diff)
downloadhurrycurry-b064de97514deadb2bdadc4b942d61a254ae73f9.tar
hurrycurry-b064de97514deadb2bdadc4b942d61a254ae73f9.tar.bz2
hurrycurry-b064de97514deadb2bdadc4b942d61a254ae73f9.tar.zst
Add links to licenses used in credits
Diffstat (limited to 'client/gui')
-rw-r--r--client/gui/menus/main/about.gd12
-rw-r--r--client/gui/menus/popup_large.gd3
-rw-r--r--client/gui/menus/popup_large.tscn5
3 files changed, 18 insertions, 2 deletions
diff --git a/client/gui/menus/main/about.gd b/client/gui/menus/main/about.gd
index 6b0677ad..873c5e53 100644
--- a/client/gui/menus/main/about.gd
+++ b/client/gui/menus/main/about.gd
@@ -23,6 +23,12 @@ const cc_by_3 := "CC-BY 3.0"
const cc_by_sa_4 := "CC-BY-SA 4.0"
const cc0 := "CC0"
+const LICENSE_LINKS = {
+ cc_by_4: "https://creativecommons.org/licenses/by/4.0/",
+ cc_by_3: "https://creativecommons.org/licenses/by/3.0/",
+ cc0: "https://creativecommons.org/publicdomain/zero/1.0/",
+}
+
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, version 3 of the License only.
@@ -118,6 +124,12 @@ func credits_text() -> String:
text += "[cell][left]%s[/left][/cell]" % entry[2]
text += "[/table]"
text += "\n\n\n"
+
+ text += "[b]%s[/b]\n\n[table=2]" % tr("c.credits.licenses")
+ for key in LICENSE_LINKS:
+ text += "[cell][right]%s[/right][/cell]" % key
+ text += "[cell][left][url=%s]%s[/url][/left][/cell]" % [LICENSE_LINKS[key], tr("c.credits.licenses.link_label")]
+ text += "[/table]\n\n\n"
text += "\n[b]%s[/b]\n\n\n[/center]" % tr("c.credits.thanks")
return text
diff --git a/client/gui/menus/popup_large.gd b/client/gui/menus/popup_large.gd
index 772a8373..f821e7a8 100644
--- a/client/gui/menus/popup_large.gd
+++ b/client/gui/menus/popup_large.gd
@@ -23,3 +23,6 @@ func _ready():
func _on_back_pressed():
exit()
+
+func _on_text_meta_clicked(meta: Variant) -> void:
+ OS.shell_open(str(meta))
diff --git a/client/gui/menus/popup_large.tscn b/client/gui/menus/popup_large.tscn
index bcbafe1b..d0891d1b 100644
--- a/client/gui/menus/popup_large.tscn
+++ b/client/gui/menus/popup_large.tscn
@@ -58,11 +58,11 @@ layout_mode = 2
size_flags_horizontal = 3
size_flags_vertical = 3
theme_override_constants/table_h_separation = 25
+theme_override_font_sizes/normal_font_size = 22
+theme_override_font_sizes/bold_font_size = 22
theme_override_font_sizes/bold_italics_font_size = 22
theme_override_font_sizes/italics_font_size = 22
theme_override_font_sizes/mono_font_size = 22
-theme_override_font_sizes/normal_font_size = 22
-theme_override_font_sizes/bold_font_size = 22
bbcode_enabled = true
fit_content = true
scroll_active = false
@@ -71,4 +71,5 @@ scroll_active = false
layout_mode = 2
text = "c.menu.back"
+[connection signal="meta_clicked" from="OuterMargin/Panel/InnerMargin/Vert/ScrollContainer/Text" to="." method="_on_text_meta_clicked"]
[connection signal="pressed" from="OuterMargin/Panel/InnerMargin/Vert/back" to="." method="_on_back_pressed"]