Add directional sticky and skewer box variants
This commit is contained in:
parent
c3f5aafd77
commit
f549eaf523
13 changed files with 723 additions and 101 deletions
|
|
@ -9,6 +9,9 @@ function GUI:initialize(t)
|
|||
self.offset = {x = 0, y = 0}
|
||||
self.name = t.name
|
||||
self.text = t.text
|
||||
self.goopy = t.goopy or false
|
||||
self.skewer = t.skewer or false
|
||||
self.cells = t.cells
|
||||
|
||||
if not t.onClic then
|
||||
t.onClic = {}
|
||||
|
|
@ -99,7 +102,13 @@ function GUI:draw()
|
|||
if self.sprites then
|
||||
for color, sprite in pairs(self.sprites) do
|
||||
love.graphics.setColor(gColor[color]:set())
|
||||
love.graphics.draw(sprite, box.x, box.y, 0, self.scale, self.scale)
|
||||
if self.goopy and drawGoopySprite then
|
||||
drawGoopySprite(sprite, box.x, box.y, self.scale)
|
||||
elseif self.skewer and drawSkewerSprite then
|
||||
drawSkewerSprite(sprite, self.cells and self.cells[color], box.x, box.y, self.scale)
|
||||
else
|
||||
love.graphics.draw(sprite, box.x, box.y, 0, self.scale, self.scale)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue