From b064de97514deadb2bdadc4b942d61a254ae73f9 Mon Sep 17 00:00:00 2001 From: metamuffin Date: Thu, 9 Oct 2025 17:20:38 +0200 Subject: Add links to licenses used in credits --- client/gui/menus/main/about.gd | 12 ++++++++++++ client/gui/menus/popup_large.gd | 3 +++ client/gui/menus/popup_large.tscn | 5 +++-- 3 files changed, 18 insertions(+), 2 deletions(-) (limited to 'client') 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"] -- cgit v1.3