Tweak rendering of skinsdb’s skinlist
Makes skin previews 2:1 & removes button-padding
This commit is contained in:
parent
d05997413b
commit
74f8fe64a8
|
@ -503,17 +503,17 @@ local function get_skinsdb_fs(data, fs, player, yextra)
|
|||
if not skin then break end
|
||||
local btn_name = fmt("skin_btn_%u", i + 1)
|
||||
|
||||
fs([[ style[%s;padding=10;fgimg=%s;bgimg=%s;bgimg_hovered=i3_btn9_hovered.png;
|
||||
fs([[ style[%s;padding=0;fgimg=%s;bgimg=%s;bgimg_hovered=i3_btn9_hovered.png;
|
||||
bgimg_pressed=i3_btn9_pressed.png;bgimg_middle=4,6;sound=] ]],
|
||||
btn_name, skin:get_preview(),
|
||||
skin.name == skin_name and "i3_btn9_hovered.png" or "i3_btn9.png")
|
||||
|
||||
local X = (i % 3) * 1.93
|
||||
local X = (i % 3) * 1.77 + .25
|
||||
|
||||
local Y = ceil((i % spp - X) / 3 + 1)
|
||||
Y += (Y * 2.45) + yextra - 2.75 + add_y
|
||||
|
||||
image_button(X, Y, 1.86, 3.4, "", btn_name, "")
|
||||
image_button(X, Y, 1.7, 3.4, "", btn_name, "")
|
||||
fs("tooltip[%s;%s;#32333899;#fff]", btn_name, ESC(skin.name))
|
||||
end
|
||||
end
|
||||
|
|
Ŝarĝante…
Reference in New Issue