Game Development Community

Enable IME for non-english input in TGEA

by Huan Li · 02/18/2009 (7:07 am) · 5 comments

I dont't know why TGEA jump over the IME for its UI control.
Here is a method to enable IME input in TEGA, but a very simple one, no input window showing, just make the GUI accept the IME char.

In TGEA, locate function "_dispatch(…)" in file "winDispatch.cpp",within the "switch(message){…}",add the folloing codes:
case WM_IME_CHAR:
		  if (window)
			  window->charEvent.trigger(window->getDeviceId(),0,wParam);
		  break;
Now, your application can accept non-english, e.g. Chineses.

#1
02/18/2009 (8:21 am)
This is very useful! Thank you!
#2
03/16/2009 (10:09 am)
I am getting : error C2039: 'getDeviceId' : is not a member of 'Win32Window'
Any suggestion ?
I am using Tgea 1_81.
#3
03/19/2009 (10:16 pm)
@ Akiraa :
I have same problem, too.
But, i solved.
getDeviceID changed to getWindowId in T3D 1.8.x.

use this code.
case WM_IME_CHAR: {
		  if (window)
			  window->charEvent.trigger(window->getWindowId(),0,wParam);
		  break;
	  }
#4
03/20/2009 (7:55 am)
Huan Li, Mquaker, thank you so much !
#5
12/21/2009 (4:04 am)
Huan Li, Mquaker, thank you so much !!!!