I am developing a card game and I wish to detect when the mouse is over the player’s cards.
My question is: how do I detect when the mouse is over the visible part of each card, since they are all partially stacked on top of each other?
I am inclined to follow the logic:
1- if the card is NOT the top-most one, then set it “virtual bounds” as a small rectangle (the visible part of the card).
2- if the card is the top-most one (7-clubs in my example) then the full card-size rectangle is the area to check for mouse over.
Does that makes sense or there is another easier way of doing this?