Klasse PlayerUIElementClickEvent
java.lang.Object
net.risingworld.api.events.Event
net.risingworld.api.events.player.PlayerEvent
net.risingworld.api.events.player.ui.PlayerUIElementClickEvent
Called when an item in inventory is dragged & dropped on a
UIElement
. This does only work if
UIElement.setPickable(boolean)
was set to true.-
Feldübersicht
-
Methodenübersicht
Modifizierer und TypMethodeBeschreibungfloat
Gets the absolute x (horizontal) position of the mouse cursor (within the UI element).float
Gets the absolute y (vertical) position of the mouse cursor (within the UI element).int
Gets the mouse button.float
Gets the relative (0-100 percent) x (horizontal) position of the mouse cursor (within the UI element).float
Gets the relative (0-100 percent) y (vertical) position of the mouse cursor (within the UI element).Gets the UI element that was clicked.boolean
Gets whether or not the player double-clicked the ui element.Von Klasse geerbte Methoden net.risingworld.api.events.player.PlayerEvent
getPlayer
-
Methodendetails
-
getUIElement
Gets the UI element that was clicked.- Gibt zurück:
- the clicked UI element.
-
isDoubleClick
public boolean isDoubleClick()Gets whether or not the player double-clicked the ui element.- Gibt zurück:
- true if the player double-clicked on the ui element, false if it was just a single click.
-
getMouseButton
public int getMouseButton()Gets the mouse button. Typically 0 for the left mouse button, 1 for the right mouse button and 2 for the middle button (pressing the mouse wheel).- Gibt zurück:
- the mouse button.
-
getAbsoluteMousePositionX
public float getAbsoluteMousePositionX()Gets the absolute x (horizontal) position of the mouse cursor (within the UI element).- Gibt zurück:
- the absolute x mouse position.
-
getAbsoluteMousePositionY
public float getAbsoluteMousePositionY()Gets the absolute y (vertical) position of the mouse cursor (within the UI element).- Gibt zurück:
- the absolute y mouse position.
-
getRelativeMousePositionX
public float getRelativeMousePositionX()Gets the relative (0-100 percent) x (horizontal) position of the mouse cursor (within the UI element).- Gibt zurück:
- the relative x mouse position.
-
getRelativeMousePositionY
public float getRelativeMousePositionY()Gets the relative (0-100 percent) y (vertical) position of the mouse cursor (within the UI element).- Gibt zurück:
- the relative y mouse position.
-