Exposed keyboard input properties
by Arden · in Torque X 2D · 10/18/2010 (2:29 pm) · 2 replies
Hiya guys,
This is a novice question, but I'm trying to allow keyboard input mapping to be exposed as public properties. So I setup a string type field _player1Up which is exposed as a public property in the editor. However, when I use it as part of:
I get the message that XNA framework doesn't contain a definition for _player1Up.
Anything I'm missing here?
More broadly, what I would like to do is to be able to select the player component from the editor and select the choice of keyboard inputs from a drop down list, if such a thing is possible.
This is a novice question, but I'm trying to allow keyboard input mapping to be exposed as public properties. So I setup a string type field _player1Up which is exposed as a public property in the editor. However, when I use it as part of:
inputMap.BindMove(keyboardId, (int)Keys._player1Up, MoveMapTypes.StickDigitalUp, 0);
I get the message that XNA framework doesn't contain a definition for _player1Up.
Anything I'm missing here?
More broadly, what I would like to do is to be able to select the player component from the editor and select the choice of keyboard inputs from a drop down list, if such a thing is possible.
#2
If you've got the time to create such a component, It'll be very useful and appreciated but don't sweat it. It's not critical. It's just part of a longer term effort to get as much front end functionality in the editor for components to make life easier for other people than coders / programmers :)
10/19/2010 (2:46 pm)
Hey Aaron, as always, thanks for the reply. The intent of this was to enable Level Designers to test out different control configurations without having to go into the code. However, unless we can get an array of choices somehow into the editor, it'll just be simpler to teach them to go directly into the component and change the keyboard assigments manually. If you've got the time to create such a component, It'll be very useful and appreciated but don't sweat it. It's not critical. It's just part of a longer term effort to get as much front end functionality in the editor for components to make life easier for other people than coders / programmers :)
Torque 3D Owner Aaron Scovel
I'm not sure how helpful a component like this would be, as you would still need to write code for all the commands. However if the methods and keys were both exposed to the component as a drop down list, it would be an easy way to switch buttons and pre coded methods on the fly.
If you really need a component like this, I will add it to my "todo" list. Let me know.
Aaron