M
MajesticThe
Guest
First of all, I would like to say hello to the community as I am slowly spending more and more time on my GMS2 project, Ive been reading this place a lot latley
The problem that I am currently having is that I dont think I understand how GUI is supposed to work in GMS2. I did some research few weeks ago about GUI layer vs clickable buttons. From what I understand putting an object in GUI is a no-go, and people are suggesting workarounds where they draw_sprite in DrawGUI event, follow it up with mouse_check_button within the step event and point_in_rectangle/point_in_circle.
On the other hand I just encountered an issue where overlaping objects respond to a single mouse click. Here most of the solutions I've found are based on some sort of mouse input management calling all the instances in scope and choosing the best one based on depth.
Now those 2 systems dont cooperate when it comes to clicking a GUI button over an object, since the GUI "object" is simply not there. This in general made me question my approach to layers and mouse management. I have a strong feeling that this should be a very popular problem and that there is a best approach solution to it that I am missing so I am open to suggestions!
The problem that I am currently having is that I dont think I understand how GUI is supposed to work in GMS2. I did some research few weeks ago about GUI layer vs clickable buttons. From what I understand putting an object in GUI is a no-go, and people are suggesting workarounds where they draw_sprite in DrawGUI event, follow it up with mouse_check_button within the step event and point_in_rectangle/point_in_circle.
On the other hand I just encountered an issue where overlaping objects respond to a single mouse click. Here most of the solutions I've found are based on some sort of mouse input management calling all the instances in scope and choosing the best one based on depth.
Now those 2 systems dont cooperate when it comes to clicking a GUI button over an object, since the GUI "object" is simply not there. This in general made me question my approach to layers and mouse management. I have a strong feeling that this should be a very popular problem and that there is a best approach solution to it that I am missing so I am open to suggestions!