protected override void MouseEventButtonDown(MouseState CurrMouse, MouseButton Button) { int Ctr; if (Button != MouseButton.Left) { return; } cMouseDown = CurrMouse.Position; for (Ctr = 0; Ctr < cOptionList.Count; Ctr++) { if (MGMath.IsPointInRect(cMouseDown, cOptionLocList[Ctr]) == true) { cMouseCardIndex = Ctr; cOptionList[Ctr].Include += 1; if (cOptionList[Ctr].Include > cOptionList[Ctr].Count) { cOptionList[Ctr].Include = 0; } break; } } HasChanged = true; }
private int DetermineShownCardFromCoords(Point Coord) { if ((SelectedCardIndex != -1) && (SelectedCardIsZoomed == true)) { if (MGMath.IsPointInRect(Coord, cCardsShownList[SelectedCardIndex].DrawRegion) == true) { return(SelectedCardIndex); } } for (int Ctr = cCardsShownList.Count - 1; Ctr >= 0; Ctr--) //Cards are placed on top, so start from bottom to get most visible cards { if (MGMath.IsPointInRect(Coord, cCardsShownList[Ctr].DrawRegion) == true) { return(Ctr); } } return(-1); }