tommyettinger / textratypist
Augmented text display system for libGDX, based on typing-label
View on GitHubAI Architecture Analysis
This repository is indexed by RepoMind. By analyzing tommyettinger/textratypist in our AI interface, you can instantly generate complete architecture diagrams, visualize control flows, and perform automated security audits across the entire codebase.
Our Agentic Context Augmented Generation (Agentic CAG) engine loads full source files into context on-demand, avoiding the fragmentation of traditional RAG systems. Ask questions about the architecture, dependencies, or specific features to see it in action.
Repository Overview (README excerpt)
Crawler viewTextraTypist A text-display library centered around a label that prints over time, with both effects and styles. In other words, this brings more features to text rendering in libGDX. What does this look like? A little something like this... Or perhaps like this... If you'd rather watch a video than read this text, Raymond "raeleus" Buckley made a video covering most of TextraTypist! It covers some things this file doesn't, such as usage of Skin Composer, so it's a good watch regardless. There are JavaDocs here for TextraTypist's latest version. You can find docs for earlier versions on javadoc.io (the link is for the slightly older version 2.0.3, for instance). Other docs hosted in this repo include some huge lists of known fonts and information about the colors you can mix and alter when writing a color by name (sorted by name, hue, and lightness). It's got labels! There's a "normal" label here in the form of TextraLabel, which acts almost exactly like Label in scene2d.ui, but allows the styles covered below. A lot of usage may prefer TypingLabel, though! TypingLabel is a fairly normal scene2d.ui widget, and extends TextraLabel. However, it puts letters up on the screen one at a time, unless it is told to skip ahead. This is a nostalgic effect found in many older text-heavy games, and it looks like a typewriter is putting up each letter at some slower-than-instantaneous rate. How do I get it? You probably want to get TextraTypist with Gradle! The dependency for a libGDX project's core module looks like: This assumes you already depend on libGDX; TextraTypist depends on either version 1.13.1 or 1.14.0 (never 1.13.5), depending on whether you are using the 2.1.x release series (compatible with libGDX 1.13.1) or the 2.2.x release series (which uses libGDX 1.14.0). If you have to use libGDX 1.12.1, you can use TextraTypist 1.x releases, which aren't receiving updates anymore. If you use GWT, this should be compatible. It needs these dependencies in the html module: GWT also needs this in the GdxDefinition.gwt.xml file: RegExodus is the GWT-compatible regular-expression library this uses to match some complex patterns internally. Other than libGDX itself, RegExodus is the only dependency this project has. If you need compatibility with libGDX 1.13.1, change to ; it should have feature parity with . TextraTypist 2.1.11 should use RegExodus 0.1.21, the same version used by TextraTypist 2.2.11 and up. It may need this explicitly given as a dependency: There is at least one release in the Releases section of this repo, but you're still encouraged to use Gradle to handle this library and its dependencies. You can also use JitPack to get a current commit, which can be handy if there's a long span between releases. Current gdx-liftoff and gdx-setup projects all can use JitPack dependencies without needing any extra configuration. You would use this dependency in your core module: You can change to any commit in the Commits tab of https://jitpack.io/#tommyettinger/textratypist , but you should not use -- it can change without your requesting it to, which is not what you want! You can also depend on FreeTypist using: (Now, FreeTypist 2.2.14.0 uses TextraTypist 2.2.14, and that means it uses libGDX 1.14.0 . There's also FreeTypist 2.1.11.0 that uses TextraTypist 2.1.11, and that means it uses libGDX 1.13.1 .) And if you target HTML and have FreeType working somehow, you would use this Gradle dependency: And this inherits line: FreeType doesn't work out-of-the-box on GWT, though there is this for libGDX 1.13.1 and older, or this fork for 1.14.0 and newer. It's got effects! Yes, it has more than the typewriter mode! Text can hang above and then drop into place. It can jump up and down in a long wave. It can waver and shudder, as if it is sick. It can blink in different colors, move in a gradient smoothly between two colors, or go across a whole rainbow. Lots of options; lots of fun. Effects are almost the same as in typing-label, but there have been some changes and many additions. You can check the TextraTypist wiki for more information. As of 0.10.0, there are many new effects. Jolt, Spiral, Spin, Crowd, Shrink, Emerge, Heartbeat, Carousel, Squash, Scale, Rotate, Attention, Highlight, Link, Trigger, Stylist, Cannon, Ocean, Sputter, Instant, Meet, Zipper, and Slam are all new to TextraTypist (not in typing-label). You can see usage instructions and sample GIFs at the TextraTypist wiki's Tokens page. Most of these effects make use of the smooth scaling and rotation options that effects can use starting in TextraTypist 0.5.1 . Some make use of mouse tracking, new in 0.7.0, such as how Link only responds to a click on a range of text. You may want to create s even where you don't need the typing effect, because doesn't handle any effects. You can call on a TypingLabel or (in 0.7.0 and up) on some other classes to allow a TypingLabel to be used for still text with effects. Various standard tokens are also present, and these can manipulate the typing effect, variable replacement, and other useful things: • causes the typing effect to pause and wait for seconds, as a float. • changes the time it takes to type a typical glyph, from a default of to . • makes all glyphs take 2x as long to type. • makes all glyphs take 1.5x as long to type. • makes all glyphs take the normal 1x as long to type. • makes all glyphs take 0.5x as long to type. • makes all glyphs take 0.25x as long to type. • makes glyphs take randomly more or less time to type, but otherwise is the same as . • changes the color of text; this has lots of options, so you can have e.g. "dark grey pink". • changes the style of text (see below); this has a LOT of options. • changes the size of text (coarsely, in 25% increments); this takes f as a percentage from 0 to 375. • changes the font, if there is a FontFamily available, by looking up . • sets the text color to the default color, which is usually white. • sets the siz…