Chinese IME candidate list display

Showcase your libraries, tools and other projects that help your fellow love users.
Post Reply
User avatar
Alexar
Party member
Posts: 174
Joined: Thu Feb 05, 2015 1:57 am
Location: Chengdu,China

Chinese IME candidate list display

Post by Alexar »

I've just figured out how to enable the candidate list display for windows Chinese IME. This problem disturbed me for long time.
I've sent an issue to megasource repo in bitbucket.
here is what we get
GIF2.gif
GIF2.gif (143.22 KiB) Viewed 9096 times
replace the sdl2.dll in the love folder. and voila.
oh, to set the caret position for the candidate list, you have to use user32.dll for windows.

Code: Select all

local ffi = require("ffi")
ffi.cdef [[
long CreateCaret(long hwnd,long map,long width,long height);
long GetForegroundWindow(void);
long SetCaretPos(long x,long y);
long SetFocus(long hwnd);]]
u32=ffi.load("User32")
local gamehwnd=u32.GetForegroundWindow()
u32.SetFocus(gamehwnd)
u32.CreateCaret(gamehwnd,0,4,20)
--u32.SetCaretPos(x,y)
SDL2.zip
built with vs2017 x64
(424.56 KiB) Downloaded 386 times
freypy
Prole
Posts: 2
Joined: Sun Sep 08, 2013 6:08 am

Re: Chinese IME candidate list display

Post by freypy »

GREAT WORK!
厉害,虽然我现在不关注Love2d了,但以前也很苦恼对IME支持很不好。
特意登录顶你一下。
Alligrater
Prole
Posts: 2
Joined: Wed Aug 19, 2020 4:13 am

Re: Chinese IME candidate list display

Post by Alligrater »

nice
请问可否提供一下解决方案?我想拿到11.3试试看,但是11.3和11.1的DLL不是同一个版本,并不能通用
Post Reply

Who is online

Users browsing this forum: No registered users and 47 guests