View Single Post
Old 07-02-2012, 12:23 PM   #228
-=*Raz0r*=-'s Avatar
Join Date: Oct 2006
Location: Australia
Posts: 243
Weird behaviour in UI code causes onOpen {} events to be triggered on the parent item of the item you're closing (via out-of-bounds click)
Example: Ingame menu -> click "About" -> Click "Setup" -> the onOpen event of the "ingame" menu would be fired.
This is only an issue if you have your own menus that use these events. Personally I'm using transitions in all my menus, which were being triggered at the wrong time.

In ui_shared.c -> Menus_HandleOOBClick

Comment out "Menus_Activate(&Menus[i]);" in the for loop.

		for (i = 0; i < menuCount; i++) {
			if (Menu_OverActiveItem(&Menus[i], DC->cursorx, DC->cursory)) {
				menu->window.flags &= ~(WINDOW_HASFOCUS | WINDOW_VISIBLE);
			//	Menus_Activate(&Menus[i]);
				Menu_HandleMouseMove(&Menus[i], DC->cursorx, DC->cursory);
				Menu_HandleKey(&Menus[i], key, down);

-=*Raz0r*=- is offline   you may: quote & reply,