epervier-old/gamecore/modules/menusystem/widgets/utils.lua

35 lines
1 KiB
Lua

local menuUtils = {}
function menuUtils.drawCursor(x, y, w, h)
love.graphics.setColor(0,0,0)
love.graphics.rectangle("fill", x, y, 4, 8)
love.graphics.rectangle("fill", x, y, 8, 4)
love.graphics.rectangle("fill", x + w, y, -4, 8)
love.graphics.rectangle("fill", x + w, y, -8, 4)
love.graphics.rectangle("fill", x, y + h, 4, -8)
love.graphics.rectangle("fill", x, y + h, 8, -4)
love.graphics.rectangle("fill", x + w, y + h, -4, -8)
love.graphics.rectangle("fill", x + w, y + h, -8, -4)
love.graphics.setColor(255,255,255)
love.graphics.rectangle("fill", x + 1, y + 1, 2, 6)
love.graphics.rectangle("fill", x + 1, y + 1, 6, 2)
love.graphics.rectangle("fill", x + w - 1, y + 1, -2, 6)
love.graphics.rectangle("fill", x + w - 1, y + 1, -6, 2)
love.graphics.rectangle("fill", x + 1, y + h - 1, 2, -6)
love.graphics.rectangle("fill", x + 1, y + h - 1, 6, -2)
love.graphics.rectangle("fill", x + w - 1, y + h - 1, -2, -6)
love.graphics.rectangle("fill", x + w - 1, y + h - 1, -6, -2)
end
return menuUtils