diff options
author | Aki <nthirtyone@gmail.com> | 2017-09-05 00:34:06 +0200 |
---|---|---|
committer | Aki <nthirtyone@gmail.com> | 2017-09-05 00:34:06 +0200 |
commit | c0589d55340b948f107c7317f0f216e6ef408792 (patch) | |
tree | 171d0b40333c52350f9d6b09caa56c642dbd513b /not/Selector.lua | |
parent | 0e79f3ecbb0dca43aad166a718f58484afabe712 (diff) | |
download | roflnauts-c0589d55340b948f107c7317f0f216e6ef408792.zip roflnauts-c0589d55340b948f107c7317f0f216e6ef408792.tar.gz roflnauts-c0589d55340b948f107c7317f0f216e6ef408792.tar.bz2 |
That will draw content for selector's box for now
Diffstat (limited to 'not/Selector.lua')
-rw-r--r-- | not/Selector.lua | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/not/Selector.lua b/not/Selector.lua index c6ab810..d6910fe 100644 --- a/not/Selector.lua +++ b/not/Selector.lua @@ -98,7 +98,6 @@ function Selector:getShapeString () end end --- TODO: Selector draw is missing box content drawing. function Selector:draw (scale) local x, y = self:getPosition() local w, h = self:getSize() @@ -111,6 +110,11 @@ function Selector:draw (scale) love.graphics.setColor(255, 255, 255, 255) love.graphics.draw(self.atlas, self.quads[self:getShapeString()][boxType], x*scale, y*scale, 0, scale, scale) + -- TODO: That is one way to draw icon for selected value. Find better one. See: `config/menus/host`. + if self.icons_atlas and self.icons_quads then + love.graphics.draw(self.icons_atlas, self.icons_quads[self.index], (x+2)*scale, (y+3)*scale, 0, scale, scale) + end + if self.focused then local dy = (h-6)/2 local al, ar = self.quads.arrow_r, self.quads.arrow_l |