Rect Coordinates?
Blitz3D Forums/Blitz3D Programming/Rect Coordinates?
| ||
Hi all! =) Can someone please tell me how I can make ONLY the "X" button box clickable? I've tried all kinds of algorithms, and unfortunately I still can't figure out what I'm doing wrong, here.. I'm trying to make an image window GUI function for my purposes. Here's the code: Thank You & Happy New Year! |
| ||
Anyone? :( |
| ||
You can use MouseX() and MouseY() to retrieve the mouse X,Y and calculate if the mouse is over a rect. Since in your case there are 2 rects, one over the other, you need to introduce zorder. Some tips : The zorder will help to determine with which element or with which window it is possible to interact. Each window will have a global zorder (zorder between all windows) A window can contain elements (like your close button) Each element in each window will have a local zorder (zorder between all elements in a window), this is a necessity when you need to interact with more complex elements. Then you can add different layers of windows if you are good. Good luck. |
| ||
Alls I need to do is get the right coordinates in order to click the "X" button. |
| ||
My second attempt... Closer, but I still can't figure out "X" & "Y" for the "X" button ONLY... :( |
| ||
... Bug: Buzzing by- You've set gfxwidth too late... |