From 7a1facacf70c37d6ed2b17c2979744ef2fe8375e Mon Sep 17 00:00:00 2001 From: Aki Date: Sun, 28 Aug 2016 21:15:57 +0200 Subject: readability improved --- selector.lua | 11 ++++++++--- 1 file 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) -- cgit v1.1