mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-16 18:58:00 +00:00
Back to quest list button fix (#8094)
This commit is contained in:
@@ -27,7 +27,6 @@ public class QuestLogScene extends UIScene {
|
||||
private QuestLogScene() {
|
||||
super(Forge.isLandscapeMode() ? "ui/quests.json" : "ui/quests_portrait.json");
|
||||
|
||||
|
||||
scrollWindow = ui.findActor("scrollWindow");
|
||||
root = ui.findActor("questList");
|
||||
detailRoot = ui.findActor("questDetails");
|
||||
@@ -36,11 +35,13 @@ public class QuestLogScene extends UIScene {
|
||||
backToListButton = Controls.newTextButton("Quest List");
|
||||
ui.onButtonPress("return", QuestLogScene.this::back);
|
||||
ui.onButtonPress("status", QuestLogScene.this::status);
|
||||
ui.onButtonPress("backToList", QuestLogScene.this::backToList);
|
||||
|
||||
|
||||
//Todo - refactor below, replace buttons in landscape
|
||||
backToListButton.addListener(new ClickListener() {
|
||||
public void clicked(InputEvent event, float x, float y) {
|
||||
buildList();
|
||||
}
|
||||
});
|
||||
|
||||
// TODO - refactor below, replace buttons in landscape
|
||||
scrollContainer = new Table(Controls.getSkin());
|
||||
scrollContainer.row();
|
||||
|
||||
@@ -76,9 +77,6 @@ public class QuestLogScene extends UIScene {
|
||||
root.row();
|
||||
ScrollPane scroller = new ScrollPane(scrollContainer);
|
||||
root.add(scroller).colspan(3).fill().expand();
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
private static QuestLogScene object;
|
||||
@@ -92,16 +90,12 @@ public class QuestLogScene extends UIScene {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void dispose() {
|
||||
|
||||
}
|
||||
public void dispose() { }
|
||||
|
||||
@Override
|
||||
public void enter() {
|
||||
super.enter();
|
||||
buildList();
|
||||
|
||||
|
||||
}
|
||||
|
||||
public void buildList(){
|
||||
@@ -155,7 +149,6 @@ public class QuestLogScene extends UIScene {
|
||||
abandonQuestButton.setColor(Color.RED);
|
||||
abandonQuestButton.addListener(new ClickListener() {
|
||||
public void clicked(InputEvent event, float x, float y) {
|
||||
|
||||
Dialog confirm = createGenericDialog("", Forge.getLocalizer().getMessage("lblAbandonQuestConfirm"),Forge.getLocalizer().getMessage("lblYes"),Forge.getLocalizer().getMessage("lblNo"), () -> abandonQuest(quest), null);
|
||||
showDialog(confirm);
|
||||
}
|
||||
@@ -234,5 +227,4 @@ public class QuestLogScene extends UIScene {
|
||||
AdventureQuestController.instance().showQuestDialogs(MapStage.getInstance());
|
||||
buildList();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user