예제 #1
0
파일: Btn.cs 프로젝트: colincapurso/IC2013
 public static void MouseLeftPress(Btn[] buttons, MouseState mouse)
 {
     foreach (Btn btn in buttons)
       {
     if (btn.Collides(mouse.X, mouse.Y))
     {
       if (mouse.LeftButton == ButtonState.Pressed)
     btn.State = BtnState.Active;
       else
     btn.State = BtnState.Over;
     }
     else
       btn.State = BtnState.Normal;
       }
 }
예제 #2
0
파일: Btn.cs 프로젝트: colincapurso/IC2013
 public static void MouseOver(Btn[] buttons, MouseState mouse)
 {
     foreach (Btn btn in buttons)
       {
     if (btn.Collides(mouse.X, mouse.Y))
       btn.setOver();
     else
       btn.setNormal();
       }
 }