Package arc.scene.ui
Class Tooltip
java.lang.Object
arc.scene.event.InputListener
arc.scene.ui.Tooltip
- All Implemented Interfaces:
EventListener
A listener that shows a tooltip element when another element is hovered over with the mouse.
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
Keeps track of an application's tooltips. -
Field Summary
Modifier and TypeFieldDescriptionboolean
boolean
final Table
boolean
final Tooltip.Tooltips
protected Runnable
protected Element
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
enter
(InputEvent event, float x, float y, int pointer, Element fromActor) Called any time the mouse cursor or a finger touch is moved over an element.void
exit
(InputEvent event, float x, float y, int pointer, Element toActor) Called any time the mouse cursor or a finger touch is moved out of an element.void
hide()
boolean
mouseMoved
(InputEvent event, float x, float y) Called any time the mouse is moved when a button is not down.void
setAlways
(boolean always) If true, this tooltip is shown even when tooltips are notTooltip.Tooltips.enabled
.protected void
setContainerPosition
(Element element, float x, float y) void
setInstant
(boolean instant) If true, this tooltip is shown without delay when hovered.void
boolean
touchDown
(InputEvent event, float x, float y, int pointer, KeyCode button) Called when a mouse button or a finger touch goes down on the element.void
touchUp
(InputEvent event, float x, float y, int pointer, KeyCode button) Called when a mouse button or a finger touch goes up anywhere, but only if touchDown previously returned true for the mouse button or touch.Methods inherited from class arc.scene.event.InputListener
handle, keyDown, keyTyped, keyUp, scrolled, touchDragged
-
Field Details
-
manager
-
container
-
allowMobile
public boolean allowMobile -
instant
public boolean instant -
always
public boolean always -
targetActor
-
show
-
-
Constructor Details
-
Tooltip
-
Tooltip
-
Tooltip
-
-
Method Details
-
getManager
-
getContainer
-
setInstant
public void setInstant(boolean instant) If true, this tooltip is shown without delay when hovered. -
setAlways
public void setAlways(boolean always) If true, this tooltip is shown even when tooltips are notTooltip.Tooltips.enabled
. -
touchDown
Description copied from class:InputListener
Called when a mouse button or a finger touch goes down on the element. If true is returned, this listener will receive all touchDragged and touchUp events, even those not over this element, until touchUp is received. Also when true is returned, the event ishandled
.- Overrides:
touchDown
in classInputListener
- See Also:
-
touchUp
Description copied from class:InputListener
Called when a mouse button or a finger touch goes up anywhere, but only if touchDown previously returned true for the mouse button or touch. The touchUp event is alwayshandled
.- Overrides:
touchUp
in classInputListener
- See Also:
-
mouseMoved
Description copied from class:InputListener
Called any time the mouse is moved when a button is not down. This event only occurs on the desktop. When true is returned, the event ishandled
.- Overrides:
mouseMoved
in classInputListener
- See Also:
-
setContainerPosition
-
enter
Description copied from class:InputListener
Called any time the mouse cursor or a finger touch is moved over an element. On the desktop, this event occurs even when no mouse buttons are pressed (pointer will be -1).- Overrides:
enter
in classInputListener
fromActor
- May be null.- See Also:
-
exit
Description copied from class:InputListener
Called any time the mouse cursor or a finger touch is moved out of an element. On the desktop, this event occurs even when no mouse buttons are pressed (pointer will be -1).- Overrides:
exit
in classInputListener
toActor
- May be null.- See Also:
-
show
-
hide
public void hide()
-