Package com.prineside.tdi2.scene2d.ui
Class Tooltip<T extends Actor>
java.lang.Object
com.prineside.tdi2.scene2d.InputListener
com.prineside.tdi2.scene2d.ui.Tooltip<T>
- All Implemented Interfaces:
EventListener
- Direct Known Subclasses:
TextTooltip
A listener that shows a tooltip actor when the mouse is over another actor.
- Author:
- Nathan Sweet
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidenter(InputEvent event, float x, float y, int pointer, Actor fromActor) Called any time the mouse cursor or a finger touch is moved over an actor.voidexit(InputEvent event, float x, float y, int pointer, Actor toActor) Called any time the mouse cursor or a finger touch is moved out of an actor.getActor()voidhide()booleanmouseMoved(InputEvent event, float x, float y) Called any time the mouse is moved when a button is not down.voidvoidsetAlways(boolean always) If true, this tooltip is shown even when tooltips are notTooltipManager.enabled.voidsetInstant(boolean instant) If true, this tooltip is shown without delay when hovered.voidsetTouchIndependent(boolean touchIndependent) If true, this tooltip will be shown even when screen is touched simultaneously with entering tooltip's targetActorbooleantouchDown(InputEvent event, float x, float y, int pointer, int button) Called when a mouse button or a finger touch goes down on the actor.Methods inherited from class com.prineside.tdi2.scene2d.InputListener
handle, keyDown, keyTyped, keyUp, scrolled, touchDragged, touchUp
-
Constructor Details
-
Tooltip
- Parameters:
contents- May be null.
-
Tooltip
- Parameters:
contents- May be null.
-
-
Method Details
-
getManager
-
getContainer
-
setActor
-
getActor
-
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 notTooltipManager.enabled. -
setTouchIndependent
public void setTouchIndependent(boolean touchIndependent) If true, this tooltip will be shown even when screen is touched simultaneously with entering tooltip's targetActor -
touchDown
Description copied from class:InputListenerCalled when a mouse button or a finger touch goes down on the actor. If true is returned, this listener will havetouch focus, so it will receive all touchDragged and touchUp events, even those not over this actor, until touchUp is received. Also when true is returned, the event ishandled.- Overrides:
touchDownin classInputListener- See Also:
-
mouseMoved
Description copied from class:InputListenerCalled 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:
mouseMovedin classInputListener- See Also:
-
enter
Description copied from class:InputListenerCalled any time the mouse cursor or a finger touch is moved over an actor. On the desktop, this event occurs even when no mouse buttons are pressed (pointer will be -1).- Overrides:
enterin classInputListenerfromActor- May be null.- See Also:
-
exit
Description copied from class:InputListenerCalled any time the mouse cursor or a finger touch is moved out of an actor. On the desktop, this event occurs even when no mouse buttons are pressed (pointer will be -1).- Overrides:
exitin classInputListenertoActor- May be null.- See Also:
-
hide
public void hide()
-