mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-18 19:58:00 +00:00
Add plane name and End Day button to bottom of map screen
This commit is contained in:
@@ -46,6 +46,8 @@ public class ConquestMapScreen extends FScreen {
|
|||||||
|
|
||||||
private final RegionDisplay regionDisplay = add(new RegionDisplay());
|
private final RegionDisplay regionDisplay = add(new RegionDisplay());
|
||||||
private final CommanderRow commanderRow = add(new CommanderRow());
|
private final CommanderRow commanderRow = add(new CommanderRow());
|
||||||
|
private final FLabel lblCurrentPlane = add(new FLabel.Builder().font(FSkinFont.get(16)).align(HAlignment.CENTER).build());
|
||||||
|
private final FLabel btnEndDay = add(new FLabel.ButtonBuilder().font(FSkinFont.get(14)).build());
|
||||||
|
|
||||||
private ConquestData model;
|
private ConquestData model;
|
||||||
|
|
||||||
@@ -60,7 +62,9 @@ public class ConquestMapScreen extends FScreen {
|
|||||||
|
|
||||||
public void update() {
|
public void update() {
|
||||||
model = FModel.getConquest().getModel();
|
model = FModel.getConquest().getModel();
|
||||||
setHeaderCaption(model.getName());
|
setHeaderCaption(model.getName() + " - Map");
|
||||||
|
lblCurrentPlane.setText(model.getCurrentPlane().getName());
|
||||||
|
btnEndDay.setText("End Day " + model.getDay());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -69,6 +73,12 @@ public class ConquestMapScreen extends FScreen {
|
|||||||
regionDisplay.setBounds(0, y, width, width / CardRenderer.CARD_ART_RATIO + REGION_SLIDER_HEIGHT);
|
regionDisplay.setBounds(0, y, width, width / CardRenderer.CARD_ART_RATIO + REGION_SLIDER_HEIGHT);
|
||||||
y += regionDisplay.getHeight() + PADDING;
|
y += regionDisplay.getHeight() + PADDING;
|
||||||
commanderRow.setBounds(0, y, width, COMMANDER_ROW_HEIGHT);
|
commanderRow.setBounds(0, y, width, COMMANDER_ROW_HEIGHT);
|
||||||
|
|
||||||
|
btnEndDay.setSize(width / 2, btnEndDay.getAutoSizeBounds().height);
|
||||||
|
btnEndDay.setPosition((width - btnEndDay.getWidth()) / 2, height - btnEndDay.getHeight());
|
||||||
|
|
||||||
|
lblCurrentPlane.setSize(btnEndDay.getWidth(), lblCurrentPlane.getAutoSizeBounds().height);
|
||||||
|
lblCurrentPlane.setPosition(btnEndDay.getLeft(), btnEndDay.getTop() - lblCurrentPlane.getHeight());
|
||||||
}
|
}
|
||||||
|
|
||||||
private class RegionDisplay extends FContainer {
|
private class RegionDisplay extends FContainer {
|
||||||
|
|||||||
@@ -40,6 +40,7 @@ public final class ConquestData {
|
|||||||
private int wins, losses;
|
private int wins, losses;
|
||||||
private int winStreakBest = 0;
|
private int winStreakBest = 0;
|
||||||
private int winStreakCurrent = 0;
|
private int winStreakCurrent = 0;
|
||||||
|
private int day = 1;
|
||||||
private int difficulty;
|
private int difficulty;
|
||||||
private ConquestPlane startingPlane, currentPlane;
|
private ConquestPlane startingPlane, currentPlane;
|
||||||
private int currentRegionIndex;
|
private int currentRegionIndex;
|
||||||
@@ -75,6 +76,10 @@ public final class ConquestData {
|
|||||||
return difficulty;
|
return difficulty;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public int getDay() {
|
||||||
|
return day;
|
||||||
|
}
|
||||||
|
|
||||||
public ConquestPlane getStartingPlane() {
|
public ConquestPlane getStartingPlane() {
|
||||||
return startingPlane;
|
return startingPlane;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user