File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -51,3 +51,4 @@ cardlist :
5151editbox :
5252 cursor_speed : 20
5353 cursor_color : 0x0000ff
54+ preedit_color : 0x000000
Original file line number Diff line number Diff line change @@ -11,6 +11,7 @@ local fontcobj = font.cobj()
1111local CURRENT_EDITBOX
1212local CURSOR_SPEED <const> = ui .cursor_speed
1313local CURSOR_COLOR <const> = ui .cursor_color
14+ local PREEDIT_COLOR <const> = ui .preedit_color
1415local KEY_LEFT <const> = 263
1516local KEY_RIGHT <const> = 262
1617local KEY_ESC <const> = 256
@@ -113,7 +114,13 @@ function keyboard.editbox(desc)
113114 if x ~= desc .ime_rect_x or y ~= desc .ime_rect_y then
114115 desc .ime_rect_x = x
115116 desc .ime_rect_y = y
116- app .set_ime_rect (x , y , cw , ch )
117+ app .set_ime_rect {
118+ x = x ,
119+ y = y ,
120+ width = cw ,
121+ height = ch ,
122+ text_color = PREEDIT_COLOR ,
123+ }
117124 end
118125 desc .cursor = cursor
119126 desc .text = text
You can’t perform that action at this time.
0 commit comments