diff options
author | RealBadAngel <mk@realbadangel.pl> | 2013-02-02 21:29:59 +0100 |
---|---|---|
committer | RealBadAngel <mk@realbadangel.pl> | 2013-02-02 21:29:59 +0100 |
commit | eff76c2ecae327918ed513aa1f29be883865788b (patch) | |
tree | 476083a92afd9c810b733e0ace1b91ed9dba2aae /unified_inventory/api.lua | |
parent | 3b5e6ca05aaedaba8b686594c462b69bf04c827d (diff) |
UI bugfix
Diffstat (limited to 'unified_inventory/api.lua')
-rw-r--r-- | unified_inventory/api.lua | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/unified_inventory/api.lua b/unified_inventory/api.lua index a853903..e7888a0 100644 --- a/unified_inventory/api.lua +++ b/unified_inventory/api.lua @@ -114,16 +114,16 @@ unified_inventory.get_formspec = function(player,page) unified_inventory.current_page[player_name]=page local formspec = "size[14,10]" - + -- player inventory formspec = formspec .. "list[current_player;main;0,4.5;8,4;]" - formspec = formspec.."item_image[0,0;2,2;default:dirt]" + -- main buttons formspec = formspec .. "button[0,9;1.8,.5;craft;Craft]" formspec = formspec .. "button[1.6,9;1.8,.5;craftguide;Craft Guide]" formspec = formspec .. "button[3.2,9;1.8,.5;bags;Bags]" formspec = formspec .. "button[4.8,9;1.8,.5;misc;Misc.]" - + --controls to flip items pages local start_x=9.2 formspec = formspec .. "button["..(start_x+.6*0)..",9;.8,.5;start_list;|<]" @@ -133,10 +133,10 @@ unified_inventory.get_formspec = function(player,page) formspec = formspec .. "button["..(start_x+.6*4)..",9;.8,.5;forward3;>>]" formspec = formspec .. "button["..(start_x+.6*5)..",9;.8,.5;end_list;>|]" - -- search box + -- search box formspec = formspec .. "field[9.195,8.325;3,1;searchbox;;]" - formspec = formspec .. "button[12,8;1.2,1;searchbutton;Search]" - + formspec = formspec .. "button[12,8;1.2,1;searchbutton;Search]" + -- craft page if page=="craft" then formspec = formspec.."label[0,0;Crafting]" @@ -149,7 +149,7 @@ unified_inventory.get_formspec = function(player,page) formspec = formspec.."list[detached:trash;main;7,3;1,1;]" end end - + -- craft guide page if page=="craftguide" then formspec = formspec.."label[0,0;Crafting Guide]" @@ -164,7 +164,7 @@ unified_inventory.get_formspec = function(player,page) local alternates = 0 local alternate = unified_inventory.alternate[player_name] local crafts = crafts_table[item_name] - + if crafts ~= nil then alternates = #crafts local craft = crafts[alternate] |