Libgdx 标签大小不增加

Libgdx 标签大小不增加,libgdx,label,scene2d,Libgdx,Label,Scene2d,我想把Scene2D的标签放大一点。我已经缩放并将宽度和高度设置为200或更高,并且保持相同大小 帮忙?谢谢。很抱歉我的英语不好,这是我的代码: super(view, batch); LabelStyle lbl = new LabelStyle(); lbl.font = new BitmapFont(); lbl.fontColor = Color.WHITE; score = new Label("Score: ", lbl); sco

我想把Scene2D的标签放大一点。我已经缩放并将宽度和高度设置为200或更高,并且保持相同大小


帮忙?谢谢。

很抱歉我的英语不好,这是我的代码:

    super(view, batch);

    LabelStyle lbl = new LabelStyle();
    lbl.font = new BitmapFont();
    lbl.fontColor = Color.WHITE;

    score = new Label("Score: ", lbl);
    score.setPosition(getCamera().viewportWidth / 2, getCamera().viewportHeight - 150);
    score.setSize(100, 100);
    score.setSize(200, 200);
    score.setScale(1.5f);
    score.act(Gdx.graphics.getDeltaTime()); // update now 

所以你想要更大的字体


您可以通过调用
lbl.font.setScale(yourFontSize)来实现这一点

您确实需要向我们展示您尝试过的代码是什么,目前来看,这个问题在IMHO中无法回答。代码添加到asnwer中。您应该更新您的问题,而不是添加代码作为答案。但希望我能帮你找到我贴出的答案……欢迎光临。你能接受我的回答吗,这样你的问题就结束了?