Class TooltipManager


  • public class TooltipManager
    extends java.lang.Object
    Keeps track of an application's tooltips.
    • Field Detail

      • initialTime

        public float initialTime
        Seconds from when an actor is hovered to when the tooltip is shown. Default is 2. Call hideAll() after changing to reset internal state.
      • subsequentTime

        public float subsequentTime
        Once a tooltip is shown, this is used instead of initialTime. Default is 0.
      • resetTime

        public float resetTime
        Seconds to use subsequentTime. Default is 1.5.
      • enabled

        public boolean enabled
        If false, tooltips will not be shown. Default is true.
      • animations

        public boolean animations
        If false, tooltips will be shown without animations. Default is true.
      • maxWidth

        public float maxWidth
        The maximum width of a TextTooltip. The label will wrap if needed. Default is Integer.MAX_VALUE.
      • offsetX

        public float offsetX
        The distance from the mouse position to offset the tooltip actor. Default is 15,19.
      • offsetY

        public float offsetY
        The distance from the mouse position to offset the tooltip actor. Default is 15,19.
      • edgeDistance

        public float edgeDistance
        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. Default is 7.
    • Constructor Detail

      • TooltipManager

        public TooltipManager()
    • Method Detail

      • touchDown

        public void touchDown​(Tooltip tooltip)
      • enter

        public void enter​(Tooltip tooltip)
      • hide

        public void hide​(Tooltip tooltip)
      • showAction

        protected void showAction​(Tooltip tooltip)
        Called when tooltip is shown. Default implementation sets actions to animate showing.
      • hideAction

        protected void hideAction​(Tooltip tooltip)
        Called when tooltip is hidden. Default implementation sets actions to animate hiding and to remove the actor from the stage when the actions are complete. A subclass must at least remove the actor.
      • hideAll

        public void hideAll()
      • instant

        public void instant()
        Shows all tooltips on hover without a delay for resetTime seconds.