added transparency thing I was supposed to do a week ago
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
love.filesystem.setRequirePath(love.filesystem.getRequirePath() .. ";JUI/?.lua")
|
||||
|
||||
|
||||
|
||||
return {
|
||||
JUIScene = require("lib.classes.JUIScene"),
|
||||
Frame = require("lib.classes.Frame"),
|
||||
|
@@ -6,6 +6,8 @@ local UIButton = UIRect:subclass("UIButton")
|
||||
function UIButton:init()
|
||||
self.super:init()
|
||||
self.mouseDown = true
|
||||
self.buttonActivationAnimation = ""
|
||||
self.buttonDeactivationAnimation = ""
|
||||
|
||||
self.mouseClickDown = Event:new()
|
||||
self.mouseClickUp = Event:new()
|
||||
|
@@ -206,12 +206,12 @@ function UIRect:render()
|
||||
local size = self:getAbsoluteSize()
|
||||
|
||||
|
||||
love.graphics.setColor(self.backgroundColor:out())
|
||||
love.graphics.setColor(self.backgroundColor:out(), self.backgroundTransparency)
|
||||
-- background
|
||||
love.graphics.rectangle("fill", pos.x, pos.y, size.x, size.y, self.cornerRounding, self.cornerRounding, 25)
|
||||
|
||||
love.graphics.setColor(self.borderColor:out())
|
||||
love.graphics.setLineWidth(self.borderWidth)
|
||||
love.graphics.setLineWidth(self.borderWidth, self.borderTransparency)
|
||||
-- border
|
||||
love.graphics.rectangle("line", pos.x-(self.borderWidth/2), pos.y-(self.borderWidth/2), size.x+self.borderWidth, size.y+self.borderWidth, self.cornerRounding, self.cornerRounding)
|
||||
end
|
||||
|
Reference in New Issue
Block a user