@Override /** Wird beim Wechsel zu diesem Screen aufgerufen. */ public void show() { super.show(); Gdx.input.setCatchBackKey(true); Gdx.input.setInputProcessor(pauseUiController); }
@Override protected void initComponents() { super.initComponents(); pauseUiController = new PauseUiController(); ClickListener buttonListener = new PauseButtonListener(); lbTitle = new Label("Arsphema", UiStyles.getSpaceLabelStyle(0)); lbPause = new Label("Paused...", UiStyles.getTitleLabelStyle(0)); btnBack = new Button(new TextureRegion(UiStyles.UI_ICON_TEXTURE_REGION, 600, 0, 300, 300)); btnBack.setClickListener(buttonListener); btnHome = new Button(new TextureRegion(UiStyles.UI_ICON_TEXTURE_REGION, 600, 600, 300, 300)); btnHome.setClickListener(buttonListener); }
@Override protected void setupGui() { super.setupGui(); // Get the correct font sizes lbTitle.setStyle(UiStyles.getSpaceLabelStyle(ppuY)); lbPause.setStyle(UiStyles.getTitleLabelStyle(ppuY)); wrapTable.add(lbTitle).padBottom((int) (10 * ppuY)).padTop((int) (10 * ppuY)); wrapTable.row(); wrapTable.add(lbPause).padBottom((int) (5 * ppuY)).padTop((int) (5 * ppuY)); // Setup Button Row addToButtonRow(btnBack); addToButtonRow(btnHome); wrapTable.row(); wrapTable.add(buttonTable).bottom().expandY(); }
@Override /** Wird bei jeder Anpassung der Screengrösse aufgerufen. */ public void resize(int width, int height) { super.resize(width, height); setupGui(); }