Example #1
0
 void MouseMove(MouseEventArgs e)
 {
     if (e.GetEmulated())
     {
         return;
     }
     for (int i = 0; i < WidgetCount; i++)
     {
         MenuWidget w = widgets[i];
         if (w != null)
         {
             w.hover = pointInRect(e.GetX(), e.GetY(), w.x, w.y, w.sizex, w.sizey);
         }
     }
 }
Example #2
0
 public void MouseMove(MouseEventArgs e)
 {
     if (!e.GetEmulated())
     {
         // Set x and y only for real MouseMove events
         mouseCurrentX = e.GetX();
         mouseCurrentY = e.GetY();
     }
     else
     {
         // Get delta only from emulated events (actual events negate previous ones)
         mouseDeltaX += e.GetMovementX();
         mouseDeltaY += e.GetMovementY();
     }
     for (int i = 0; i < clientmodsCount; i++)
     {
         if (clientmods[i] == null) { continue; }
         clientmods[i].OnMouseMove(this, e);
     }
 }