Added used software section to home page

This commit is contained in:
2023-01-30 08:38:26 -06:00
parent 7e09031257
commit 3a8f4e5860

View File

@@ -34,9 +34,43 @@ module TAC
label "Total actions: #{actions.size}"
label "Total variables: #{variables.size}"
end
stack(width: 1.0, fill: true, scroll: true, margin_top: 32) do
heading, items = Gosu::LICENSES.split("\n\n")
title heading
items.split("\n").each do |item|
name, website, license, license_website = item.split(",").map(&:strip)
flow(width: 1.0, height: 28) do
tagline "#{name} - "
button "Website", height: 1.0, tip: website do
open_url(website)
end
end
flow(width: 1.0, height: 22, margin_bottom: 20) do
para "#{license} - "
button "License Website", height: 1.0, text_size: 16, tip: license_website do
open_url(license_website)
end
end
end
end
end
end
end
def open_url(url)
case RUBY_PLATFORM
when /mingw/ # windows
system("start #{url}")
when /linux/
system("xdg-open #{url}")
when /darwin/ # macos
system("open #{url}")
end
end
end
end
end