Exemplo n.º 1
0
 public bool RightClick()
 {
     if (KMReader.mouseState.RightButton == ButtonState.Pressed && KMReader.prevMouseState.RightButton == ButtonState.Released) //för att "hitta" exakt när kanppen trycks på
     {
         if (KMReader.RightMouseClick())
         {
             if (hitBox.Contains(KMReader.GetMousePoint()))
             {
                 return(true);
             }
         }
     }
     return(false);
 }
Exemplo n.º 2
0
 private void CheckSelect()
 {
     if (KMReader.LeftMouseClick())
     {
         int counter = 0;
         foreach (Rectangle tempRectangle in inventoryGrid)
         {
             if (tempRectangle.Contains(KMReader.GetMousePoint()) && !disposing)
             {
                 try
                 {
                     selected       = Player.Inventory.ItemList[counter];
                     selectedSquare = counter;
                 }
                 catch
                 {
                     //Mys 10/10 felhantering
                 }
             }
             counter++;
         }
     }
 }