I want to extend GuiGlobals to make my library work with standard Lemur:
import com.jme3.app.Application;
import com.simsilica.lemur.GuiGlobals;
public class BBGuiGlobals extends GuiGlobals {
BBInputMapper bbinputMapper;
public BBGuiGlobals(Application app, BBInputMapper bbinputMapper) {
super(app);
this.bbinputMapper = bbinputMapper;
}
public InputMapper getInputMapper() {
return bbinputMapper;
}
}
---
package com.simsilica.lemur.input;
import com.jme3.input.InputManager;
public class BBInputMapper extends InputMapper{
public BBInputMapper(InputManager inputManager) {
super(inputManager);
}
public void bbnotifyStateChanged(FunctionId f, float tpf, InputState is){
getFunctionListeners(f,false).notifyStateChanged(f, is);
}
}
---
protected void initialize(Application app) {
inputMapper = new BBInputMapper(getApplication().getInputManager());
GuiGlobals.setInstance(new BBGuiGlobals(getApplication(), inputMapper));
However, while the above code succeeds in compiling and kinda work, there are some problems:
- theming don’t work
- input navigation don’t work
Any suggestion is appreciated, thanks!