Scrolling improvements, fixes #13

This commit is contained in:
airstruck
2015-12-21 12:26:07 -05:00
parent 73e9a10b15
commit 147de8e010
7 changed files with 54 additions and 58 deletions

View File

@@ -267,7 +267,9 @@ function Painter:paintIconAndText ()
-- draw the text
if text and textX and textY and w > 1 then
textX, textY = math.floor(textX), math.floor(textY)
widget.innerHeight = textY - y + widget.textData:getHeight()
textX = math.floor(textX - (widget.scrollX or 0))
textY = math.floor(textY - (widget.scrollY or 0))
Backend.draw(widget.textData, textX, textY)
end