Package arc.scene.ui

Class Tooltip.Tooltips

java.lang.Object
arc.scene.ui.Tooltip.Tooltips
Enclosing class:
Tooltip

public static class Tooltip.Tooltips extends Object
Keeps track of an application's tooltips.
  • Field Details

    • textProvider

      public Func<String,Tooltip> textProvider
      Default text tooltip provider.
    • initialTime

      public float initialTime
      Seconds from when an element 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. 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 element. Default is 15,19.
    • offsetY

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

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

    • Tooltips

      public Tooltips()
  • Method Details

    • getInstance

      public static Tooltip.Tooltips getInstance()
    • create

      public Tooltip create(String text)
    • 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 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 for resetTime seconds.