Split up alpha number

This commit is contained in:
Squishy (C6H12O6+NaCl+H2O)
2024-05-15 18:18:34 +07:00
parent 13b6b7608a
commit b789354299
2 changed files with 12 additions and 12 deletions

View File

@@ -77,7 +77,7 @@ end
function control_type.button:draw(forceLight)
love.graphics.setLineWidth(4)
if self.shape=='circle' then
love.graphics.setColor(0,0,0,self.alpha*0.5)
love.graphics.setColor(0,0,0,self.alpha)
love.graphics.circle('fill',self.x,self.y,self.r-4)
love.graphics.setColor(1,1,1,self.pressed and .5 or .05)
@@ -86,7 +86,7 @@ function control_type.button:draw(forceLight)
love.graphics.setColor(1,1,1)
love.graphics.circle('line',self.x,self.y,self.r-2)
elseif self.shape=='square' then
love.graphics.setColor(0,0,0,self.alpha*0.5)
love.graphics.setColor(0,0,0,self.alpha)
love.graphics.rectangle('fill',self.x-self.r-4,self.y-self.r-4,self.r*2+8,self.r*2+8)
love.graphics.setColor(1,1,1,self.pressed and .5 or .05)