Skip to content

Commit

Permalink
Update about
Browse files Browse the repository at this point in the history
  • Loading branch information
ninstar committed Jul 11, 2022
1 parent 86a7aa0 commit 0e2c650
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 15 deletions.
18 changes: 6 additions & 12 deletions source/code/ui/dialogs/about.gd
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
extends TabContainer

var xdg: String = ""

func _ready() -> void:

# Connect signals
Expand All @@ -13,28 +11,24 @@ func _ready() -> void:
# Change assets according to theme
get_node("Credits/Home").texture_normal = load("res://assets/ui/themes/"+Main.settings["ui_theme"]+"/logo.svg")
get_node("Credits/Info/Contact").texture_normal = load("res://assets/ui/themes/"+Main.settings["ui_theme"]+"/logo_dev.svg")

# Use xdg
if OS.has_feature("X11"):
xdg = "xdg-open "

# Signals
func _on_Home_pressed() -> void:
OS.shell_open(xdg+Main.metadata["url"]["home"])
OS.shell_open(Main.metadata["url"]["home"])

func _on_Contact_pressed() -> void:
OS.shell_open(xdg+Main.metadata["url"]["contact"])
OS.shell_open(Main.metadata["url"]["contact"])

func _on_Changelog_pressed() -> void:

var _binary_path: String = OS.get_executable_path().get_base_dir()
OS.shell_open(xdg+_binary_path+"/Changelog.pdf")
OS.shell_open(_binary_path+"/Changelog.pdf")

func _on_Group_pressed() -> void:
OS.shell_open(xdg+Main.metadata["url"]["group"])
OS.shell_open(Main.metadata["url"]["group"])

func _on_Credits_meta_clicked(meta) -> void:
OS.shell_open(xdg+str(meta))
OS.shell_open(str(meta))

func _on_License_meta_clicked(meta) -> void:
OS.shell_open(xdg+str(meta))
OS.shell_open(str(meta))
2 changes: 2 additions & 0 deletions source/code/ui/dialogs/about.tscn
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,7 @@ NinStar
[b]Donors[/b] [color=#F46FF0]♥[/color]
Dr. Farinha
kit
Platior
SimpleDimple
Sam Mayhew
WonderAliceUwU"
Expand All @@ -181,6 +182,7 @@ UnixSocket
Donors ♥
Dr. Farinha
kit
Platior
SimpleDimple
Sam Mayhew
WonderAliceUwU"
Expand Down
3 changes: 0 additions & 3 deletions source/code/ui/dialogs/popups/about.gd
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,4 @@ func confirmation_action() -> void:
if not Main.metadata["url"]["help_"+_locale].empty():
_link = Main.metadata["url"]["help_"+_locale]

if OS.has_feature("X11"):
_link = "xdg-open "+_link

OS.shell_open(_link)

0 comments on commit 0e2c650

Please sign in to comment.