Class TooltipManager

java.lang.Object
com.prineside.tdi2.scene2d.ui.TooltipManager

public class TooltipManager extends Object
Keeps track of an application's tooltips.
Author:
Nathan Sweet
  • Field Details

    • 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 Details

    • TooltipManager

      public TooltipManager()
  • Method Details

    • touchDown

      public void touchDown(Tooltip tooltip)
    • enter

      public void enter(Tooltip tooltip)
    • hide

      public void hide(Tooltip tooltip)
    • hideAll

      public void hideAll()
    • instant

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

      public static TooltipManager getInstance()