Every Screen interested in click events must implement this interface (Except when DELEGATE mode is used).
Click event listener must be activated in Engine :
// Not interested in clicked sprites
engine.enableMouseControl(); // Equivalent to engine.enableMouseControl(MouseEventType.BASIC);
It's possible to capture the list of sprites clicked by setting the optional argument to true
When MouseEventType.DELEGATE is used, Screen needn't implement ClickListener interface
To enforce declaration of interface, use MouseEventType.DELEGATE_STRICT.
Screen declaration of onClick is called BEFORE any sprite, can cancel delegation by returning false.
Every Screen interested in click events must implement this interface (Except when DELEGATE mode is used). Click event listener must be activated in Engine :
// Not interested in clicked sprites engine.enableMouseControl(); // Equivalent to engine.enableMouseControl(MouseEventType.BASIC);It's possible to capture the list of sprites clicked by setting the optional argument to true
// Capture sprites engine.enableMouseControl(MouseEventType.SPRITES);Sprites may also manage their behaviour themselves
// Capture sprites engine.enableMouseControl(MouseEventType.DELEGATE);When
MouseEventType.DELEGATEis used,Screenneedn't implementClickListenerinterface To enforce declaration of interface, useMouseEventType.DELEGATE_STRICT. Screen declaration ofonClickis called BEFORE any sprite, can cancel delegation by returningfalse.