Skip to content

Commit ebefcde

Browse files
committed
Add textedited callback
1 parent 5f6edc9 commit ebefcde

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

Screen.lua

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,8 @@ function Screen.new()
7777

7878
function self:resize() end
7979

80+
function self:textedited() end
81+
8082
function self:textinput() end
8183

8284
function self:touchmoved() end

ScreenManager.lua

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -258,6 +258,17 @@ function ScreenManager.resize( w, h )
258258
end
259259
end
260260

261+
---
262+
-- Called when the candidate text for an IME (Input Method Editor) has changed.
263+
-- The candidate text is not the final text that the user will eventually choose. Use love.textinput for that.
264+
-- @param text - The UTF-8 encoded unicode candidate text.
265+
-- @param start - The start cursor of the selected candidate text.
266+
-- @param length - The length of the selected candidate text. May be 0.
267+
--
268+
function ScreenManager.textedited( text, start, length )
269+
ScreenManager.peek():textedited( text, start, length );
270+
end
271+
261272
---
262273
-- Reroute the textinput callback to the currently active screen.
263274
-- @param input

0 commit comments

Comments
 (0)