View Single Post
Old 06-28-12, 12:28 PM   #8992
radcapricorn
Helmsman
 
Join Date: Jun 2011
Posts: 105
Downloads: 181
Uploads: 0
Default

Quote:
Originally Posted by TheDarkWraith View Post
You are correct, it won't go any further. Problem is commands.cfg gets checked first for keypresses and then control passes onto the scriptmanager. If the commands.cfg recognizes a keypress it gets handled and it must be setting args.Handled to true because it never gets passed onto the scriptmanager.
Hmmm... That is peculiar. I recently created the Edit Box in menu editor (I didn't clone it from existing one, just created a brand new control). When I left it as it was, with no event handlers attached, then whenever I "typed in" some characters that corresponded to commands.cfg keys (i.e. digits), they both appeared in edit box and were handled by the game. But as soon as I set args.Handled to true, the game stopped responding to those keys, thus allowing me to type in whatever I wanted. But then I noticed that for some keys, it was KeyReleased event that mattered (Enter, Backspace, Home, Del, etc.)... Anyway, I was under the impression that this would hold true for the whole PageDefaultHud, since this page is always active (at least in-game). I wish I could investigate a bit more, but I haven't the time ATM. Maybe in a day or two...
radcapricorn is offline   Reply With Quote