2

I'm creating an android app using scene2D in libgdx. The app will have to be compatible with many screen resolutions, which is where my problem is at. The font used in the selectbox uses a set amount of pixels, so on a 1080p phone screen it is too small to read, and on a low resolution phone is too big.

There seems to be no way to just simply scale the text.

Here is where setup the select box

public void create(Stage stageall, BitmapFont font, float width, float height){     

    screenWidth = width;
    screenHeight = height;

    stage = stageall;   


    tableskin = new Skin(Gdx.files.internal("Resources/uiskin.json"));  


    sb = new SelectBox(tableskin);
    sb.setItems("5 Km", "10 Km", "20 Km");  


    stage.addActor(sb); 

    sb.setSize(screenWidth/2, screenHeight/20);
}

Thanks in advance

James

1 Answers1

0

Select.getStyle().listStyle.font.getData().scale(2);

landroo
  • 21
  • 5