Registering all menus

Post » Mon Nov 19, 2012 5:43 pm

How demanding would it be to constantly have all menus registered? To have OnMenuOpen and OnMenuClose work with every menu.

Here's my issue. Right now I can tell my mod to stop reading key presses if a menu is open. The problem is that the key you press to close it still gets picked up. It passes the menu checks and sends the key.

Event OnKeyDown(int keypress)  If !Working	Working = True	If !Utility.IsInMenuMode() && !UI.IsMenuOpen("Dialogue Menu")	  If key0 == 0		key0 = keypress		FindKey(key0)	  else		key1 = keypress		FindKey(key0, key1)	  endif	endif	Working = False  endifEndevent

I am thinking of making a script that will monitor all menu and set this script into an idle state if one is open. Then if it is closed I will give it a delay before resuming the normal state. It would also save the menu check in the above script so that would be nice. I'm just not sure if I would shoot my self in the foot by having all those menus registered.

Thanks!
User avatar
Del Arte
 
Posts: 3543
Joined: Tue Aug 01, 2006 8:40 pm

Return to V - Skyrim