ktx icon indicating copy to clipboard operation
ktx copied to clipboard

Add TypingLabel extension module

Open czyzby opened this issue 5 years ago • 6 comments

  • [ ] Create a new KTX module that extends ktx-scene2d.
  • [ ] Include and document another major dependency: com.rafaskoberg.gdx:typing-label.
  • [ ] Add and test factory method for TypingLabel.
  • [ ] Add utility extension methods that register event listeners.
    • [ ] Add support for multiple TypingListener instances.
  • [ ] Consider adding custom DSL for TypingLabel tokens.

TypingLabel is an interesting third-party extension that defines additional Scene2D actor: a label that appears to be typed in real time. It supports a wide range of special effects. It would be a nice addition to our Scene2D extensions.

Label example

czyzby avatar Apr 26 '20 11:04 czyzby

Is this one still on the menu? If so, I might consider looking into it, though I think I'd prefer to look in the direction of Textratypist (which I use myself) rather than TypingLabel.

michaeloa avatar Nov 01 '25 22:11 michaeloa

@michaeloa I have no plans to work on it myself, but I'm happy to do code review and a release if you're like to tackle this one. Covering either library would be OK. Thanks!

czyzby avatar Nov 02 '25 07:11 czyzby

Cool. I've already done a bit of this work for my own use, since I use both, and wanted a simple way to use textratypist with ktx. I'll see if I can break out that code into it's own module and add some testing.

michaeloa avatar Nov 02 '25 11:11 michaeloa

Would appreciate some feedback on the draft PR before I finalize it.

Also, out of curiosity - any timeline on 1.14?

michaeloa avatar Nov 08 '25 11:11 michaeloa

Thanks, I'll review it shortly.

Also, out of curiosity - any timeline on 1.14?

I'm a bit behind on the updates, but I'll try to get them out before the PR is merged.

czyzby avatar Nov 10 '25 08:11 czyzby

I make games with lots of text, so a frequent use case of mine with textraLabel (and labels before that), is to do:

textraLabel("Some incredibly long text, etc") {
    alignment = Align.left,
    wrap = true
}

This gets annoying after a while, so I just end up creating a DSL function for this (currently textraWrap), since the above becomes quite unreadable after you're doing four or five of them in a single view. Would you be OK with me adding that type of factory function to the Textratypist extension? Or would you prefer to keep these types of convenience DSL outside of the extension modules?

michaeloa avatar Dec 06 '25 15:12 michaeloa