diff options
author | Vanessa Ezekowitz <vanessaezekowitz@gmail.com> | 2013-02-26 21:54:13 -0500 |
---|---|---|
committer | Vanessa Ezekowitz <vanessaezekowitz@gmail.com> | 2013-02-26 22:01:17 -0500 |
commit | 21e6261e3f339d69c7612daaf861c0c166640cef (patch) | |
tree | 40a743834811d54d1fd24669d2f89135e5b56063 /unified_inventory | |
parent | 63968475613fab2e10514326a3a8ea4d348d0246 (diff) |
Added graphical backgrounds to all Unified Inventory pages
Diffstat (limited to 'unified_inventory')
-rw-r--r-- | unified_inventory/api.lua | 28 | ||||
-rw-r--r-- | unified_inventory/textures/ui_bags_lg_form.png | bin | 0 -> 11442 bytes | |||
-rw-r--r-- | unified_inventory/textures/ui_bags_main_form.png | bin | 0 -> 8286 bytes | |||
-rw-r--r-- | unified_inventory/textures/ui_bags_med_form.png | bin | 0 -> 9999 bytes | |||
-rw-r--r-- | unified_inventory/textures/ui_bags_sm_form.png | bin | 0 -> 8554 bytes | |||
-rw-r--r-- | unified_inventory/textures/ui_craftguide_form.png | bin | 0 -> 10500 bytes | |||
-rw-r--r-- | unified_inventory/textures/ui_crafting_form.png | bin | 0 -> 10743 bytes | |||
-rw-r--r-- | unified_inventory/textures/ui_form_bg.png | bin | 0 -> 6404 bytes | |||
-rw-r--r-- | unified_inventory/textures/ui_misc_form.png | bin | 0 -> 7098 bytes |
9 files changed, 28 insertions, 0 deletions
diff --git a/unified_inventory/api.lua b/unified_inventory/api.lua index 2eb0b3e..845451b 100644 --- a/unified_inventory/api.lua +++ b/unified_inventory/api.lua @@ -123,6 +123,34 @@ unified_inventory.get_formspec = function(player,page) -- player inventory formspec = formspec .. "list[current_player;main;0,4.5;8,4;]" + -- backgrounds + formspec = formspec .. "background[-0.19,-0.2,;14.38,10.55;ui_form_bg.png]" + if page=="craft" then + formspec = formspec .. "background[0.12,1.05,;7.8,7.4;ui_crafting_form.png]" + end + if page=="craftguide" then + formspec = formspec .. "background[0.12,1.05,;7.8,7.4;ui_craftguide_form.png]" + end + if page=="misc" then + formspec = formspec .. "background[0.12,1.05,;7.8,7.4;ui_misc_form.png]" + end + if page=="bags" then + formspec = formspec .. "background[0.12,1.05,;7.8,7.4;ui_bags_main_form.png]" + end + + for i=1,4 do + if page=="bag"..i then + local slots = player:get_inventory():get_stack(page, 1):get_definition().groups.bagslots + if slots == 8 then + formspec = formspec .. "background[0.12,1.05,;7.8,7.4;ui_bags_sm_form.png]" + elseif slots == 16 then + formspec = formspec .. "background[0.12,1.05,;7.8,7.4;ui_bags_med_form.png]" + elseif slots == 24 then + formspec = formspec .. "background[0.12,1.05,;7.8,7.4;ui_bags_lg_form.png]" + end + end + end + -- main buttons formspec = formspec .. "button[0,9;1.8,.5;craft;Craft]" formspec = formspec .. "button[1.6,9;1.8,.5;craftguide;Craft Guide]" diff --git a/unified_inventory/textures/ui_bags_lg_form.png b/unified_inventory/textures/ui_bags_lg_form.png Binary files differnew file mode 100644 index 0000000..de62e21 --- /dev/null +++ b/unified_inventory/textures/ui_bags_lg_form.png diff --git a/unified_inventory/textures/ui_bags_main_form.png b/unified_inventory/textures/ui_bags_main_form.png Binary files differnew file mode 100644 index 0000000..11cb05d --- /dev/null +++ b/unified_inventory/textures/ui_bags_main_form.png diff --git a/unified_inventory/textures/ui_bags_med_form.png b/unified_inventory/textures/ui_bags_med_form.png Binary files differnew file mode 100644 index 0000000..77b89df --- /dev/null +++ b/unified_inventory/textures/ui_bags_med_form.png diff --git a/unified_inventory/textures/ui_bags_sm_form.png b/unified_inventory/textures/ui_bags_sm_form.png Binary files differnew file mode 100644 index 0000000..f0af238 --- /dev/null +++ b/unified_inventory/textures/ui_bags_sm_form.png diff --git a/unified_inventory/textures/ui_craftguide_form.png b/unified_inventory/textures/ui_craftguide_form.png Binary files differnew file mode 100644 index 0000000..7dbfa61 --- /dev/null +++ b/unified_inventory/textures/ui_craftguide_form.png diff --git a/unified_inventory/textures/ui_crafting_form.png b/unified_inventory/textures/ui_crafting_form.png Binary files differnew file mode 100644 index 0000000..1eaea56 --- /dev/null +++ b/unified_inventory/textures/ui_crafting_form.png diff --git a/unified_inventory/textures/ui_form_bg.png b/unified_inventory/textures/ui_form_bg.png Binary files differnew file mode 100644 index 0000000..37683f0 --- /dev/null +++ b/unified_inventory/textures/ui_form_bg.png diff --git a/unified_inventory/textures/ui_misc_form.png b/unified_inventory/textures/ui_misc_form.png Binary files differnew file mode 100644 index 0000000..103900c --- /dev/null +++ b/unified_inventory/textures/ui_misc_form.png |