Whats the best way to check mouseclick locations in window
Posted: Sat Jan 25, 2025 12:09 am
I'm developing a new game in PB which uses a table of card slots, so that when you have selected a card to place, you can then click on a card slot to move that card there. I'm simply using image placement on an image window. No 2D or 3D commands.
The problem is there are 100 possible rectangles where the player can place the selected card. They are not in a grid. I need to know what method is the best for having the application check the mouse click so as to determine the location to place the selected card?
Should I use a hundred buttons, or an array of rectangle coordinates to compare the current mouseclick, or some other method? I don't want there to be a delay between the mouseclick and highlighting the selected rectangle (with my drawing routine).
The problem is there are 100 possible rectangles where the player can place the selected card. They are not in a grid. I need to know what method is the best for having the application check the mouse click so as to determine the location to place the selected card?
Should I use a hundred buttons, or an array of rectangle coordinates to compare the current mouseclick, or some other method? I don't want there to be a delay between the mouseclick and highlighting the selected rectangle (with my drawing routine).