Giter VIP home page Giter VIP logo

typing-label's Introduction

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.2.0'
regExodusVersion = '0.1.12' // 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.

typing-label's People

Contributors

rafaskb avatar tommyettinger avatar bamboobandit avatar agmcorp avatar crykn avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.