internal void KeyPress(int eKeyChar) { for (int i = 0; i < clientmodsCount; i++) { if (clientmods[i] == null) { continue; } KeyPressEventArgs args_ = new KeyPressEventArgs(); args_.SetKeyChar(eKeyChar); clientmods[i].OnKeyPress(this, args_); if (args_.GetHandled()) { return; } } }
void game_KeyPress(object sender, OpenTK.KeyPressEventArgs e) { foreach (KeyEventHandler h in keyEventHandlers) { KeyPressEventArgs args = new KeyPressEventArgs(); args.SetKeyChar((int)e.KeyChar); h.OnKeyPress(args); } }