SUBSIM Radio Room Forums



SUBSIM: The Web's #1 resource for all submarine & naval simulations since 1997

Go Back   SUBSIM Radio Room Forums > Silent Hunter 3 - 4 - 5 > SH5 Mods Workshop
Forget password? Reset here

Reply
 
Thread Tools Display Modes
Old 06-25-12, 10:07 AM   #1
finchOU
Samurai Navy
 
Join Date: Jan 2004
Posts: 571
Downloads: 77
Uploads: 0
Default

Quote:
Originally Posted by TheDarkWraith View Post
Is that hotkey enabled? What I mean is did you enable it in the options file editor/viewer?

Yeah.....

#[OPTION]
#CATEGORY=Fuel
#TYPE=7
#DESCRIPTION=Hotkey for ordering most fuel efficient speed
#VALUES=
#DEFAULT=[ False, MenuKeyManagerWrapper.Keys.M, False, False, False, False ]
#; the hotkey used to order most fuel efficient speed
#; Format:
#;
#; MostFuelEfficientSpeedHotKey = [ False, None, False, False, False ]
#; False = disabled
#; None = key used
#; False = shift required
#; False = ctrl required
#; False = alt required
#; False = handled
#;
#; if you wanted to enable this without shift, ctrl, and alt required:
#; MostFuelEfficientSpeedHotKey = [ True, MenuKeyManagerWrapper.Keys.M, False, False, False, False ]
#;
#; if you wanted to disable this:
#; MostFuelEfficientSpeedHotKey = [ False, MenuKeyManagerWrapper.Keys.M, False, False, False, False ]
#;
#; Note: Keys.M is used by the Navigation Map in the stock game! It was used only as example here. Also the hotkey will only be recognized if the sub is surfaced
#;
MostFuelEfficientSpeedHotKey=[True,MenuKeyManagerWrapper.Keys.U,False,True,False ,False]

I used control for it...but nothing seems to happen when I select it in game. I used the Application to install it this way.
__________________
Intel i7-2700K-3.50GHz, 16 GB RAM, 2 xGTX 560,2GB,SLI,2 TB HD
The Wolves of Steel 1.06
The Wolves of Steel 1.06 Update 05c
finchOU is offline   Reply With Quote
Old 06-25-12, 10:15 AM   #2
TheDarkWraith
Black Magic
 
Join Date: Jun 2007
Posts: 11,959
Downloads: 147
Uploads: 5


Default

Quote:
Originally Posted by finchOU View Post
I used control for it...but nothing seems to happen when I select it in game. I used the Application to install it this way.
The only thing that could be overriding it is if you have the same key, U, defined in commands.cfg for something. The keys in commands.cfg will not 'pass' the keypress onto anything else thus I cannot intercept it.
TheDarkWraith is offline   Reply With Quote
Old 06-26-12, 07:15 AM   #3
steve.puma
Nub
 
Join Date: Jun 2009
Posts: 4
Downloads: 114
Uploads: 0
Default

I would like to say hello and thank for this amazing mod
steve.puma is offline   Reply With Quote
Old 06-26-12, 08:07 AM   #4
radcapricorn
Helmsman
 
Join Date: Jun 2011
Posts: 105
Downloads: 181
Uploads: 0
Default

Quote:
Originally Posted by TheDarkWraith View Post
The only thing that could be overriding it is if you have the same key, U, defined in commands.cfg for something. The keys in commands.cfg will not 'pass' the keypress onto anything else thus I cannot intercept it.

Can't you set Handled property to True in PageDefaultHud's key press handler? I've been playing with edit boxes lately and whenever I typed in some numbers my speed telegraph reacted. But once I changed the event's Handled property to True, it stopped passing through.
radcapricorn is offline   Reply With Quote
Old 06-27-12, 09:17 PM   #5
TheDarkWraith
Black Magic
 
Join Date: Jun 2007
Posts: 11,959
Downloads: 147
Uploads: 5


Default

Quote:
Originally Posted by radcapricorn View Post

Can't you set Handled property to True in PageDefaultHud's key press handler? I've been playing with edit boxes lately and whenever I typed in some numbers my speed telegraph reacted. But once I changed the event's Handled property to True, it stopped passing through.
Don't understand what you're asking
TheDarkWraith is offline   Reply With Quote
Old 06-28-12, 10:18 AM   #6
radcapricorn
Helmsman
 
Join Date: Jun 2011
Posts: 105
Downloads: 181
Uploads: 0
Default

Quote:
Originally Posted by TheDarkWraith View Post
Don't understand what you're asking
You said earlier that you cannot "intercept" keys defined in commands.cfg. I.e. if such key is pressed, it reaches the game and executes its command no matter what. I think this can be overridden in PageDefaultHud_KeyPressed(args) function. If I understand it correctly, if you handle the key press there and set args.Handled to True, the key press event won't go any further.
radcapricorn is offline   Reply With Quote
Old 06-28-12, 12:13 PM   #7
TheDarkWraith
Black Magic
 
Join Date: Jun 2007
Posts: 11,959
Downloads: 147
Uploads: 5


Default

Quote:
Originally Posted by radcapricorn View Post
You said earlier that you cannot "intercept" keys defined in commands.cfg. I.e. if such key is pressed, it reaches the game and executes its command no matter what. I think this can be overridden in PageDefaultHud_KeyPressed(args) function. If I understand it correctly, if you handle the key press there and set args.Handled to True, the key press event won't go any further.
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.
TheDarkWraith is offline   Reply With Quote
Old 06-28-12, 12:28 PM   #8
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
Old 06-27-12, 09:12 PM   #9
finchOU
Samurai Navy
 
Join Date: Jan 2004
Posts: 571
Downloads: 77
Uploads: 0
Default

Quote:
Originally Posted by TheDarkWraith View Post
The only thing that could be overriding it is if you have the same key, U, defined in commands.cfg for something. The keys in commands.cfg will not 'pass' the keypress onto anything else thus I cannot intercept it.

went with alt S...works 4.0!
__________________
Intel i7-2700K-3.50GHz, 16 GB RAM, 2 xGTX 560,2GB,SLI,2 TB HD
The Wolves of Steel 1.06
The Wolves of Steel 1.06 Update 05c
finchOU is offline   Reply With Quote
Reply

Tags
dbrn, favorite, new ui

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -5. The time now is 03:59 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
Copyright © 1995- 2026 Subsim®
"Subsim" is a registered trademark, all rights reserved.