diff --git a/Translations/Translations.pot b/Translations/Translations.pot
index 98fff7828..8ef06e0e6 100644
--- a/Translations/Translations.pot
+++ b/Translations/Translations.pot
@@ -970,6 +970,10 @@ msgstr ""
msgid "About Pixelorama"
msgstr ""
+#. Found under the Help menu. When clicked, it opens the URL of Orama Interactive's patreon page.
+msgid "Support Pixelorama's Development"
+msgstr ""
+
msgid "Pixelorama - Pixelate your dreams!"
msgstr ""
@@ -982,7 +986,8 @@ msgstr ""
msgid "Website"
msgstr ""
-msgid "GitHub Repo"
+#. Found in the About dialog. A button that, when you click it, it opens the URL of Pixelorama's source code.
+msgid "Source Code"
msgstr ""
msgid "Donate"
diff --git a/assets/graphics/icons/icon_16x16.png b/assets/graphics/icons/icon_16x16.png
new file mode 100644
index 000000000..2a820236e
Binary files /dev/null and b/assets/graphics/icons/icon_16x16.png differ
diff --git a/assets/graphics/icons/icon_16x16.png.import b/assets/graphics/icons/icon_16x16.png.import
new file mode 100644
index 000000000..0656d663b
--- /dev/null
+++ b/assets/graphics/icons/icon_16x16.png.import
@@ -0,0 +1,34 @@
+[remap]
+
+importer="texture"
+type="CompressedTexture2D"
+uid="uid://c7yvcxpiq8spa"
+path="res://.godot/imported/icon_16x16.png-256ac70bddc974584d574bbbf4b41c7c.ctex"
+metadata={
+"vram_texture": false
+}
+
+[deps]
+
+source_file="res://assets/graphics/icons/icon_16x16.png"
+dest_files=["res://.godot/imported/icon_16x16.png-256ac70bddc974584d574bbbf4b41c7c.ctex"]
+
+[params]
+
+compress/mode=0
+compress/high_quality=false
+compress/lossy_quality=0.7
+compress/hdr_compression=1
+compress/normal_map=0
+compress/channel_pack=0
+mipmaps/generate=false
+mipmaps/limit=-1
+roughness/mode=0
+roughness/src_normal=""
+process/fix_alpha_border=true
+process/premult_alpha=false
+process/normal_map_invert_y=false
+process/hdr_as_srgb=false
+process/hdr_clamp_exposure=false
+process/size_limit=0
+detect_3d/compress_to=1
diff --git a/assets/graphics/misc/external_link.svg b/assets/graphics/misc/external_link.svg
new file mode 100644
index 000000000..a5042900b
--- /dev/null
+++ b/assets/graphics/misc/external_link.svg
@@ -0,0 +1 @@
+
diff --git a/assets/graphics/misc/external_link.svg.import b/assets/graphics/misc/external_link.svg.import
new file mode 100644
index 000000000..b5fb4eaf8
--- /dev/null
+++ b/assets/graphics/misc/external_link.svg.import
@@ -0,0 +1,37 @@
+[remap]
+
+importer="texture"
+type="CompressedTexture2D"
+uid="uid://3v78ojo0pkfg"
+path="res://.godot/imported/external_link.svg-4c5b7d811a70be6a780cd15f86677f9a.ctex"
+metadata={
+"vram_texture": false
+}
+
+[deps]
+
+source_file="res://assets/graphics/misc/external_link.svg"
+dest_files=["res://.godot/imported/external_link.svg-4c5b7d811a70be6a780cd15f86677f9a.ctex"]
+
+[params]
+
+compress/mode=0
+compress/high_quality=false
+compress/lossy_quality=0.7
+compress/hdr_compression=1
+compress/normal_map=0
+compress/channel_pack=0
+mipmaps/generate=false
+mipmaps/limit=-1
+roughness/mode=0
+roughness/src_normal=""
+process/fix_alpha_border=true
+process/premult_alpha=false
+process/normal_map_invert_y=false
+process/hdr_as_srgb=false
+process/hdr_clamp_exposure=false
+process/size_limit=0
+detect_3d/compress_to=1
+svg/scale=1.0
+editor/scale_with_editor_scale=false
+editor/convert_colors_with_editor_theme=false
diff --git a/assets/graphics/misc/heart.svg b/assets/graphics/misc/heart.svg
new file mode 100644
index 000000000..117e31116
--- /dev/null
+++ b/assets/graphics/misc/heart.svg
@@ -0,0 +1 @@
+
diff --git a/assets/graphics/misc/heart.svg.import b/assets/graphics/misc/heart.svg.import
new file mode 100644
index 000000000..1b084210f
--- /dev/null
+++ b/assets/graphics/misc/heart.svg.import
@@ -0,0 +1,37 @@
+[remap]
+
+importer="texture"
+type="CompressedTexture2D"
+uid="uid://qqndfexvoxl1"
+path="res://.godot/imported/heart.svg-69a32c8bb763f6140fb082aa8a95f07a.ctex"
+metadata={
+"vram_texture": false
+}
+
+[deps]
+
+source_file="res://assets/graphics/misc/heart.svg"
+dest_files=["res://.godot/imported/heart.svg-69a32c8bb763f6140fb082aa8a95f07a.ctex"]
+
+[params]
+
+compress/mode=0
+compress/high_quality=false
+compress/lossy_quality=0.7
+compress/hdr_compression=1
+compress/normal_map=0
+compress/channel_pack=0
+mipmaps/generate=false
+mipmaps/limit=-1
+roughness/mode=0
+roughness/src_normal=""
+process/fix_alpha_border=true
+process/premult_alpha=false
+process/normal_map_invert_y=false
+process/hdr_as_srgb=false
+process/hdr_clamp_exposure=false
+process/size_limit=0
+detect_3d/compress_to=1
+svg/scale=1.0
+editor/scale_with_editor_scale=false
+editor/convert_colors_with_editor_theme=false
diff --git a/src/Autoload/Global.gd b/src/Autoload/Global.gd
index 0f4e9314c..1fbe945eb 100644
--- a/src/Autoload/Global.gd
+++ b/src/Autoload/Global.gd
@@ -64,7 +64,13 @@ enum ImageMenu {
enum SelectMenu { SELECT_ALL, CLEAR_SELECTION, INVERT, TILE_MODE }
## Enumeration of items present in the Help Menu.
enum HelpMenu {
- VIEW_SPLASH_SCREEN, ONLINE_DOCS, ISSUE_TRACKER, OPEN_LOGS_FOLDER, CHANGELOG, ABOUT_PIXELORAMA
+ VIEW_SPLASH_SCREEN,
+ ONLINE_DOCS,
+ ISSUE_TRACKER,
+ OPEN_LOGS_FOLDER,
+ CHANGELOG,
+ ABOUT_PIXELORAMA,
+ SUPPORT_PIXELORAMA
}
## The file used to save preferences that use [code]ProjectSettings.save_custom()[/code].
diff --git a/src/UI/Dialogs/AboutDialog.gd b/src/UI/Dialogs/AboutDialog.gd
index e33a5ea36..cef80c9f4 100644
--- a/src/UI/Dialogs/AboutDialog.gd
+++ b/src/UI/Dialogs/AboutDialog.gd
@@ -284,10 +284,6 @@ func _on_GitHub_pressed() -> void:
OS.shell_open("https://github.com/Orama-Interactive/Pixelorama")
-func _on_Donate_pressed() -> void:
- OS.shell_open("https://www.patreon.com/OramaInteractive")
-
-
func create_donors() -> void:
var donors_root := donors.create_item()
for donor in DONORS:
diff --git a/src/UI/Dialogs/AboutDialog.tscn b/src/UI/Dialogs/AboutDialog.tscn
index 20f118045..b25bdd7f7 100644
--- a/src/UI/Dialogs/AboutDialog.tscn
+++ b/src/UI/Dialogs/AboutDialog.tscn
@@ -12,6 +12,7 @@ font = ExtResource("3_jqhhb")
font_size = 12
[node name="AboutDialog" type="Popup"]
+position = Vector2i(0, 36)
size = Vector2i(700, 470)
unresizable = false
borderless = false
@@ -54,18 +55,15 @@ layout_mode = 2
[node name="Website" type="Button" parent="AboutUI/IconsButtons/SloganAndLinks/VBoxContainer/LinkButtons"]
layout_mode = 2
+size_flags_horizontal = 3
mouse_default_cursor_shape = 2
text = "Website"
[node name="GitHub" type="Button" parent="AboutUI/IconsButtons/SloganAndLinks/VBoxContainer/LinkButtons"]
layout_mode = 2
+size_flags_horizontal = 3
mouse_default_cursor_shape = 2
-text = "GitHub Repo"
-
-[node name="Donate" type="Button" parent="AboutUI/IconsButtons/SloganAndLinks/VBoxContainer/LinkButtons"]
-layout_mode = 2
-mouse_default_cursor_shape = 2
-text = "Donate"
+text = "Source Code"
[node name="OramaLogo" type="TextureRect" parent="AboutUI/IconsButtons"]
layout_mode = 2
@@ -159,6 +157,5 @@ label_settings = SubResource("LabelSettings_aewb6")
[connection signal="visibility_changed" from="." to="." method="_on_visibility_changed"]
[connection signal="pressed" from="AboutUI/IconsButtons/SloganAndLinks/VBoxContainer/LinkButtons/Website" to="." method="_on_Website_pressed"]
[connection signal="pressed" from="AboutUI/IconsButtons/SloganAndLinks/VBoxContainer/LinkButtons/GitHub" to="." method="_on_GitHub_pressed"]
-[connection signal="pressed" from="AboutUI/IconsButtons/SloganAndLinks/VBoxContainer/LinkButtons/Donate" to="." method="_on_Donate_pressed"]
[connection signal="item_selected" from="AboutUI/Credits/Groups" to="." method="_on_Groups_item_selected"]
[connection signal="tab_changed" from="AboutUI/Credits/Licenses/LicenseTabs" to="." method="_on_LicenseTabs_tab_changed"]
diff --git a/src/UI/TopMenuContainer/TopMenuContainer.gd b/src/UI/TopMenuContainer/TopMenuContainer.gd
index 81ce15e7a..dc1dbf81a 100644
--- a/src/UI/TopMenuContainer/TopMenuContainer.gd
+++ b/src/UI/TopMenuContainer/TopMenuContainer.gd
@@ -1,6 +1,13 @@
extends Panel
+
+const DOCS_URL := "https://www.oramainteractive.com/Pixelorama-Docs/"
+const ISSUES_URL := "https://github.com/Orama-Interactive/Pixelorama/issues"
+const SUPPORT_URL := "https://www.patreon.com/OramaInteractive"
# gdlint: ignore=max-line-length
const CHANGELOG_URL := "https://github.com/Orama-Interactive/Pixelorama/blob/master/CHANGELOG.md#v011---2023-06-13"
+const EXTERNAL_LINK_ICON := preload("res://assets/graphics/misc/external_link.svg")
+const PIXELORAMA_ICON := preload("res://assets/graphics/icons/icon_16x16.png")
+const HEART_ICON := preload("res://assets/graphics/misc/heart.svg")
var recent_projects := []
var layouts := [
@@ -326,33 +333,54 @@ func _setup_help_menu() -> void:
"Open Logs Folder": "open_logs_folder",
"Changelog": "changelog",
"About Pixelorama": "about_pixelorama",
+ "Support Pixelorama's Development": &"",
}
var i := 0
for item in help_menu_items:
- _set_menu_shortcut(help_menu_items[item], help_menu, i, item)
+ var icon: Texture2D = null
+ if (
+ i == Global.HelpMenu.ONLINE_DOCS
+ or i == Global.HelpMenu.ISSUE_TRACKER
+ or i == Global.HelpMenu.CHANGELOG
+ ):
+ icon = EXTERNAL_LINK_ICON
+ if i == Global.HelpMenu.ABOUT_PIXELORAMA:
+ icon = PIXELORAMA_ICON
+ elif i == Global.HelpMenu.SUPPORT_PIXELORAMA:
+ icon = HEART_ICON
+ _set_menu_shortcut(help_menu_items[item], help_menu, i, item, false, false, icon)
+
i += 1
help_menu.id_pressed.connect(help_menu_id_pressed)
func _set_menu_shortcut(
- action: StringName, menu: PopupMenu, index: int, text: String, is_check := false, echo := false
+ action: StringName,
+ menu: PopupMenu,
+ index: int,
+ text: String,
+ is_check := false,
+ echo := false,
+ icon: Texture2D = null
) -> void:
if action.is_empty():
if is_check:
- menu.add_item(text, index)
- else:
menu.add_check_item(text, index)
- return
- var shortcut := Shortcut.new()
- var event := InputEventAction.new()
- event.action = action
- shortcut.events.append(event)
- if is_check:
- menu.add_check_shortcut(shortcut, index)
+ else:
+ menu.add_item(text, index)
else:
- menu.add_shortcut(shortcut, index, false, echo)
- menu.set_item_text(index, text)
+ var shortcut := Shortcut.new()
+ var event := InputEventAction.new()
+ event.action = action
+ shortcut.events.append(event)
+ if is_check:
+ menu.add_check_shortcut(shortcut, index)
+ else:
+ menu.add_shortcut(shortcut, index, false, echo)
+ menu.set_item_text(index, text)
+ if is_instance_valid(icon):
+ menu.set_item_icon(index, icon)
func _handle_metadata(id: int, popup_menu: PopupMenu) -> void:
@@ -740,9 +768,9 @@ func help_menu_id_pressed(id: int) -> void:
Global.HelpMenu.VIEW_SPLASH_SCREEN:
_popup_dialog(Global.control.get_node("Dialogs/SplashDialog"))
Global.HelpMenu.ONLINE_DOCS:
- OS.shell_open("https://www.oramainteractive.com/Pixelorama-Docs/")
+ OS.shell_open(DOCS_URL)
Global.HelpMenu.ISSUE_TRACKER:
- OS.shell_open("https://github.com/Orama-Interactive/Pixelorama/issues")
+ OS.shell_open(ISSUES_URL)
Global.HelpMenu.OPEN_LOGS_FOLDER:
var dir := DirAccess.open("user://logs")
dir.make_dir_recursive("user://logs") # In case someone deleted it
@@ -751,5 +779,7 @@ func help_menu_id_pressed(id: int) -> void:
OS.shell_open(CHANGELOG_URL)
Global.HelpMenu.ABOUT_PIXELORAMA:
_popup_dialog(Global.control.get_node("Dialogs/AboutDialog"))
+ Global.HelpMenu.SUPPORT_PIXELORAMA:
+ OS.shell_open(SUPPORT_URL)
_:
_handle_metadata(id, help_menu)