adjust children for parent padding and margin

This commit is contained in:
airstruck
2015-10-25 16:01:41 -04:00
parent 8f604fb79d
commit 995825b9b3
11 changed files with 108 additions and 84 deletions

View File

@@ -32,7 +32,7 @@ function Renderer:renderOutline (widget, window)
love.graphics.push('all')
love.graphics.setColor(widget.outline)
love.graphics.rectangle('line', x1 - 0.5, y1 - 0.5, x2 - x1, y2 - y1)
love.graphics.rectangle('line', x1 + 0.5, y1 + 0.5, x2 - x1, y2 - y1)
love.graphics.pop()
end
@@ -162,6 +162,7 @@ function Renderer:renderIconAndText (widget, window)
if icon then
iconX, iconY = math.floor(iconX), math.floor(iconY)
if widget.tint then
love.graphics.setBlendMode('alpha', true)
love.graphics.setColor(widget.tint)
end
love.graphics.draw(icon, iconX, iconY)