- MonoGame.Framework.WindowsDX
- MonoGame.Framework.DesktopGL
- MonoGame.Framework.Android
- MonoGame.Framework.iOS
PM> Install-Package MonoGame.IMEHelper.WindowsDX
All available packages for specific platforms:
MonoGame.IMEHelper.WindowsDX
MonoGame.IMEHelper.DesktopGL
MonoGame.IMEHelper.Android
MonoGame.IMEHelper.iOS
MonoGame.IMEHelper.Common
protected override void Initialize()
{
imeHandler = new WinFormsIMEHandle(this);
imeHandler.TextInput += (s, e) => { ... };
}
imeHandler = new WinFormsIMEHandler(this);
imeHandler.TextInput += (s, e) => { ... };
imeHandler.TextComposition += (s, e) => { ... };
Note that TextComposition
event only works on WindowsDX platform due to limitation of the underlying platform
If you has used a shared netstandard project to share game code. You can reference the MonoGame.IMEHelper.Common
package. It's just includes API interfaces and no implementation. Then you add the platform specific package to include the platform IME implementation.
imeHandler.StartTextComposition();
imeHandler.StopTextComposition();
imeHandler.VirtualKeyboardHeight
You have to change your Activity's base class to AndroidGameActivityIME
, like the following:
public class Activity1 : AndroidGameActivityIME
{
protected override void OnCreate(Bundle bundle)
{
base.OnCreate(bundle);
var g = new Game1();
SetContentView((View)g.Services.GetService(typeof(View)));
g.Run();
}
}
MonoGame.IMEHelper is released under the The MIT License (MIT).