xurfer/src/lovr/lib/iui/widgets/msdf-layered-image-9-slice.lua
2026-06-06 12:35:31 +02:00

17 lines
445 B
Lua

local currentPath = (...):match('(.-)[^%./]+$')
local parentPath = currentPath:match('(.-)[^%./]+%.$')
--- @class IUILib
local iui = require(parentPath .. "iui")
--- @param image IUILayeredImage
function iui.msdfLayeredImage9Slice(image)
local x, y, w, h = iui.layout.getBounds()
for _, item in ipairs(image) do
item.color:set()
iui.graphics.msdfNineSlice(item.image, x, y, w, h)
end
iui.layout.advance()
end