Page 1 of 1

Posted: Mon Jan 16, 2012 10:22 am
by Bunnywabbit
Hi,

If we're going to change the keymap, the instructions also need to be changed. Furthermore, if we're going to point players at the possibility to use their own custom keyboard layout, then the instructions need to adapt based on the players inputmap file.

So, as mentioned in this ticket, please code us something, a function or whatever, that will let us do this:

Make it so that the instructor voice can say "push the 'fire weapon button' to continue", rather than "Press the spacebar to continue", the training script can wait for the event

Code: Select all

Goal*   pGoal = new Goal (new GetKeyCondition (TK_FireWeapon))
and rather than the chat code saying:

Code: Select all

pGoal->AddStartAction (new MessageAction ("Press the SPACEBAR when you are ready to proceed."));
it would be:

Code: Select all

pGoal->AddStartAction (new MessageAction ("Press " & GetKeyName(TK_FireWeapon) & " when you are ready to proceed."));
where getKeyName retrieves the corresponding name for the key that is mapped to TK_FireWeapon.

There is a lot of stuff waiting in the stalls for this, so please make this a priority.

Posted: Mon Jan 16, 2012 11:19 am
by ThePhantom032
I will take a look at this.

But I can promise nothing else, not before I take that look :ninja:

Posted: Mon Jan 16, 2012 1:04 pm
by ThePhantom032
We probably want to access the function
GetString of class InputMapPopup::CommandMap around line 1756 of trekinput.cpp
It is the one that is used to print the key names in the ESC-G-C window .

Training missions do not have access to that function as it is implemented in a way that requires a CommandMap currently only created and maintained by the ESC-G-C window (InputMapPopup)-> so that has to be open.

Now working on how to create a CommandMap without that window around.

Posted: Mon Jan 16, 2012 1:43 pm
by Bunnywabbit