naming convention for most stuff but not all
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
interfaceButton = {type = "Button"}
|
||||
InterfaceButton = {type = "Button"}
|
||||
|
||||
-- centered buttons
|
||||
function interfaceButton:New(x,y,w,h,table_values,value,style)
|
||||
function InterfaceButton:new(x,y,w,h,table_values,value,style)
|
||||
local o = {}
|
||||
|
||||
o.pos = {
|
||||
@@ -46,11 +46,11 @@ function interfaceButton:New(x,y,w,h,table_values,value,style)
|
||||
return o
|
||||
end
|
||||
|
||||
function interfaceButton:getVariable()
|
||||
function InterfaceButton:getVariable()
|
||||
return self.target_variable
|
||||
end
|
||||
|
||||
function interfaceButton:checkMouse(mouse_x, mouse_y)
|
||||
function InterfaceButton:checkMouse(mouse_x, mouse_y)
|
||||
if not self.clicked
|
||||
and mouse_x < self.pos.x + self.size.w/2
|
||||
and mouse_x > self.pos.x - self.size.w/2
|
||||
@@ -71,7 +71,7 @@ function interfaceButton:checkMouse(mouse_x, mouse_y)
|
||||
end
|
||||
end
|
||||
|
||||
function interfaceButton:Draw()
|
||||
function InterfaceButton:Draw()
|
||||
local c1, c2, c3, a = love.graphics.getColor()
|
||||
|
||||
love.graphics.setColor(self.style.color[1],self.style.color[2],self.style.color[3],self.style.alpha)
|
||||
|
||||
Reference in New Issue
Block a user