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,6 +1,6 @@
interfaceDialog = {type = "Dialog"}
InterfaceDialog = {type = "Dialog"}
-- dialog boxes
function interfaceDialog:New(style)
function InterfaceDialog:new(style)
local o = {}
o.pos = {
@@ -36,7 +36,7 @@ function interfaceDialog:New(style)
return o
end
function interfaceDialog:updateContents()
function InterfaceDialog:updateContents()
if self.value < self.target_value then
self.contents = self.sequence[self.value]
if self.contents[1] == nil then self.contents[1] = "" end
@@ -45,14 +45,14 @@ function interfaceDialog:updateContents()
end
end
function interfaceDialog:loadSequence(sequence)
function InterfaceDialog:loadSequence(sequence)
self.sequence = sequence
self.value = 1
self.target_value = 1+#sequence
self:updateContents()
end
function interfaceDialog:checkConfirm()
function InterfaceDialog:checkConfirm()
if not self.clicked then
if love.mouse.isDown(1) then
self.clicked = true
@@ -65,7 +65,7 @@ function interfaceDialog:checkConfirm()
end
end
function interfaceDialog:Draw()
function InterfaceDialog: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)