i have un probleme on checkbox style, the image are splited see the attachement
Code: Select all
function simpleIcon(filename, width, height, scale, shift, position)
return {
filename = filename,
width = width,
height = height,
scale = scale,
shift = shift,
x = position.x,
y = position.y
}
end
local function addCheckboxStyleX32(name,icon,iconSize)
local iconSize = 32
local size = iconSize
local offset = 10
data.raw["gui-style"].default[name] = {
type = "checkbox_style",
parent = "checkbox_style",
width = iconSize,
height = iconSize,
default_background = simpleIcon("__core__/graphics/gui.png", 36, 36, size/18, {offset,0}, {x=111,y=0}),
hovered_background = simpleIcon("__core__/graphics/gui.png", 36, 36, size/18, {offset,0}, {x=148,y=0}),
clicked_background = simpleIcon("__core__/graphics/gui.png", 36, 36, size/18, {offset,0}, {x=184,y=0}),
disabled_background = simpleIcon("__core__/graphics/gui.png", 36, 36, size/18, {offset,0}, {x=111,y=0}),
checked = simpleIcon(icon, iconSize, iconSize, 0.7, {3,0}, {x=0,y=0})
}
end