added some dependencies

This commit is contained in:
2021-05-08 10:08:47 +02:00
parent 5e40214c67
commit e05d4812dc
32 changed files with 3565 additions and 0 deletions

23
deps/suit/label.lua vendored Normal file
View File

@@ -0,0 +1,23 @@
-- This file is part of SUIT, copyright (c) 2016 Matthias Richter
local BASE = (...):match('(.-)[^%.]+$')
return function(core, text, ...)
local opt, x,y,w,h = core.getOptionsAndSize(...)
opt.id = opt.id or text
opt.font = opt.font or love.graphics.getFont()
w = w or opt.font:getWidth(text) + 4
h = h or opt.font:getHeight() + 4
opt.state = core:registerHitbox(opt.id, x,y,w,h)
core:registerDraw(opt.draw or core.theme.Label, text, opt, x,y,w,h)
return {
id = opt.id,
hit = core:mouseReleasedOn(opt.id),
hovered = core:isHovered(opt.id),
entered = core:isHovered(opt.id) and not core:wasHovered(opt.id),
left = not core:isHovered(opt.id) and core:wasHovered(opt.id)
}
end