Update mechanism mostly done

This commit is contained in:
Openarl
2016-05-17 23:46:39 +10:00
parent 81a3b79e92
commit 109cf80351
5 changed files with 141 additions and 62 deletions

View File

@@ -32,6 +32,11 @@ function main:Init()
self.tree = common.New("PassiveTree")
self.controls = { }
self.controls.applyUpdate = common.New("ButtonControl", 0, 4, 100, 20, "^x50E050Apply Update", function()
launch:ApplyUpdate(launch.updateAvailable)
end)
self.inputEvents = { }
self.tooltipLines = { }
@@ -59,10 +64,17 @@ function main:OnFrame()
self.modeArgs = self.newModeArgs
self.newMode = nil
self:CallMode("Init", unpack(self.modeArgs))
end
end
self.controls.applyUpdate.x = self.screenW - 104
self.controls.applyUpdate.hidden = not launch.updateAvailable or launch.updateAvailable == "none"
common.controlsInput(self, self.inputEvents)
self:CallMode("OnFrame", self.inputEvents)
common.controlsDraw(self)
wipeTable(self.inputEvents)
end