From c0589d55340b948f107c7317f0f216e6ef408792 Mon Sep 17 00:00:00 2001 From: Aki Date: Tue, 5 Sep 2017 00:34:06 +0200 Subject: That will draw content for selector's box for now --- not/Selector.lua | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'not') 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 -- cgit v1.1