I want to make a panel move if the user drags a button. When the users clicks and holds a button and drags it, I want the panel to move along with the mouse! How do I do that??
function move_panel(PANEL* p)
{
while(mouse_left) //Only run while the left button is held
{
p.pos_x = mouse_pos.x;
p.pos.y = mouse_pos.y;
wait(1);
}
}
PANEL* BLAH =
{
event = move_panel;
}