summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorAki <nthirtyone@gmail.com>2016-08-28 21:15:57 +0200
committerAki <nthirtyone@gmail.com>2016-08-28 21:15:57 +0200
commit7a1facacf70c37d6ed2b17c2979744ef2fe8375e (patch)
treefeeeb5539cd192b39759508fc2a6551ff5373275
parent96b4407ae6410affd0db1e6d6d657d4f65d32235 (diff)
downloadroflnauts-7a1facacf70c37d6ed2b17c2979744ef2fe8375e.zip
roflnauts-7a1facacf70c37d6ed2b17c2979744ef2fe8375e.tar.gz
roflnauts-7a1facacf70c37d6ed2b17c2979744ef2fe8375e.tar.bz2
readability improved
-rw-r--r--selector.lua11
1 files changed, 8 insertions, 3 deletions
diff --git a/selector.lua b/selector.lua
index 75c0190..de20699 100644
--- a/selector.lua
+++ b/selector.lua
@@ -202,10 +202,15 @@ function Selector:drawBlock(n, x, y, scale)
love.graphics.draw(sprite, quad[self.shape].active, x*scale, y*scale, 0, scale, scale)
end
love.graphics.draw(icon, iconq, (x+2)*scale, (y+3)*scale, 0, scale, scale)
- if self.focused and not locked then
+ if self.focused then
local dy = (h-6)/2
- love.graphics.draw(sprite, quad.arrow_l, (x+0-2-math.floor(self.delay))* scale, (y+dy)*scale, 0, scale, scale)
- love.graphics.draw(sprite, quad.arrow_r, (x+w-4+math.floor(self.delay))*scale, (y+dy)*scale, 0, scale, scale)
+ if not locked then
+ love.graphics.draw(sprite, quad.arrow_l, (x+0-2-math.floor(self.delay))* scale, (y+dy)*scale, 0, scale, scale)
+ love.graphics.draw(sprite, quad.arrow_r, (x+w-4+math.floor(self.delay))*scale, (y+dy)*scale, 0, scale, scale)
+ else
+ love.graphics.draw(sprite, quad.arrow_r, (x+0-2-math.floor(self.delay))* scale, (y+dy)*scale, 0, scale, scale)
+ love.graphics.draw(sprite, quad.arrow_l, (x+w-4+math.floor(self.delay))*scale, (y+dy)*scale, 0, scale, scale)
+ end
end
if (self:getSelection(n) ~= 1 or self.first) then
love.graphics.setFont(Font)