Class LinkEffect

java.lang.Object
com.github.tommyettinger.textra.Effect
com.github.tommyettinger.textra.effects.LinkEffect

public class LinkEffect extends Effect
Allows clicking the affected text to open a URL in the browser. You may want to use other markup with this, such as underlining or especially a color change; using StylistEffect may be useful to indicate that the user is currently hovering over a link. Doesn't change over time. This doesn't validate the URL or sanity-check it in any way, so try not to allow users to write arbitrary URLS and send them to other users.
Parameters: url
The url can be any URL text not containing curly braces or brackets, and can actually have semicolons in it and still be treated as one parameter. This URL is what clicking the affected text will try to open in a browser. Defaults to "https://libgdx.com".
Example usage: {LINK=https://github.com/tommyettinger/textratypist}Text effects!{ENDLINK}
  • Constructor Details

  • Method Details

    • onApply

      protected void onApply(long glyph, int localIndex, int globalIndex, float delta)
      Description copied from class: Effect
      Called when this effect should be applied to the given glyph.
      Specified by:
      onApply in class Effect