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:
parent
ffd187dc17
commit
66a089a07f
6 changed files with 116 additions and 21 deletions
3
core.lua
3
core.lua
|
@ -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)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue