naming convention for most stuff but not all
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user