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