Fix bug in input.lua, make 0.9-ready, add utf8 editing

1) [input.lua] Pressing backspace while the cursor was at the beggining
   of the text removed the first character. Fixed thanks to riidom.
2) [LÖVE 0.9] Use setLine(Width|Style) instead of setLine. Split
   keyboard.pressed() into keyboard.pressed() and keyboard.textinput().
   (see readme)
3) [utf8.lua] Add support for UTF-8 text editing. May still fail
   spectacurlarly with invalid UTF-8 strings.
This commit is contained in:
Matthias Richter 2013-12-11 15:19:04 +01:00
parent ffd187dc17
commit 66a089a07f
6 changed files with 116 additions and 21 deletions

View file

@ -99,7 +99,8 @@ local function draw()
for i = 1,draw_items.n do draw_items[i]() end
-- restore graphics state
love.graphics.setLine(lw, ls)
love.graphics.setLineWidth(lw)
love.graphics.setLineStyle(ls)
if f then love.graphics.setFont(f) end
love.graphics.setColor(c)