2
\$\begingroup\$

I am using BitmapFonts, LabelStyles and Labels for my texts.

I want to resize some labels, so i use this.

fontType.scale(-.6f);

LabelStyle style = new LabelStyle(fontType, Color.WHITE);

titleLabel = new Label("Points", style);
titleLabel.setColor(Color.RED);
titleLabel.x = 260; 
titleLabel.y = 310;

but when i want to resize another label, all the labels containing that font resize (I create a new LabelStyle). So i resize the label instead of the font, but that doesnt solve the problem, because it doesnt resize the label, any idea?

\$\endgroup\$

1 Answer 1

2
\$\begingroup\$

I would preffer adding this as a comment, but i have no commetn priviledge yet.

Have you tried creating a new bitmapfont instead of a new label?

\$\endgroup\$
3
  • \$\begingroup\$ Yes, but is it correct doing that if its the same font? :/ \$\endgroup\$
    – Rudy_TM
    Mar 12, 2012 at 21:03
  • \$\begingroup\$ I assume it's not that big of a deal. Can't check libgdx code at work. But isn't a spritebatch passed as parameter for the draw method? That at least lets you know it wont impact too much on performance i guess \$\endgroup\$ Mar 13, 2012 at 15:36
  • \$\begingroup\$ I have tried that and the load time increases a lot XD (4 seconds with 4 bitmapfonts built in the constructor) u.u \$\endgroup\$
    – Rudy_TM
    Mar 13, 2012 at 15:42

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .