private void load(BasicGameHost host, AudioManager audio) { this.audio = audio; textInput = host.GetTextInput(); if (textInput != null) { textInput.OnNewImeComposition += delegate(string s) { textUpdateScheduler.Add(() => onImeComposition(s)); cursorAndLayout.Invalidate(); }; textInput.OnNewImeResult += delegate(string s) { textUpdateScheduler.Add(() => onImeResult(s)); cursorAndLayout.Invalidate(); }; } }
private void bindInput() { if (textInput == null) { textInput = game.Host.GetTextInput(); textInput.OnNewImeComposition += delegate(string s) { textUpdateScheduler.Add(() => onImeComposition(s)); cursorAndLayout.Invalidate(); }; textInput.OnNewImeResult += delegate(string s) { textUpdateScheduler.Add(() => onImeResult(s)); cursorAndLayout.Invalidate(); }; } textInput.Activate(this); }