Add (not perfect) mouse interaction to input widget

This commit is contained in:
Matthias Richter 2016-01-16 02:53:11 +01:00
parent 4ac0f37097
commit b37c35dc0a
2 changed files with 36 additions and 25 deletions

View file

@ -109,7 +109,7 @@ function theme.Input(input, opt, x,y,w,h)
-- set scissors
local sx, sy, sw, sh = love.graphics.getScissor()
love.graphics.setScissor(x-1,y,w+2,h)
x = x - input.drawoffset
x = x - input.text_draw_offset
-- text
love.graphics.setColor(opt.color and opt.color.normal or theme.color.normal.fg)