public interface IOverlayListener
| Modifier and Type | Method and Description |
|---|---|
default void |
onActivate(UIState mapState)
Called when the Overlay is actively displayed.
|
default void |
onDeactivate(UIState mapState)
Called when Overlay is no longer displayed.
|
default boolean |
onMouseClick(UIState mapState,
java.awt.geom.Point2D.Double mousePosition,
net.minecraft.core.BlockPos blockPosition,
int button,
boolean doubleClick)
Called when the mouse is clicked within the bounds of the overlay.
|
default void |
onMouseMove(UIState mapState,
java.awt.geom.Point2D.Double mousePosition,
net.minecraft.core.BlockPos blockPosition)
Called when the mouse moves within the bounds of the overlay.
|
default void |
onMouseOut(UIState mapState,
java.awt.geom.Point2D.Double mousePosition,
net.minecraft.core.BlockPos blockPosition)
Called when the mouse first leaves the bounds of the overlay.
|
default void |
onOverlayMenuPopup(UIState mapState,
java.awt.geom.Point2D.Double mousePosition,
net.minecraft.core.BlockPos blockPosition,
ModPopupMenu modPopupMenu)
Called when the popup menu is displayed on an overlay.
|
default void onActivate(UIState mapState)
mapState - current UIState of the UI where the overlay is active.default void onDeactivate(UIState mapState)
mapState - current UIState of the UI where the overlay is inactive.default void onMouseMove(UIState mapState, java.awt.geom.Point2D.Double mousePosition, net.minecraft.core.BlockPos blockPosition)
mapState - current UIState of the UI where the overlay is active.mousePosition - screen coordinates of the mouseblockPosition - the block position under the mousedefault void onMouseOut(UIState mapState, java.awt.geom.Point2D.Double mousePosition, net.minecraft.core.BlockPos blockPosition)
mapState - current UIState of the UI where the overlay is active.mousePosition - screen coordinates of the mouseblockPosition - the block position under the mousedefault boolean onMouseClick(UIState mapState, java.awt.geom.Point2D.Double mousePosition, net.minecraft.core.BlockPos blockPosition, int button, boolean doubleClick)
mapState - current UIState of the UI where the overlay is active.mousePosition - screen coordinates of the mouseblockPosition - the block position under the mousebutton - the mouse button clickeddoubleClick - true if the mouse button was double-clickeddefault void onOverlayMenuPopup(UIState mapState, java.awt.geom.Point2D.Double mousePosition, net.minecraft.core.BlockPos blockPosition, ModPopupMenu modPopupMenu)
mapState - current UIState of the UI where the overlay is active.mousePosition - screen coordinates of the mouseblockPosition - the block position under the mousemodPopupMenu - the modMenuPopup