Status: Accepted Owner: allain.lalonde Labels: Type-Enhancement Priority-High Effort-Medium OpSys-All Toolkit-Piccolo2D.Java Component-Core Milestone-2.0 Usability
New issue 103 by allain.lalonde: PInputEventFilter is Overly Complex http://code.google.com/p/piccolo2d/issues/detail?id=103 PInputEventFilter has so much logic to jump through that I can't help but think that pulling out a Filter interface that returned true to acceptsEvent and allowed for developers to implement their own logic would help. For example, if I need to implement a filter that allowed for both keyboard and mouse control, but not both, I'm not even sure where to start. Maybe if I were smart enough I could hack together something involving the or, and, not masks of PInputEventFilter, but it'd be harder to debug that a simple class that implemented a tiny bit of logic when acceptsEvent gets called. Once that interface were in place you could subclass it to collect events and create a representation of the input state rather that being reactionary to individual events, it could just pass an PInputState object that could be queried for mouse states, and keyboard states. Allowing for things like holding down both left and right to mean grab. (Issue 80) Anyway, I realize that this probably breaks binary compatibility, but I think we can figure out a path in this direction. Thoughts? -- You received this message because you are listed in the owner or CC fields of this issue, or because you starred this issue. You may adjust your issue notification preferences at: http://code.google.com/hosting/settings --~--~---------~--~----~------------~-------~--~----~ Piccolo2D Developers Group: http://groups.google.com/group/piccolo2d-dev?hl=en -~----------~----~----~----~------~----~------~--~---
