Hi! Is there a way to create a pointer in the button? (I don't know if it's a pointer in this case) For exemple: I created a window in "PANEL" and a button like a icon bar, and the button function is move window. I used code bellow:
Code:
function MoveWindow(PANEL* _panel_sel){
	var click_offset[2];
	click_offset[0]=_panel_sel.pos_x - mouse_pos.x;
	click_offset[1]=_panel_sel.pos_y - mouse_pos.y;
	while(mouse_left==ON){
		proc_mode = PROC_EARLY;
		_panel_sel.pos_x = mouse_pos.x+click_offset[0];
		_panel_sel.pos_y = mouse_pos.y+click_offset[1];
		wait(1);
	}
}

PANEL* PanelTest={
        ...
        event = MoveWindow;
}


Okay, but there are many windows I'm going to create in the script. Is there a way to create a function to all buttons with the same function "MoveWindow()"?
If I put a event in panel, It work! But I wanted it to be in the button. Someone know?

Thanks guys!