Hi,
I am trying to resize a window but keep the logo image inside the window the same size, and get the background to scale both down and up as opposed to just up
here is an extract from my code:
public void render(float delta) {
Gdx.gl.glClearColor(0, 0, 0, 1);
Gdx.gl.glClear(GL20.GL_COLOR_BUFFER_BIT);
bg = new Sprite(new Texture("img/menubg2.gif"));
bg.setBounds(0, 0, Gdx.graphics.getWidth(), Gdx.graphics.getHeight());
batch.begin();
bg.draw(batch);
batch.end();
stage.act(delta);
stage.draw();
batch.begin();
heading.draw(batch);
batch.end();
tweenManager.update(delta);
}
public void show() {
stage = new Stage();
Gdx.input.setInputProcessor(stage);
table = new Table(skin);
table.setFillParent(true);
batch = new SpriteBatch();
//Draw Logo
heading = new Sprite(new Texture("img/logo.png"));
heading.setBounds(Gdx.graphics.getWidth() / 2 - 200, Gdx.graphics.getHeight() - 175, 400, 150);
}
Thanks,
- Dan