List of usage examples for com.badlogic.gdx.scenes.scene2d.ui Dialog setObject
public void setObject(Actor actor, Object object)
From source file:io.piotrjastrzebski.sfg.utils.FPSCheck.java
License:Open Source License
private void showLowFPSDialog() { Dialog fpsDialog = new Dialog("", assets.getSkin()) { @Override/*from www . j a va 2 s .co m*/ protected void result(Object object) { super.result(object); gameScreen.resumeGame(); } }; final Table content = fpsDialog.getContentTable(); content.add(new Label(assets.getText(Assets.DIALOG_LIGHTS_1), assets.getSkin())); content.row(); content.add(new Label(assets.getText(Assets.DIALOG_LIGHTS_2), assets.getSkin())).pad(20); final Table buttons = fpsDialog.getButtonTable(); final TextButton ok = new TextButton(assets.getText(Assets.OK), assets.getSkin(), "small"); buttons.add(ok).padBottom(20); fpsDialog.setObject(ok, null); fpsDialog.show(stage); gameScreen.pauseGame(); }