Skip to content

Commit

Permalink
Sfinv: Rename navigation tabs to reduce chance of a conflict
Browse files Browse the repository at this point in the history
  • Loading branch information
rubenwardy authored and paramat committed Sep 25, 2017
1 parent 74ed63f commit db08c0d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions mods/sfinv/api.lua
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ end
function sfinv.get_nav_fs(player, context, nav, current_idx) function sfinv.get_nav_fs(player, context, nav, current_idx)
-- Only show tabs if there is more than one page -- Only show tabs if there is more than one page
if #nav > 1 then if #nav > 1 then
return "tabheader[0,0;tabs;" .. table.concat(nav, ",") .. ";" .. current_idx .. ";true;false]" return "tabheader[0,0;sfinv_nav_tabs;" .. table.concat(nav, ",") .. ";" .. current_idx .. ";true;false]"
else else
return "" return ""
end end
Expand Down Expand Up @@ -151,8 +151,8 @@ minetest.register_on_player_receive_fields(function(player, formname, fields)
end end


-- Was a tab selected? -- Was a tab selected?
if fields.tabs and context.nav then if fields.sfinv_nav_tabs and context.nav then
local tid = tonumber(fields.tabs) local tid = tonumber(fields.sfinv_nav_tabs)
if tid and tid > 0 then if tid and tid > 0 then
local id = context.nav[tid] local id = context.nav[tid]
local page = sfinv.pages[id] local page = sfinv.pages[id]
Expand Down

0 comments on commit db08c0d

Please sign in to comment.