Comments (6)
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.
I have exactly the same problem.
from typing-label.
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.
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.
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.
Reference: https://m.youtube.com/watch?v=mEtuzvwIU20&t=7920
from typing-label.
Related Issues (20)
- 1.0.5 dependencies not working HOT 4
- [question] clickable/touchable label HOT 1
- Create FADE effect.
- Add new effects to the wiki.
- Update wiki examples with new API (TypingGlyph)
- Create wiki page explaining how to create complex effects
- Create ENDCOLOR, an alias of CLEARCOLOR.
- setText method not working as intended HOT 2
- Aligning label issue HOT 4
- Restart label in Listener HOT 1
- Allow users to change {} token characters HOT 1
- Inconsistent events ordering HOT 2
- GWT Task :html:draftCompileGwt FAILED: color cannot be resolved or is not a field HOT 3
- Setting the color.a of a TypingLabel actor makes the FADE token not work properly. HOT 11
- Parent alpha not working HOT 4
- next line bug HOT 2
- Add EASE token to the wiki.
- Add "setDefaultToken" to the wiki
- Add gifs of all tokens to the wiki.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from typing-label.