Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.
Sign upAdded color markup support for label and window title. #2387
Conversation
This comment has been minimized.
This comment has been minimized.
davebaol
commented on gdx/src/com/badlogic/gdx/graphics/g2d/BitmapFontCache.java in 0c0e308
Sep 26, 2014
|
Not sure if it's worth pooling ColorChunk |
|
What happened with Label and Window? |
This comment has been minimized.
This comment has been minimized.
davebaol
commented on gdx/src/com/badlogic/gdx/scenes/scene2d/ui/Label.java in 0c0e308
Sep 27, 2014
|
This is the unique real change in Label. |
This comment has been minimized.
This comment has been minimized.
davebaol
commented on gdx/src/com/badlogic/gdx/scenes/scene2d/ui/Window.java in 0c0e308
Sep 27, 2014
|
This is the unique real change in Window. |
| if (colorChunks.size > 0) { | ||
| colorChunks.peek().endIndex = (glyphIndices != null? glyphCount : this.idx[0] / 20); | ||
| } | ||
| colorChunks.add(new ColorChunk(color)); |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
davebaol
Sep 27, 2014
Author
Member
Yeah, I was wondering if it's worth. Probably it is.
I'll add pooling If you guys think it's a good idea. Just let me know.
| colorChunks.add(new ColorChunk(color)); | ||
| } | ||
|
|
||
| private boolean textChanged; |
This comment has been minimized.
This comment has been minimized.
NathanSweet
Sep 27, 2014
Member
I prefer fields at the top, helps give an overview of what the class needs/is doing.
This comment has been minimized.
This comment has been minimized.
|
So should colorChuncks be pooled? |
|
Without looking in depth, I'd say that ColorChunk should be pooled. |
Added color markup support for label and window title.
|
Thanks! BitmapFontCache has gotten quite complex with multiple pages and colors, but it's also pretty powerful. |
davebaol commentedSep 26, 2014
This should fix issue #1934