Cleaner bg + slot textures

This commit is contained in:
Jean-Patrick Guerrero 2022-07-04 05:10:31 +02:00
parent 9971b8c3e6
commit 60bdfa34fb
4 changed files with 9 additions and 7 deletions

View File

@ -1324,7 +1324,7 @@ local function get_items_fs(fs, data, player, full_height)
local ipp = rows * lines
local size = 0.85
bg9(data.inv_width + 0.1, 0, 7.9, full_height, PNG.bg_full, 10)
bg9(data.inv_width + 0.1, 0, 7.9, full_height, PNG.bg_full)
if data.enable_search then
fs("set_focus[filter]",
@ -1447,7 +1447,7 @@ local function get_panels(fs, data, player)
data.yoffset += panels[i - 1].height + 0.1
end
bg9(data.inv_width + 0.1, data.yoffset, 7.9, panel.height, PNG.bg_full, 10)
bg9(data.inv_width + 0.1, data.yoffset, 7.9, panel.height, PNG.bg_full)
local is_recipe, is_usage = panel.name == "recipes", panel.name == "usages"
panel.func(fs, data, player, panel, is_recipe, is_usage)
@ -1564,7 +1564,7 @@ local function make_fs(player, data)
fs(fmt("formspec_version[%u]size[%f,%f]no_prepend[]bgcolor[#0000]",
i3.settings.min_fs_version, data.inv_width + 8, full_height), styles)
bg9(0, 0, data.inv_width, full_height, PNG.bg_full, 10)
bg9(0, 0, data.inv_width, full_height, PNG.bg_full)
local tab = i3.tabs[data.tab]

View File

@ -1,3 +1,5 @@
local fmt = string.format
local PNG = {
blank = "i3_blank.png",
bg = "i3_bg.png",
@ -23,7 +25,7 @@ local PNG = {
sign = "i3_sign.png",
cancel = "i3_cancel.png",
export = "i3_export.png",
slot = "i3_slot.png",
slot = "i3_slot.png^\\[resize:128x128",
tab = "i3_tab.png",
tab_small = "i3_tab_small.png",
tab_top = "i3_tab.png^\\[transformFY",
@ -74,7 +76,7 @@ local styles = string.format([[
style_type[label,field;font_size=16]
style_type[button;border=false;content_offset=0]
style_type[image_button,item_image_button,checkbox,dropdown;border=false;sound=i3_click]
style_type[item_image_button;bgimg_hovered=%s]
style_type[item_image_button;bgimg_hovered=%s;bgimg_middle=9;padding=-9]
style[;sound=]
style[nofav;sound=i3_cannot]
@ -111,10 +113,10 @@ local fs_elements = {
tooltip = "tooltip[%f,%f;%f,%f;%s]",
button = "button[%f,%f;%f,%f;%s;%s]",
checkbox = "checkbox[%f,%f;%s;%s;%s]",
slot = "image[%f,%f;%f,%f;i3_slot.png]",
slot = "image[%f,%f;%f,%f;" .. fmt("%s;9]", PNG.slot),
item_image = "item_image[%f,%f;%f,%f;%s]",
hypertext = "hypertext[%f,%f;%f,%f;%s;%s]",
bg9 = "background9[%f,%f;%f,%f;%s;false;%u]",
bg9 = "background9[%f,%f;%f,%f;%s;false;12]",
scrollbar = "scrollbar[%f,%f;%f,%f;%s;%s;%u]",
model = "model[%f,%f;%f,%f;%s;%s;%s;%s;%s;%s;%s]",
image_button = "image_button[%f,%f;%f,%f;%s;%s;%s]",

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.7 KiB

After

Width:  |  Height:  |  Size: 2.4 KiB