Modifying InputHandler update behaviour

i'd like my input hanlder to update the attached input hanlders first and only afterwards execute it's own update sequence. overriding the update() method is not an option because 'activeTriggers' is not visible in a derivated class.



i see only a few possibilities to achive what i want:

  • change the visibility of 'activeTriggers' and override update() --> that would mean to change jme, which i don't want to
  • (the most ugly solution) extend InputHandler and override everythig --> it's just an option which i won't use because of it's ugliness



    so you see, i'm stuck. that's why i ask if it's possible to either change the visibility of that 'activeTriggers' in jme, or modify InputHanlder to make it configurable with regard of this issue: add a method setUpdateMode(InputHandler.UpdateMode mode) where UpdateMode would be an enum



    …or (the best solution) somebody comes with a better idea on how to implement such an InputHanlder behaviour without any changes to jme.  :expressionless:

should be made protected instead of package private…otherwise at least have a getActiveTriggers method…

i'll wait for objections or an update then  :wink:

activeTriggers really should not be accessible outside the package as it can cause a lot of weired issues when you modify it in subclasses.



I have extracted two methods to allow overriding update(float) and reverse the processing order.

i noticed it, thanks.