Beispiel #1
0
        public override bool CheckActive()
        {
            if (Helper.CheckLMBClick(Position))
            {
                IsActive = true;
                Enabled  = true;
                return(true);
            }
            if (GeneralManager.IsLMBClicked() && !Helper.CheckIfInside(Position, GeneralManager.MousePos))
            {
                IsActive = false;
                Enabled  = false;
                return(false);
            }

            return(false);
        }
Beispiel #2
0
 public override bool HandleInput()
 {
     if (Visible)
     {
         if (Position.Contains(Helper.VectorToPoint(GeneralManager.MousePos)) && GeneralManager.IsLMBClicked())
         {
             foreach (GUIComponent G in GUIComponents)
             {
                 if (G.HandleInput())
                 {
                     break;
                 }
             }
             return(true);
         }
     }
     return(false);
 }