Beispiel #1
0
 private static void ChangeButtonColor(InputState inputState)
 {
     if (Ok.GetGlobalBounds().Contains(inputState.MousePosition.X, inputState.MousePosition.Y))
     {
         Ok.FillColor = Color.Green;
     }
     else
     {
         Ok.FillColor = Color.Magenta;
     }
 }
Beispiel #2
0
 private static bool ButtonPressed(RenderWindow window, InputState inputState, ref Mode mode)
 {
     if (Ok.GetGlobalBounds().Contains(inputState.MousePosition.X, inputState.MousePosition.Y) && inputState.IsLmbPressed)
     {
         Ok.FillColor = Color.Red;
         mode         = Mode.Game;
         Pressed      = true;
         return(true);
     }
     return(false);
 }