Ejemplo n.º 1
0
 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;
         }
     }
 }
Ejemplo n.º 2
0
 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);
     }
 }