Hi, I'm Logan. I used to post on here 3-4 years ago, and then kinda moved on in life--but now I'm back, kinda, itching to noodle around at least until school starts up again.

I'm working on an adventure game with some RPG elements. Yeah, the same one as waaaay long ago. Trying to finish it so I can finally die happy.

I'm working on a click-n-drag feature for a specific panel, and I wrote this code:
Code:
function popupbox_click_event();
PANEL* popupbox = 
{
	bmap = popupbox_map;
	layer = 4;
	event = popupbox_click_event;
}

function popupbox_click_event()
{
	while(mouse_left)
	{
		popupbox.pos_x += mickey.x;
		popupbox.pos_y += mickey.y;
		wait(1);
	}
}



It doesn't work. If I am dragging the mouse AS I click on it, it moves a few pixels in the direction the mouse was moving. That's evidence to me that the while loop ran, but only once. I've tried proc_mode = PROC_GLOBAL; as well as changing the loop to while(1) just for experimentation's sake. Even worse, if I add a wait(1) to the beginning of the event function, nothing happens at all. This looks like a bug to me, but I thought I would run it by here before posting in the Bug Hunt forum in case I am missing something obvious, or if this has already been discussed, or something.

I really appreciate anyone's help. This community is awesome.