Anyway to split my screen? i have a 272x408 screen. in it the playfield is 136X204. I want to add a hud, where the controls and stats are, to the bottom of the screen. SO that the HUD part is fully stage and the playfield is screen. but i cant hit the sweetspot with the resolution. the Hud should be 75 high. so the screenspace for the playfield is 272X333 But when i take the aspect ratio and try to but it on the playfield measurements, it just doesent fit anymore. objects stretch and borders go wrong.
public GameScreen(){
float screenWidth = Gdx.graphics.getWidth();
float screenHeight = Gdx.graphics.getHeight();
float gameWidth = GameConstants.GAMEWIDTH;
float gameHeight = (screenHeight / (screenWidth / gameWidth));
int midPointX = (int) (gameWidth/2);
touchpadSkin = new Skin();
touchpadSkin.add("Backround", new Texture("data/backround.png"));
touchpadSkin.add("knob", new Texture("data/knob.png"));
touchpadStyle = new TouchpadStyle();
touchBackround = touchpadSkin.getDrawable("Backround");
touchKnob = touchpadSkin.getDrawable("knob");
touchpadStyle.background = touchBackround;
touchpadStyle.knob = touchKnob;
touchpad = new Touchpad(5, touchpadStyle);
touchpad.setBounds(0, 0, 75, 75);
stage = new Stage(Gdx.graphics.getWidth(),Gdx.graphics.getHeight());
stage.addActor(touchpad);
world = new GameWorld(midPointX, touchpad);
renderer = new GameRenderer(world,(int)gameHeight);
//Gdx.input.setInputProcessor(new InputHandler(world.getPlayer()));
Gdx.input.setInputProcessor(stage);
}