Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
This repository was archived by the owner on Mar 23, 2020. It is now read-only.

MonoGame IME Helper for all platforms

License

NotificationsYou must be signed in to change notification settings

ryancheung/MonoGame.IMEHelper.old

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

72 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Targeted MonoGame platforms

  • MonoGame.Framework.WindowsDX
  • MonoGame.Framework.DesktopGL
  • MonoGame.Framework.Android
  • MonoGame.Framework.iOS

Getting started

NuGet

PM> Install-Package MonoGame.IMEHelper.WindowsDX

All available packages for specific platforms:

MonoGame.IMEHelper.WindowsDXMonoGame.IMEHelper.DesktopGLMonoGame.IMEHelper.AndroidMonoGame.IMEHelper.iOSMonoGame.IMEHelper.Common

Initialize a IMEHandler instance in your game Initialize method

protectedoverridevoidInitialize(){imeHandler=newWinFormsIMEHandle(this);imeHandler.TextInput+=(s,e)=>{ ...};}

If your want to render Composition String

   imeHandler = new WinFormsIMEHandler(this);   imeHandler.TextInput += (s, e) => { ... };   imeHandler.TextComposition += (s, e) => { ... };

Note thatTextComposition event only works on WindowsDX platform due to limitation of the underlying platform

MonoGame.IMEHelper.Common package

If you has used a shared netstandard project to share game code. You can reference theMonoGame.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.

Start Text Composition

imeHandler.StartTextComposition();

Stop Text Composition

imeHandler.StopTextComposition();

Get VirtualKeyboardHeight (only for mobile platforms)

imeHandler.VirtualKeyboardHeight

Android Extra Setup

You have to change your Activity's base class toAndroidGameActivityIME, like the following:

publicclassActivity1:AndroidGameActivityIME{protectedoverridevoidOnCreate(Bundlebundle){base.OnCreate(bundle);varg=newGame1();SetContentView((View)g.Services.GetService(typeof(View)));g.Run();}}

License

MonoGame.IMEHelper is released under theThe MIT License (MIT).

About

MonoGame IME Helper for all platforms

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

[8]ページ先頭

©2009-2025 Movatter.jp