Class ScreenEvent.MouseClickedEvent.Post

Enclosing class:
ScreenEvent.MouseClickedEvent

public static class ScreenEvent.MouseClickedEvent.Post extends ScreenEvent.MouseClickedEvent
This event fires after GuiEventListener.mouseClicked(double, double, int).

This event has a result.

  • Event.Result.ALLOW - to force set the mouse click as handled
  • Event.Result.DEFAULT - to use the default value of handled
  • Event.Result.DENY - to force set the mouse click as not handled

Note that this event is currently pre-cancelled if ContainerEventHandler.mouseClicked(double, double, int) returns true to retain old behavior. This will be changed in 1.18 when the event is made non-cancellable.

  • Field Details

    • handled

      private final boolean handled
  • Constructor Details

    • Post

      public Post(Screen screen, double mouseX, double mouseY, int button, boolean handled)
  • Method Details

    • wasHandled

      public boolean wasHandled()
      Returns:
      true if the mouse click was already handled by its screen