summaryrefslogtreecommitdiff
path: root/builtin/mainmenu/tab_local.lua
diff options
context:
space:
mode:
Diffstat (limited to 'builtin/mainmenu/tab_local.lua')
-rw-r--r--builtin/mainmenu/tab_local.lua34
1 files changed, 17 insertions, 17 deletions
diff --git a/builtin/mainmenu/tab_local.lua b/builtin/mainmenu/tab_local.lua
index 64ea09043..ec99c3946 100644
--- a/builtin/mainmenu/tab_local.lua
+++ b/builtin/mainmenu/tab_local.lua
@@ -17,7 +17,7 @@
local function current_game()
local last_game_id = core.settings:get("menu_last_game")
- local game, index = gamemgr.find_by_gameid(last_game_id)
+ local game, index = pkgmgr.find_by_gameid(last_game_id)
return game
end
@@ -32,12 +32,12 @@ local function singleplayer_refresh_gamebar()
local function game_buttonbar_button_handler(fields)
for key,value in pairs(fields) do
- for j=1,#gamemgr.games,1 do
- if ("game_btnbar_" .. gamemgr.games[j].id == key) then
- mm_texture.update("singleplayer", gamemgr.games[j])
- core.set_topleft_text(gamemgr.games[j].name)
- core.settings:set("menu_last_game",gamemgr.games[j].id)
- menudata.worldlist:set_filtercriteria(gamemgr.games[j].id)
+ for j=1,#pkgmgr.games,1 do
+ if ("game_btnbar_" .. pkgmgr.games[j].id == key) then
+ mm_texture.update("singleplayer", pkgmgr.games[j])
+ core.set_topleft_text(pkgmgr.games[j].name)
+ core.settings:set("menu_last_game",pkgmgr.games[j].id)
+ menudata.worldlist:set_filtercriteria(pkgmgr.games[j].id)
local index = filterlist.get_current_index(menudata.worldlist,
tonumber(core.settings:get("mainmenu_last_selected_world")))
if not index or index < 1 then
@@ -59,21 +59,21 @@ local function singleplayer_refresh_gamebar()
game_buttonbar_button_handler,
{x=-0.3,y=5.9}, "horizontal", {x=12.4,y=1.15})
- for i=1,#gamemgr.games,1 do
- local btn_name = "game_btnbar_" .. gamemgr.games[i].id
+ for i=1,#pkgmgr.games,1 do
+ local btn_name = "game_btnbar_" .. pkgmgr.games[i].id
local image = nil
local text = nil
- local tooltip = core.formspec_escape(gamemgr.games[i].name)
+ local tooltip = core.formspec_escape(pkgmgr.games[i].name)
- if gamemgr.games[i].menuicon_path ~= nil and
- gamemgr.games[i].menuicon_path ~= "" then
- image = core.formspec_escape(gamemgr.games[i].menuicon_path)
+ if pkgmgr.games[i].menuicon_path ~= nil and
+ pkgmgr.games[i].menuicon_path ~= "" then
+ image = core.formspec_escape(pkgmgr.games[i].menuicon_path)
else
- local part1 = gamemgr.games[i].id:sub(1,5)
- local part2 = gamemgr.games[i].id:sub(6,10)
- local part3 = gamemgr.games[i].id:sub(11)
+ local part1 = pkgmgr.games[i].id:sub(1,5)
+ local part2 = pkgmgr.games[i].id:sub(6,10)
+ local part3 = pkgmgr.games[i].id:sub(11)
text = part1 .. "\n" .. part2
if part3 ~= nil and
@@ -213,7 +213,7 @@ local function main_button_handler(this, fields, name, tabdata)
--update last game
local world = menudata.worldlist:get_raw_element(gamedata.selected_world)
if world then
- local game, index = gamemgr.find_by_gameid(world.gameid)
+ local game, index = pkgmgr.find_by_gameid(world.gameid)
core.settings:set("menu_last_game", game.id)
end