[SOLVED] How to teach Lemur to use Game Controller Button A for click action

I would like to change the button that is used for the click to Button A (Enter, mouse left click). Atm it is Button X (Button 2). Is there a way to change this Nav Button mapping in Lemur without too much voodoo? Would be super nice bc then Button A enters a sub-menu and leaves a sub-menu with Button B, which is due to my son the way to go for many games.

Yeah, still game controllers :smiley: But I’m super happy with it so far, just pinpoint some minor things.

I think you can pretty easily define your own mappings.

The pre-existing mappings are defined in:

…and they won’t set themselves if you’ve already set one. (This is designed for games that allow users to override with custom mappings.)

Alternately, if you just want to replace one of the mappings but leave the rest, you can just unmap that one and map your own… but you’ll have to do it after FocusNavigationFunctions runs. (I think postRender() or second frame would do it if you initialize lemur on init.)

2 Likes

Oh, that is actually as simple and straightforward as I should have expected it :sweat_smile:
Just this

    @Override
    protected void initialize(Application app) {
        ...
        inputMapper = GuiGlobals.getInstance().getInputMapper();
        inputMapper.removeMapping(F_ACTIVATE, Button.JOYSTICK_BUTTON3);
        inputMapper.map(F_ACTIVATE, Button.JOYSTICK_BUTTON1);
        ...
    }

Thanks a lot! I fell in love again with this engine and the libs around it :smiley:

2 Likes