mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-18 11:48:02 +00:00
Add credits to conquest data
This commit is contained in:
@@ -299,11 +299,15 @@ public class LoadConquestScreen extends LaunchScreen {
|
|||||||
float iconOffset = SettingsScreen.SETTING_PADDING - Utils.scale(2);
|
float iconOffset = SettingsScreen.SETTING_PADDING - Utils.scale(2);
|
||||||
|
|
||||||
String cards = String.valueOf(value.getUnlockedCount());
|
String cards = String.valueOf(value.getUnlockedCount());
|
||||||
|
String credits = String.valueOf(value.getCredits());
|
||||||
font = FSkinFont.get(12);
|
font = FSkinFont.get(12);
|
||||||
float cardsWidth = font.getBounds(cards).width + iconSize + SettingsScreen.SETTING_PADDING;
|
float cardsWidth = font.getBounds(cards).width + iconSize + SettingsScreen.SETTING_PADDING;
|
||||||
g.drawText(value.getPlaneswalker().getName() + " - " + value.getCurrentPlane().getName(), font, SettingsScreen.DESC_COLOR, x, y, w - cardsWidth, h, false, HAlignment.LEFT, false);
|
float creditsWidth = font.getBounds(credits).width + iconSize + SettingsScreen.SETTING_PADDING;
|
||||||
g.drawImage(FSkinImage.HAND, x + w - cardsWidth + iconOffset, y - SettingsScreen.SETTING_PADDING, iconSize, iconSize);
|
g.drawText(value.getPlaneswalker().getName() + " - " + value.getCurrentPlane().getName(), font, SettingsScreen.DESC_COLOR, x, y, w - creditsWidth - cardsWidth, h, false, HAlignment.LEFT, false);
|
||||||
g.drawText(cards, font, SettingsScreen.DESC_COLOR, x + w - cardsWidth + iconSize + SettingsScreen.SETTING_PADDING, y, w, h, false, HAlignment.LEFT, false);
|
g.drawImage(FSkinImage.HAND, x + w - creditsWidth - cardsWidth + iconOffset, y - SettingsScreen.SETTING_PADDING, iconSize, iconSize);
|
||||||
|
g.drawText(cards, font, SettingsScreen.DESC_COLOR, x + w - creditsWidth - cardsWidth + iconSize + SettingsScreen.SETTING_PADDING, y, w, h, false, HAlignment.LEFT, false);
|
||||||
|
g.drawImage(FSkinImage.QUEST_COINSTACK, x + w - creditsWidth + iconOffset, y - SettingsScreen.SETTING_PADDING, iconSize, iconSize);
|
||||||
|
g.drawText(credits, font, SettingsScreen.DESC_COLOR, x + w - creditsWidth + iconSize + SettingsScreen.SETTING_PADDING, y, w, h, false, HAlignment.LEFT, false);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -57,6 +57,7 @@ public final class ConquestData {
|
|||||||
private PaperCard planeswalker;
|
private PaperCard planeswalker;
|
||||||
private ISkinImage planeswalkerToken;
|
private ISkinImage planeswalkerToken;
|
||||||
private ConquestLocation currentLocation;
|
private ConquestLocation currentLocation;
|
||||||
|
private int credits;
|
||||||
|
|
||||||
private transient ConquestCollection collection; //don't serialize this
|
private transient ConquestCollection collection; //don't serialize this
|
||||||
|
|
||||||
@@ -175,6 +176,10 @@ public final class ConquestData {
|
|||||||
getOrCreatePlaneData(event.getLocation().getPlane()).addLoss(event);
|
getOrCreatePlaneData(event.getLocation().getPlane()).addLoss(event);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public int getCredits() {
|
||||||
|
return credits;
|
||||||
|
}
|
||||||
|
|
||||||
public String getProgress() {
|
public String getProgress() {
|
||||||
int conquered = 0;
|
int conquered = 0;
|
||||||
int total = 0;
|
int total = 0;
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
package forge.planarconquest;
|
package forge.planarconquest;
|
||||||
|
|
||||||
public class ConquestRecord {
|
public class ConquestRecord {
|
||||||
private int wins, losses;
|
private int wins, losses, level;
|
||||||
|
|
||||||
public int getWins() {
|
public int getWins() {
|
||||||
return wins;
|
return wins;
|
||||||
@@ -11,6 +11,10 @@ public class ConquestRecord {
|
|||||||
return losses;
|
return losses;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public int getLevel() {
|
||||||
|
return level;
|
||||||
|
}
|
||||||
|
|
||||||
public void addWin() {
|
public void addWin() {
|
||||||
wins++;
|
wins++;
|
||||||
}
|
}
|
||||||
@@ -18,4 +22,8 @@ public class ConquestRecord {
|
|||||||
public void addLoss() {
|
public void addLoss() {
|
||||||
losses++;
|
losses++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void levelUp() {
|
||||||
|
level++;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user