Not sure how to describe the issue I'm facing here:

Rectangles are grouped and attached to a "layer" extending Stage.
Each layer is added to a multiplexer in a Screen extension.

There are 2 layers:

  • Top has the 1 big rectangle & group members (smaller colored rectangles)
  • Bottom has the 2 big rectangles & their members

The 3 big rectangles are all the same size & color (turns yellow if it detects the mouse is over it, for debugging purposes)

When you click on it, it brings its group to the front of its layer.

The problem is that both the top layer and bottom layer are processing the input, grouping and drawing stuff works fine.

In the screenshot, only the top-most big rectangle should be yellow at the cursor's position:

enter image description here


Assuming that you're using some kind of Event, you should mark that the Event as "handled" to prevent it being propagated further.

You can do this in the Actor by calling Event.handle().

If you are using the Stage methods, you should also be able to do this by returning true from (eg) Stage.mouseMoved. This will indicate that the input has been processed and does not need to be sent to other objects.


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .