Package com.prineside.tdi2.scene2d.ui
Class TooltipManager
java.lang.Object
com.prineside.tdi2.scene2d.ui.TooltipManager
Keeps track of an application's tooltips.
- Author:
- Nathan Sweet
-
Field Summary
FieldsModifier and TypeFieldDescriptionboolean
If false, tooltips will be shown without animations.float
The distance from the tooltip actor position to the edge of the screen where the actor will be shown on the other side of the mouse cursor.boolean
If false, tooltips will not be shown.float
Seconds from when an actor is hovered to when the tooltip is shown.float
The maximum width of aTextTooltip
.float
The distance from the mouse position to offset the tooltip actor.float
The distance from the mouse position to offset the tooltip actor.float
Seconds to usesubsequentTime
.float
Once a tooltip is shown, this is used instead ofinitialTime
. -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
initialTime
public float initialTimeSeconds from when an actor is hovered to when the tooltip is shown. Default is 2. CallhideAll()
after changing to reset internal state. -
subsequentTime
public float subsequentTimeOnce a tooltip is shown, this is used instead ofinitialTime
. Default is 0. -
resetTime
public float resetTimeSeconds to usesubsequentTime
. Default is 1.5. -
enabled
public boolean enabledIf false, tooltips will not be shown. Default is true. -
animations
public boolean animationsIf false, tooltips will be shown without animations. Default is true. -
maxWidth
public float maxWidthThe maximum width of aTextTooltip
. The label will wrap if needed. Default is Integer.MAX_VALUE. -
offsetX
public float offsetXThe distance from the mouse position to offset the tooltip actor. Default is 15,19. -
offsetY
public float offsetYThe distance from the mouse position to offset the tooltip actor. Default is 15,19. -
edgeDistance
public float edgeDistanceThe distance from the tooltip actor position to the edge of the screen where the actor will be shown on the other side of the mouse cursor. Default is 7.
-
-
Constructor Details
-
TooltipManager
public TooltipManager()
-
-
Method Details
-
touchDown
-
enter
-
hide
-
hideAll
public void hideAll() -
instant
public void instant()Shows all tooltips on hover without a delay forresetTime
seconds. -
getInstance
-