Annotation Interface OverlayText


@Retention(RUNTIME) @Target({FIELD,METHOD}) @Documented public @interface OverlayText
Renders a field or no-argument method as text lines in an annotated overlay panel.

Supported binding values are any object, Optional<T>, Iterable<T>, Iterator<T>, or arrays, including primitive arrays. Iterable, iterator, and array values are expanded into one line per element. Each final element is passed through formatter().

When rate() is enabled, numeric values are tracked from the first rendered sample and rendered with a per-hour delta rate. Non-numeric values are rendered normally.

  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    Formatter used to render each final text value.
    Optional label prepended to each rendered line.
    boolean
    Whether numeric values should include their change rate per hour.
    Text appended after rate values.
    Text appended after numeric values, for example " gp" or " kills".
  • Element Details

    • label

      String label
      Optional label prepended to each rendered line.
      Default:
      ""
    • formatter

      Class<? extends OverlayFormatter> formatter
      Formatter used to render each final text value.

      The formatter class must expose an accessible no-argument constructor.

      Default:
      dev.twilite.client.ui.overlay.OverlayFormatter.Standard.class
    • rate

      boolean rate
      Whether numeric values should include their change rate per hour.
      Default:
      false
    • suffix

      String suffix
      Text appended after numeric values, for example " gp" or " kills".
      Default:
      ""
    • rateSuffix

      String rateSuffix
      Text appended after rate values.
      Default:
      "/h"