diff options
author | rubenwardy <rw@rubenwardy.com> | 2020-06-04 21:53:26 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-06-04 21:53:26 +0100 |
commit | 850af80089b3415265c4b4b744448509f776a52d (patch) | |
tree | d26698f9e947b9232f5b6510c83956aa37e13d98 /builtin/mainmenu/tab_local.lua | |
parent | c1e01bc638637efa788b5698238a465406bc3f5e (diff) | |
download | minetest-850af80089b3415265c4b4b744448509f776a52d.tar.gz minetest-850af80089b3415265c4b4b744448509f776a52d.tar.bz2 minetest-850af80089b3415265c4b4b744448509f776a52d.zip |
Add buttons to ContentDB in game bar and configure world (#9944)
Diffstat (limited to 'builtin/mainmenu/tab_local.lua')
-rw-r--r-- | builtin/mainmenu/tab_local.lua | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/builtin/mainmenu/tab_local.lua b/builtin/mainmenu/tab_local.lua index cd6cbea46..a21cf12b1 100644 --- a/builtin/mainmenu/tab_local.lua +++ b/builtin/mainmenu/tab_local.lua @@ -35,6 +35,15 @@ if enable_gamebar then end local function game_buttonbar_button_handler(fields) + if fields.game_open_cdb then + local maintab = ui.find_by_name("maintab") + local dlg = create_store_dlg("game") + dlg:set_parent(maintab) + maintab:hide() + dlg:show() + return true + end + for key,value in pairs(fields) do for j=1,#pkgmgr.games,1 do if ("game_btnbar_" .. pkgmgr.games[j].id == key) then @@ -87,6 +96,9 @@ if enable_gamebar then end btnbar:add_button(btn_name, text, image, tooltip) end + + local plus_image = core.formspec_escape(defaulttexturedir .. "plus.png") + btnbar:add_button("game_open_cdb", "", plus_image, fgettext("Install games from ContentDB")) end else function current_game() |