Also: are these and only these the axis supported? No axis is allowed beyond these?
public interface JoystickAxis {
public static final String X_AXIS = "x";
public static final String Y_AXIS = "y";
public static final String Z_AXIS = "z";
public static final String Z_ROTATION = "rz";
public static final String POV_X = "pov_x";
public static final String POV_Y = "pov_y";
If so, I might want to work with these static value and show to the user the i18n version of it…
I have to spend some time going over my notes and seeing what I had planned for axis remapping… especially in the presence of multiple joysticks. It seems likely that I just never finished this piece. I will take a look… maybe this weekend if not sooner.
Lemur’s InputMapper (which will someday be a part of JME), is already supposed to allow remapping of this sort of thing.
Note: the constants in things like JoystickAxis are meant to map to the standard things that the joystick will report. I don’t believe that changes across countries. So I guess you mean mapping them into local-friendly names for display to the user.
You mean that eventually Axis or JoystickAxis will take over and obsolete the other, or are they supposed to coexist?
Also I should wait for your modification?
Even when InputMapper is migrated (remains to be seen when that will be), it would still be a wrapper around the underlying JME structures. I think the separation is good for both at this point. Over time some incestuous blending can happen after that migration… but it would be a long way down a road of already unknown length.
So JoystickAxis is something you (and I) will have to deal with.
JoystickAxis and Lemur’s Axis kind of have two different purposes anyway. The former being “these are the things JME will care about” and the latter being “Here are some useful constants but there may be more… that will all be called Axis, though”
Lemur’s classes are not meant to be presciptivist… even if the joystick mappings might be implemented that way at the moment (I have not confirmed one way or the other). It’s supposed to be that new Axis instances (or Button instances, etc.) would be created on the fly by Lemur if JME reports them. There just may not be handy constants for them.
I no longer have any idea how I planned to handle multiple joysticks but it’s something I want to look into. My notes on this are a bit scattered.
One of the reasons for working on Spacebugs was to have an end-to-end game to get everything like this working. Eventually it will have a display config screen, input remapping, etc… and the support library modifications to support that.
It also appears that with Xinput controllers (for example, the xbox controller) the joystick buttons are mixed… what you register with InputManager during remapping is mapped to another button with InputMapper…