From e7543d72e37eb93d77321dc3fcb88b2864359dcb Mon Sep 17 00:00:00 2001 From: GreenBlob <88883098+a-blob@users.noreply.github.com> Date: Fri, 16 Aug 2024 10:59:11 +0800 Subject: [PATCH] Polish inventory (#1340) * Make icon look better * Make icon look even better * Add more icons * Improve spacing * Slightly improve spacing more * Fix off-centered trash icon --- mods/other/crafting/gui.lua | 18 +++++++++--------- .../crafting/textures/crafting_next_icon.png | Bin 0 -> 176 bytes .../crafting/textures/crafting_prev_icon.png | Bin 0 -> 177 bytes .../crafting/textures/crafting_save_icon.png | Bin 718 -> 270 bytes .../textures/crafting_search_icon.png | Bin 0 -> 222 bytes 5 files changed, 9 insertions(+), 9 deletions(-) create mode 100644 mods/other/crafting/textures/crafting_next_icon.png create mode 100644 mods/other/crafting/textures/crafting_prev_icon.png create mode 100644 mods/other/crafting/textures/crafting_search_icon.png diff --git a/mods/other/crafting/gui.lua b/mods/other/crafting/gui.lua index 2f14533096..df8189aefd 100644 --- a/mods/other/crafting/gui.lua +++ b/mods/other/crafting/gui.lua @@ -55,22 +55,22 @@ function crafting.make_result_selector(player, size, context) table_insert(formspec, "style_type[item_image_button;border=false]") table_insert(formspec, "field_close_on_enter[query;false]") - table_insert(formspec, "field[-4.75,0.81;3,0.8;query;;") + table_insert(formspec, "field[-4.75,1.21;3,0.8;query;;") table_insert(formspec, context.crafting_query) - table_insert(formspec, "]button[-2.2,0.5;0.8,0.8;search;?]") - table_insert(formspec, "button[-1.4,0.5;0.8,0.8;prev;<]") - table_insert(formspec, "button[-0.8,0.5;0.8,0.8;next;>]") + table_insert(formspec, "]image_button[-2.2,0.9;0.8,0.8;crafting_search_icon.png;search;]") + table_insert(formspec, "image_button[-1.4,0.9;0.8,0.8;crafting_prev_icon.png;prev;]") + table_insert(formspec, "image_button[-0.8,0.9;0.8,0.8;crafting_next_icon.png;next;]") table_insert(formspec, "container_end[]") - table_insert(formspec, "label[0,-0.25;") + table_insert(formspec, "label[0,-0.1;") table_insert(formspec, minetest.formspec_escape( "Page: " .. page .. "/" .. max_pages) ) table_insert(formspec, "]") local x = 0 - local y = 0 + local y = 0.3 local y_offset = 0.2 for i = start_i, math.min(#recipes, start_i * num_per_page) do local result = recipes[i] @@ -200,9 +200,9 @@ if minetest.global_exists("sfinv") then crafting.calc_inventory_list_hash(player:get_inventory(), "main") local formspec = crafting.make_result_selector(player, { x = 8, y = 3 }, context) - formspec = formspec .. "list[detached:crafting_trash;main;0,3.4;1,1;]" .. - "image[0.05,3.5;0.8,0.8;crafting_trash_icon.png]" .. - "image_button[1,3.4;1,1;crafting_save_icon.png;save_inv_order;]" .. + formspec = formspec .. "list[detached:crafting_trash;main;0,3.8;1,1;]" .. + "image[0.07,3.9;0.8,0.8;crafting_trash_icon.png]" .. + "image_button[1,3.8;1,1;crafting_save_icon.png;save_inv_order;]" .. "tooltip[save_inv_order;Saves the order of the items in your inventory" .. "\n(Your saved order is used when you respawn, and is per-mode)]" diff --git a/mods/other/crafting/textures/crafting_next_icon.png b/mods/other/crafting/textures/crafting_next_icon.png new file mode 100644 index 0000000000000000000000000000000000000000..af59ac9318e26b1d69b65123eeece81bc70d29f2 GIT binary patch literal 176 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!93?!50ihlx9jKx9jPK-BC>eK@{oCO|{#S9GG z!XV7ZFl&wkP>?6UC&U#{|sD^dgwnu&j|d%D~WN$tAdI_CzC~ OMg~t;KbLh*2~7a#7%ubx literal 0 HcmV?d00001 diff --git a/mods/other/crafting/textures/crafting_prev_icon.png b/mods/other/crafting/textures/crafting_prev_icon.png new file mode 100644 index 0000000000000000000000000000000000000000..a6dc7f743e1a9c28bf5a770f03aaa74672a6c737 GIT binary patch literal 177 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!93?!50ihlx9jKx9jPK-BC>eK@{oCO|{#S9GG z!XV7ZFl&wkP>?6UC&U#QxD{D7I;J!Gcf2WgD_*oQu{KXpmBgt zh%1m*RoAt&cAYeB>DrBl_aC|(lTe_gW8&!(nV3>!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