@Environment(value=CLIENT) public interface InteractiveImageRenderer extends ImageRenderer
This way you can e.g. disable the default tooltip and render a more advanced one, or render a small GUI on a page.
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
getTooltip(java.lang.String tooltip)
Get a custom tooltip for this image renderer.
|
boolean |
onMouseClick(int mouseX,
int mouseY)
Called when the mouse is clicked while over this image renderer.
|
getHeight, getWidth, renderjava.lang.String getTooltip(java.lang.String tooltip)
This can be used to override the original tooltip of an image.
tooltip - the original tooltip of the element.boolean onMouseClick(int mouseX,
int mouseY)
This only fires for left-clicks, because right-clicks are reserved for navigating back in the manual.
If this returns false and the element is a link, the link will be followed. If it returns true, it will not.
mouseX - the X coordinate of the mouse, relative to the element.mouseY - the Y coordinate of the mouse, relative to the element.