nhocbotmn / andengine

Automatically exported from code.google.com/p/andengine
0 stars 0 forks source link

TickerText.getCharactersVisible() doesn't count spaces but TickerText.getCharactersMaximum() does #65

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1.Create a Ticker text object and use a string with spaces
2. Then try using getCharactersVisible()and getCharactersMaximum()
3.

What is the expected output? What do you see instead?
getCharactersVisible()and getCharactersMaximum()should be equal after a fixed 
period of time

What version of the product are you using? On what operating system?
commit ed18d7a685bdcc54855ecbb77488e79d321c1200 on windows 7

Please provide any additional information below.
Also, it would be nice if you could set the Max characters for TickerText

Original issue reported on code.google.com by rion...@gmail.com on 26 Feb 2012 at 12:05

GoogleCodeExporter commented 8 years ago
To do the last request you would only need to add a ticker text constructor 
like this:
    public TickerText(final float pX, final float pY, final IFont pFont, int pMaximumCharacters, final String pText, final TickerTextOptions pTickerTextOptions, final VertexBufferObjectManager pVertexBufferObjectManager) {
        super(pX, pY, pFont, pText, pMaximumCharacters, pTickerTextOptions, pVertexBufferObjectManager);

        this.mTickerTextOptions = pTickerTextOptions;

        this.mDuration = this.mCharactersMaximum * this.mTickerTextOptions.mCharactersPerSecond;
    }

Original comment by rion...@gmail.com on 26 Feb 2012 at 12:07

GoogleCodeExporter commented 8 years ago
Also I should have mentioned that I am using 
TickerText.setAutoWrap(AutoWrap.WORDS);
Not sure if that would effect the spaces not being seen. 

Original comment by rion...@gmail.com on 26 Feb 2012 at 12:09

GoogleCodeExporter commented 8 years ago
Can you put this issue to github? Thanks!

Original comment by NicolasG...@gmail.com on 2 Mar 2012 at 4:11