currency: Use proper change colors

master
informatic 2017-04-23 12:20:49 +02:00
parent e72e1a1852
commit 62527b727b
1 changed files with 11 additions and 2 deletions

View File

@ -26,9 +26,18 @@ function node:render()
love.graphics.printf("BTCPLN", 0, 180, love.graphics.getWidth()/2, 'right')
love.graphics.printf("TRYIDR", 0, 350, love.graphics.getWidth()/2, 'right')
love.graphics.setFont(textFont)
love.graphics.setColor( 0, 255, 0 )
if self.state.changes[1] then
love.graphics.setColor( 0, 255, 0 )
else
love.graphics.setColor( 255, 0, 0 )
end
love.graphics.printf(self.state.values[1], love.graphics.getWidth()/2 + 2*pad, 180, love.graphics.getWidth()/2 - 2*pad, 'left')
if self.state.changes[2] then
love.graphics.setColor( 0, 255, 0 )
else
love.graphics.setColor( 255, 0, 0 )
end
love.graphics.printf(self.state.values[2], love.graphics.getWidth()/2 + 2*pad, 350, love.graphics.getWidth()/2 - 2*pad, 'left')
else
love.graphics.setColor( 255, 255, 255, 80 )