diff options
author | rubenwardy <rw@rubenwardy.com> | 2020-05-17 19:09:10 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-05-17 19:09:10 +0100 |
commit | a9c3a423231e26ea3edee51d5f0bf949ca8e529b (patch) | |
tree | baac0b68f1d2daf66a140dc15d6d731eba64c9dc /builtin/mainmenu/tab_credits.lua | |
parent | c1ce4be756e2554051a27f244303377c0a7d69a6 (diff) | |
download | minetest-a9c3a423231e26ea3edee51d5f0bf949ca8e529b.tar.gz minetest-a9c3a423231e26ea3edee51d5f0bf949ca8e529b.tar.bz2 minetest-a9c3a423231e26ea3edee51d5f0bf949ca8e529b.zip |
Add core.open_url() to main menu API (#8592)
Diffstat (limited to 'builtin/mainmenu/tab_credits.lua')
-rw-r--r-- | builtin/mainmenu/tab_credits.lua | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/builtin/mainmenu/tab_credits.lua b/builtin/mainmenu/tab_credits.lua index 962d2a3b4..c2b7e503a 100644 --- a/builtin/mainmenu/tab_credits.lua +++ b/builtin/mainmenu/tab_credits.lua @@ -101,8 +101,8 @@ return { local logofile = defaulttexturedir .. "logo.png" local version = core.get_version() return "image[0.5,1;" .. core.formspec_escape(logofile) .. "]" .. - "label[0.5,3.2;" .. version.project .. " " .. version.string .. "]" .. - "label[0.5,3.5;http://minetest.net]" .. + "label[0.5,2.8;" .. version.project .. " " .. version.string .. "]" .. + "button[0.5,3;2,2;homepage;minetest.net]" .. "tablecolumns[color;text]" .. "tableoptions[background=#00000000;highlight=#00000000;border=false]" .. "table[3.5,-0.25;8.5,6.05;list_credits;" .. @@ -115,5 +115,10 @@ return { "#FFFF00," .. fgettext("Previous Contributors") .. ",," .. buildCreditList(previous_contributors) .. "," .. ";1]" - end + end, + cbf_button_handler = function(this, fields, name, tabdata) + if fields.homepage then + core.open_url("https://www.minetest.net") + end + end, } |