Multiple GUI buttons pressed at once

Greetings!
I’ve got a problem with GUI buttons - I use them to show player’s ‘hand’ in a card game. With only 7 cards in hand there is no problem but once the player starts drawing more cards the buttons (which represent said cards on the screen) start to cover one another (since there’s a fixed amount of space for those cards). Now when I try to select one card it often activates other cards that are below.

Shorter version: I have multiple GUI buttons that cover each other partially. I want to activate only the one that my cursor actually clicks and not those below.

Is there anything I can do or should I solve this in a different way?

Try calling Event.current.Use() in your button handler code for the button on top.

I don’t think there is an easy way out of this. You could store the height of each stacks, or even better the reference to the highest card, to interact with only this one. If it’s a problem of the style changing during hover / down etc, you’ll need to use labels and Rect.Contains.