P
paulog
Guest
Hello! I'm making a game in GMS1.4 with a draggable windows system but I'm facing an issue. When I click in a window that is behind another window, I want it to come to the top, but when I click somewhere where two windows are overlaping, the one at the bottom, if it was created first, comes to the top, instead of the one that is already on top staying on top. I read some tutorials about it but haven't really got the code to work properly.
I'd be really greatful if someone could give me some ideas. Thanks in advance!
this is the code I'm using:
"obj_ui_mov" is the parent object of all windows
I'd be really greatful if someone could give me some ideas. Thanks in advance!
this is the code I'm using:
"obj_ui_mov" is the parent object of all windows
GML:
if device_mouse_check_button_pressed(0, mb_left)
{
if position_meeting(device_mouse_x_to_gui(0),device_mouse_y_to_gui(0),id)
{
obj_ui_mov.depth = -5
depth = -10
}
}