Chinese and Japanese IME is distributed as a separate add-on package for Scaleform, available from here.. IME distributions are named based on the Scaleform SDK version and the target platform they are compatible with, as in “sf_4.6.xx_src_ime_msvc11.exe”. To use IME, you need to download and install it on top of the regular Scaleform SDK.
Since IME is provided separately, existing licensed customers will need to contact support to get an IME evaluation key. Evaluation customers should not need to do this, since the same key will work for both packages.
Developers who are targeting Korean language under Windows should not need to install this package, since Korean input support is built into the core of Scaleform. However, supporting Korean still requires developers to follow the message passing procedures described in Win32 IME Code Integration of Integrating IME into your game, required for Korean input to work properly.
After installing the IME SDK you can rebuild the Scaleform solution to make all players IME aware. The distribution makes this possible by copying the IME libraries and headers to the corresponding Scaleform directories and defining the SF_ENABLE_IME macro in GFxConfigAddons.h. This is all that is necessary for Scaleform Player source to compile, since it already includes the logic required to enable IME. For more information on files and libraries provided as a part of the IME distribution refer to Scaleform IME Files and Dependencies in IME Setup..
Scaleform IME implementation relies on operating system APIs for managing the composition string and providing candidate list choices. Under Windows, IME support will not be installed by default unless you are using an Asian version of Windows. If that is the case, you should install IME support before using the Scaleform IME SDK. Instructions on how to install IME are provided in Appendix C. These might also be useful if you already have some IMEs installed and wish to install additional IMEs for testing purposes.
In Windows, multiple IME implementations can be installed at the same time. The Scaleform IME SDK has been tested with the following standard IMEs and third party IMEs on Windows XP and Vista:
Standard Windows IMEs
Third Party IMEs
Scaleform IME has been tested to fully support the extra keys on the Japanese 106 keyboard as well as the “Direct Kana” input mode.
A list of screenshots of the supported IME's on the various test platforms are presented in Appendix B of this document.
An application that intercepts IME messages and draws its own IME UI windows is called “IME Aware”. Since an application that uses GFxIME is IME aware, it does not need the system IME windows anymore. More ever, as these system IME windows are drawn using Windows GDI, they cause annoying flickering when they try to appear on top of the DirectX window used by the Gaming application. The documentation on the Input Method Manager (IMM) API on MSDN suggests using the WM_IME_SETCONTEXT message and setting various bits of the lParam parameter to hide the IME windows. In practice, this approach is ineffective and fails to hide the system IME windows. After trying a variety of other approaches, we’ve found that passing the WM_IME_SETCONTEXT message to the default window procedure hides the UI windows for all the IME’s without affecting the performance of the IME.
Before performing the SDK integration, it is instructive to run the sample player and experiment with IME behavior. A pre-built IME enabled player is shipped with the installation and is accessible as “IME Demo” from the Windows start menu; when launched it will automatically load the IME Sample file. Alternatively, users can also load the sample by rebuilding the Scaleform Player SDK after IME installation and dragging the IMESample.swf into it from the Bin\Data{AS2or AS3}\IME folder. Once the file is loaded, you should see the following picture.
The purpose of this IMESample file is to provide text fields for IME testing and to illustrate customization of the IME pop ups according to the chosen window theme. While running the sample, you can use the system language bar to switch to the input language of your choice to test IME. Once that is done, you can enter text in the “Single Line” or “Multi Line” text fields. Note that IME is disabled in the second single line text field, so you can only type English characters there regardless of the selected input language.
In more detail, the IME Sample application demonstrates the following: - Behavior of the IME reading and candidate list UI widgets that popup as you enter Asian text. - Customization of UI Widgets to match window theme. Users can change the display theme by clicking on the theme selection radio buttons on the left and observe the colors of the candidate list and the reading window change to compliment the chosen theme. - Disabling IME for specific text fields. In this sample, IME has been disabled on the second single line text field. - Customization of the composition string. The composition string in the first single line text field will appear in red with green underline, while the clause text will appear in light blue color with dithered thick underline. This is different from the default behavior. - The IME UI widgets obtain their resources from the underlying text field and their appearance can be customized to match that of the text field. The single line text fields use a smaller font than the multi line fields and the font used in the candidate list and reading window matches that of the text field.
For details on customization of IME popup windows, refer to Customizing the IME User Interface.
During installation, Scaleform IME SDK copies a number of library, header and resource files to the Scaleform SDK subdirectory. Since you will need to use these files for linking and integration, this section explains the various IME related resources that come with the installation and how to use them. To summarize, the IME distribution installs the following resources:
In addition, customers with IME source license also get access to the source code needed to build the libgfx_ime.lib library. The source files are located in the Src\GFxIME subdirectory.
The following header and library files are needed to use Scaleform IME:
Header Files Needed
Library Files Needed
Asset Files Needed
The main header file you will include for IME on Windows is GFx_IMEManagerWin32.h. This file defines the GFxIMEManagerWin32 class responsible for implementation of the abstract GFx::ASIMEManager on the Windows. Complete details on how to use these classes are provided in Integrating IME into your Game.
libgfx_ime.lib is the main library provided by the Scaleform IME SDK; you will need to link this library to build an executable with IME. The imm32.lib and uuid.lib are additional required libraries distributed with Microsoft Visual Studio. Since IME implementation on Windows XP uses the Input Method Manager (IMM) APIs, you will need to link to IMM functions defined in imm32.lib. Similarly, IME implementation on Windows Vista uses the Text Services Framework (TSF), requiring definitions contained in uuid.lib.
The IME implementation relies on the ime.swf asset file for displaying the reading window and candidate list popups; you will have to distribute a version of this file with your application. The details on the structure of this file are provided in IME.swf UI File Structure and Customization.
Customers who have access to IME source code will get the source files needed to build the GFxIME library file. Our SDK solution includes GFxIME project to build libgfx_ime.lib and can be used once IME source code is installed. To build the libgfx_ime.lib from source, developers will need to install the Microsoft Platform SDK.
The Platform SDK is required because IME implementation for Windows Vista uses some features of the Text Services Framework (TSF). TSF is a COM based system that needs the msctf.h header file distributed as part of Microsoft Platform SDK. The Platform SDK can be downloaded from:
<www.microsoft.com/downloads>
Click the “Developer Tools” link under the Browse for Downloads section. In the drop down list under “Show downloads for”, select Microsoft Platform Software Development Kit. Select “Microsoft Windows SDK Update for Windows Vista” for Windows Vista and “Windows® Server 2003 R2 Platform SDK Full Download” for Windows XP.