Package arc.scene.ui
Class Tooltip.Tooltips
java.lang.Object
arc.scene.ui.Tooltip.Tooltips
- Enclosing class:
- Tooltip
Keeps track of an application's tooltips.
-
Field Summary
Modifier and TypeFieldDescriptionboolean
If false, tooltips will be shown without animations.float
The distance from the tooltip element position to the edge of the screen where the element will be shown on the other side of the mouse cursor.boolean
If false, tooltips will not be shown.float
Seconds from when an element is hovered to when the tooltip is shown.float
The maximum width.float
The distance from the mouse position to offset the tooltip element.float
The distance from the mouse position to offset the tooltip element.float
Seconds to usesubsequentTime
.float
Once a tooltip is shown, this is used instead ofinitialTime
.Default text tooltip provider. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
static Tooltip.Tooltips
void
protected void
hideAction
(Tooltip tooltip) Called when tooltip is hidden.void
hideAll()
void
instant()
Shows all tooltips on hover without a delay forresetTime
seconds.protected void
showAction
(Tooltip tooltip) Called when tooltip is shown.void
-
Field Details
-
textProvider
Default text tooltip provider. -
initialTime
public float initialTimeSeconds from when an element 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. The label will wrap if needed. Default is Integer.MAX_VALUE. -
offsetX
public float offsetXThe distance from the mouse position to offset the tooltip element. Default is 15,19. -
offsetY
public float offsetYThe distance from the mouse position to offset the tooltip element. Default is 15,19. -
edgeDistance
public float edgeDistanceThe distance from the tooltip element position to the edge of the screen where the element will be shown on the other side of the mouse cursor. Default is 7.
-
-
Constructor Details
-
Tooltips
public Tooltips()
-
-
Method Details
-
getInstance
-
create
-
touchDown
-
enter
-
hide
-
showAction
Called when tooltip is shown. Default implementation sets actions to animate showing. -
hideAction
Called when tooltip is hidden. Default implementation sets actions to animate hiding and to remove the element from the stage when the actions are complete. A subclass must at least remove the element. -
hideAll
public void hideAll() -
instant
public void instant()Shows all tooltips on hover without a delay forresetTime
seconds.
-