+ testing out IR support
This commit is contained in:
parent
c9bd55bfe3
commit
cacf98c112
|
@ -103,6 +103,8 @@ local objectTypeTimingStats = {
|
||||||
vol = {criticals = 0, errors = 0}
|
vol = {criticals = 0, errors = 0}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
local irHeartbeatRequested = false;
|
||||||
|
local irText = ''
|
||||||
|
|
||||||
game.LoadSkinSample("result")
|
game.LoadSkinSample("result")
|
||||||
|
|
||||||
|
@ -335,6 +337,10 @@ local drawBottomPanelContent = function (deltatime)
|
||||||
|
|
||||||
-- Draw volforce
|
-- Draw volforce
|
||||||
VolforceWindow.render(0, bottomPanelX+310, bottomPanelY+355)
|
VolforceWindow.render(0, bottomPanelX+310, bottomPanelY+355)
|
||||||
|
|
||||||
|
-- Draw IR text
|
||||||
|
gfx.FontSize(22)
|
||||||
|
gfx.Text(irText, bottomPanelX+80, bottomPanelY+461);
|
||||||
end
|
end
|
||||||
|
|
||||||
local drawJacketPanel = function()
|
local drawJacketPanel = function()
|
||||||
|
@ -357,6 +363,21 @@ local drawJacketPanelContent = function()
|
||||||
gfx.Text(result.level, jacketPanelX+270, jacketPanelY+14.5);
|
gfx.Text(result.level, jacketPanelX+270, jacketPanelY+14.5);
|
||||||
end
|
end
|
||||||
|
|
||||||
|
local IR_HeartbeatResponse = function(res)
|
||||||
|
if res.statusCode == IRData.States.Success then
|
||||||
|
irText = res.body.serverName .. ' ' .. res.body.irVersion;
|
||||||
|
else
|
||||||
|
game.Log("Can't connect to IR!", game.LOGGER_WARNING)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
local IR_Handle = function()
|
||||||
|
if not irHeartbeatRequested then
|
||||||
|
IR.Heartbeat(IR_HeartbeatResponse)
|
||||||
|
irHeartbeatRequested = true;
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
local tickTransitions = function(deltaTime)
|
local tickTransitions = function(deltaTime)
|
||||||
|
|
||||||
if transitionEnterScale < 1 then
|
if transitionEnterScale < 1 then
|
||||||
|
@ -478,7 +499,8 @@ render = function(deltaTime, showStats)
|
||||||
|
|
||||||
Footer.draw();
|
Footer.draw();
|
||||||
|
|
||||||
handleSfx()
|
handleSfx();
|
||||||
|
IR_Handle();
|
||||||
|
|
||||||
-- debug
|
-- debug
|
||||||
gfx.FontSize(18)
|
gfx.FontSize(18)
|
||||||
|
|
Loading…
Reference in New Issue