- Initial work on the Time Vault hidden plane.

This commit is contained in:
Agetian
2018-12-01 10:48:46 +03:00
parent e245b7e5fa
commit b05effdc4c
16 changed files with 124 additions and 12 deletions

View File

@@ -34,7 +34,7 @@ public class ConquestPlaneSelector extends FDisplayObject {
private static final float MONITOR_LEFT_MULTIPLIER = 19f / 443f;
private static final float ARROW_THICKNESS = Utils.scale(3);
private static final List<ConquestPlane> planes = ImmutableList.copyOf(Iterables.filter(FModel.getPlanes(), new Predicate<ConquestPlane>() {
private static List<ConquestPlane> planes = ImmutableList.copyOf(Iterables.filter(FModel.getPlanes(), new Predicate<ConquestPlane>() {
@Override
public boolean apply(ConquestPlane plane) {
return !plane.isUnreachable(); //filter out unreachable planes
@@ -131,7 +131,7 @@ public class ConquestPlaneSelector extends FDisplayObject {
ConquestPlane plane = getSelectedPlane();
String desc = plane.getDescription();
if (!desc.isEmpty()) {
GuiDialog.message(plane.getDescription().replace("\\n", "\n"), plane.getName());
GuiDialog.message(plane.getDescription().replace("\\n", "\n"), plane.getName().replace("_", " "));
} else {
GuiDialog.message("This plane has no description.", plane.getName());
}
@@ -206,7 +206,7 @@ public class ConquestPlaneSelector extends FDisplayObject {
float monitorBottom = monitorTop + monitorHeight;
float remainingHeight = h - monitorBottom;
ConquestPlane plane = getSelectedPlane();
g.drawText(plane.getName(), PLANE_NAME_FONT, Color.WHITE, textLeft, monitorBottom, w - 2 * textLeft, remainingHeight, false, HAlignment.CENTER, true);
g.drawText(plane.getName().replace("_", " " ), PLANE_NAME_FONT, Color.WHITE, textLeft, monitorBottom, w - 2 * textLeft, remainingHeight, false, HAlignment.CENTER, true);
//draw left/right arrows
float yMid = monitorBottom + remainingHeight / 2;
@@ -224,4 +224,13 @@ public class ConquestPlaneSelector extends FDisplayObject {
g.drawLine(ARROW_THICKNESS, Color.WHITE, xMid + offsetX, yMid - 1, xMid - offsetX, yMid + offsetY);
rightArrowBounds = new Rectangle(w - leftArrowBounds.width, monitorBottom, leftArrowBounds.width, remainingHeight);
}
public void updateReachablePlanes() {
planes = ImmutableList.copyOf(Iterables.filter(FModel.getPlanes(), new Predicate<ConquestPlane>() {
@Override
public boolean apply(ConquestPlane plane) {
return !plane.isUnreachable();
}
}));
}
}

View File

@@ -38,6 +38,7 @@ public class ConquestPlaneswalkScreen extends FScreen {
public void onActivate() {
ConquestData model = FModel.getConquest().getModel();
setHeaderCaption(model.getName());
planeSelector.updateReachablePlanes();
planeSelector.setCurrentPlane(model.getCurrentPlane());
planeSelector.activate();
}