I have the button:
soundBtnStyle = new ImageButton.ImageButtonStyle();
soundBtnStyle.up = skinBac.getDrawable("on");//
soundBtnStyle.down = skinBac.getDrawable("off"); //
soundsButton = new ImageButton(soundBtnStyle);
soundsButton.setSize(120, 120);
soundsButton.addListener(new ClickListener() {
@Override
public void clicked(InputEvent event, float x, float y) {
game.rainMusic.setVolume(0.0f);
}
});
call the button in the constructor,I can not figure out how to add a button to the stage.
game.batch.begin();
game.batch.draw(soundsButton, 0, 0,120, 120);
game.batch.end();
enter code here