naming convention for most stuff but not all

This commit is contained in:
lustlion
2022-03-04 23:28:30 +01:00
parent c978855711
commit cef2096577
29 changed files with 354 additions and 436 deletions

View File

@@ -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)