Giter Site home page Giter Site logo

Unreadable text about typing-label HOT 6 CLOSED

rafaskb avatar rafaskb commented on May 8, 2024
Unreadable text

from typing-label.

Comments (6)

fgnm avatar fgnm commented on May 8, 2024 1

I've found a small workaround for this. Basically, at the end of act method in TypingLabel class, I check if that method is called for the first time, if yes force a restart() of the label, this seems to fix the issue but I hope that the developer could fix it in a better way..

My TypingLabel class:

public class TypingLabel extends Label {
...
    private boolean firstTime = true;
...

	@Override
	public void act (float delta) {
                ......
                if(firstTime) {
                    restart();
                    firstTime = false;
                }
        }
....
}

from typing-label.

agmCorp avatar agmCorp commented on May 8, 2024

I have exactly the same problem.

from typing-label.

agmCorp avatar agmCorp commented on May 8, 2024

Could you please test this? It seems to fix this problem too, but I'm not 100% sure.

protected void saveOriginalText () {
	originalText.setLength(0);
	originalText.insert(0, this.getText());
	originalText.trimToSize();
	restart(); // <------ add this
}

from typing-label.

fgnm avatar fgnm commented on May 8, 2024

Tried but it produce a StackOverflowError, maybe we run different version of the library but in my restart() method I've an invalidate() call, so it cause an infinite loop.
I'm using the latest available here on github

from typing-label.

Mewel avatar Mewel commented on May 8, 2024

In my case, this happens randomly on mobile phones with poor performance when text is displayed for the first time. But I haven't tried the fixes yet cause it's hard to reproduce.

from typing-label.

rafaskb avatar rafaskb commented on May 8, 2024

Reference: https://m.youtube.com/watch?v=mEtuzvwIU20&t=7920

from typing-label.

Related Issues (20)

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.