Skip to content

rafaskb/typing-label

Repository files navigation

Typing Label Logo

TypingLabel

Maven Central license

A libGDX Label that appears as if it was being typed in real time.

It works as a drop-in replacement for normal Scene2D Labels, and you can use optional tokens to customize the text's behavior.

Sample GIF

Installation

Open build.gradle in project root and add this to the ext section under allprojects:

typingLabelVersion = '1.3.0'
regExodusVersion = '0.1.13' // Only if you're using HTML / GWT

Core module

Add this to your build.gradle core dependencies:

api "com.rafaskoberg.gdx:typing-label:$typingLabelVersion"

Note: Replace api with compile if you're using a Gradle version older than 3.4.

HTML dependencies

(Only if you're using HTML / GWT)

Add this to your GdxDefinition.gwt.xml file:

<inherits name="com.rafaskoberg.gdx.typinglabel.typinglabel" />

Add this to your build.gradle html dependencies:

api "com.github.tommyettinger:regexodus:$regExodusVersion:sources"
api "com.rafaskoberg.gdx:typing-label:$typingLabelVersion:sources"

Note: Replace api with compile if you're using a Gradle version older than 3.4.

Getting Started

Check the Wiki:

textratypist and SDF / MSDF Support

Multi-channel Signed Distance Field fonts allow you to prepare and load just one font file and render it in any scale you want, while mantaining the quality and cripsness of the original texture, as if you were working directly with vectors.

Since TypingLabel aims to be a replacement for regular scene2d.ui Labels though, that means it relies on BitmapFonts, which have a specific size and don't work well with scaling.

If you're using SDF fonts in your project and want TypingLabel features, then make sure to take a look at Textramode and Textratypist libraries by Tommy Ettinger. They support SDF and MSDF fonts, have much of the TypingLabel features, as well extended markup such as bold and oblique, and much more.

About

A libGDX Label that appears as if it was being typed in real time.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages