|
|
|
@ -16,7 +16,7 @@ import eu.jonahbauer.wizard.common.model.Card;
|
|
|
|
|
public class InstructionScreen extends MenuScreen {
|
|
|
|
|
private static final int MAX_PAGE = 3;
|
|
|
|
|
|
|
|
|
|
private TextButton buttonOK;
|
|
|
|
|
private TextButton buttonBack;
|
|
|
|
|
private VerticalGroup content;
|
|
|
|
|
private ScrollPane scrollPane;
|
|
|
|
|
private TextButton nextPageButton;
|
|
|
|
@ -29,7 +29,7 @@ public class InstructionScreen extends MenuScreen {
|
|
|
|
|
private final ChangeListener listener = new ChangeListener() {
|
|
|
|
|
@Override
|
|
|
|
|
public void changed(ChangeEvent event, Actor actor) {
|
|
|
|
|
if (actor == buttonOK) {
|
|
|
|
|
if (actor == buttonBack) {
|
|
|
|
|
game.getClient().execute(Menu.class, Menu::showMenuScreen);
|
|
|
|
|
sfxClick();
|
|
|
|
|
} else if (actor == nextPageButton) {
|
|
|
|
@ -70,9 +70,9 @@ public class InstructionScreen extends MenuScreen {
|
|
|
|
|
previousPageButton.addListener(listener);
|
|
|
|
|
getButtonGroup().addActor(previousPageButton);
|
|
|
|
|
|
|
|
|
|
buttonOK = new TextButton(messages.get("menu.instruction.back"), skin);
|
|
|
|
|
buttonOK.addListener(listener);
|
|
|
|
|
getButtonGroup().addActor(buttonOK);
|
|
|
|
|
buttonBack = new TextButton(messages.get("menu.instruction.back"), skin);
|
|
|
|
|
buttonBack.addListener(listener);
|
|
|
|
|
getButtonGroup().addActor(buttonBack);
|
|
|
|
|
|
|
|
|
|
nextPageButton = new TextButton(messages.get("menu.instruction.nextPageButton"), skin);
|
|
|
|
|
nextPageButton.addListener(listener);
|
|
|
|
@ -83,7 +83,7 @@ public class InstructionScreen extends MenuScreen {
|
|
|
|
|
scrollPane.setSize(0.65f * WizardGame.WIDTH, 400 + 0.1f * WizardGame.HEIGHT + 80);
|
|
|
|
|
stage.addActor(scrollPane);
|
|
|
|
|
|
|
|
|
|
stage.addCaptureListener(new KeyboardFocusManager(scrollPane, previousPageButton, buttonOK, nextPageButton));
|
|
|
|
|
stage.addCaptureListener(new KeyboardFocusManager(scrollPane, previousPageButton, buttonBack, nextPageButton));
|
|
|
|
|
|
|
|
|
|
showFirstPage();
|
|
|
|
|
}
|
|
|
|
@ -166,9 +166,8 @@ public class InstructionScreen extends MenuScreen {
|
|
|
|
|
reset();
|
|
|
|
|
|
|
|
|
|
startSection("menu.instruction.variant.title");
|
|
|
|
|
addParagraph("menu.instruction.variant.intro");
|
|
|
|
|
|
|
|
|
|
Label variantsIntro = new Label(messages.get("menu.instruction.variant.intro"), skin);
|
|
|
|
|
content.addActor(variantsIntro);
|
|
|
|
|
Table table = new Table(skin).padTop(10);
|
|
|
|
|
table.defaults().space(10.0f).left().top();
|
|
|
|
|
table.columnDefaults(1).grow();
|
|
|
|
|