mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-16 18:58:00 +00:00
FIX full localisation support for V|CStatistics
Signed-off-by: leriomaggio <valeriomaggio@gmail.com>
This commit is contained in:
@@ -18,6 +18,7 @@ import forge.itemmanager.SItemManagerUtil.StatTypes;
|
||||
import forge.screens.deckeditor.CDeckEditorUI;
|
||||
import forge.screens.deckeditor.views.VStatistics;
|
||||
import forge.util.ItemPool;
|
||||
import forge.util.Localizer;
|
||||
|
||||
/**
|
||||
* Controls the "analysis" panel in the deck editor UI.
|
||||
@@ -114,9 +115,12 @@ public enum CStatistics implements ICDoc {
|
||||
}
|
||||
final double amc = Math.round((double) tmc / (double) total * 100) / 100.0d;
|
||||
|
||||
VStatistics.SINGLETON_INSTANCE.getLblTotal().setText("TOTAL CARDS: " + deck.countAll());
|
||||
VStatistics.SINGLETON_INSTANCE.getLblTMC().setText("TOTAL MANA COST: " + tmc);
|
||||
VStatistics.SINGLETON_INSTANCE.getLblAMC().setText("AVERAGE MANA COST: " + amc);
|
||||
VStatistics.SINGLETON_INSTANCE.getLblTotal().setText(
|
||||
String.format("%s: %d", Localizer.getInstance().getMessage("lblTotalCards").toUpperCase(), deck.countAll()));
|
||||
VStatistics.SINGLETON_INSTANCE.getLblTMC().setText(
|
||||
String.format("%s: %d", Localizer.getInstance().getMessage("lblTotalManaCost").toUpperCase(), tmc));
|
||||
VStatistics.SINGLETON_INSTANCE.getLblAMC().setText(String.format("%s: %.2f",
|
||||
Localizer.getInstance().getMessage("lblAverageManaCost").toUpperCase(), amc));
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -32,13 +32,16 @@ public enum VStatistics implements IVDoc<CStatistics> {
|
||||
|
||||
// Global stats
|
||||
private FLabel lblTotal = new FLabel.Builder()
|
||||
.text("TOTAL CARDS: 0").tooltip(Localizer.getInstance().getMessage("lblTotalCards"))
|
||||
.text(String.format("%s: 0", Localizer.getInstance().getMessage("lblTotalCards").toUpperCase()))
|
||||
.tooltip(Localizer.getInstance().getMessage("lblTotalCards"))
|
||||
.fontStyle(Font.BOLD).fontSize(11).fontStyle(Font.BOLD).build();
|
||||
private FLabel lblTMC = new FLabel.Builder()
|
||||
.text("TOTAL MANA COST: 0").tooltip(Localizer.getInstance().getMessage("lblTotalManaCost"))
|
||||
.text(String.format("%s: 0", Localizer.getInstance().getMessage("lblTotalManaCost").toLowerCase()))
|
||||
.tooltip(Localizer.getInstance().getMessage("lblTotalManaCost"))
|
||||
.fontStyle(Font.BOLD).fontSize(11).fontStyle(Font.BOLD).build();
|
||||
private FLabel lblAMC = new FLabel.Builder()
|
||||
.text("AVERAGE MANA COST: 0.00").tooltip(Localizer.getInstance().getMessage("lblAverageManaCost"))
|
||||
.text(String.format("%s: 0.00", Localizer.getInstance().getMessage("lblAverageManaCost").toUpperCase()))
|
||||
.tooltip(Localizer.getInstance().getMessage("lblAverageManaCost"))
|
||||
.fontStyle(Font.BOLD).fontSize(11).fontStyle(Font.BOLD).build();
|
||||
private FLabel lblCardCountHeader = new FLabel.Builder()
|
||||
.text(Localizer.getInstance().getMessage("lblCardByColorTypeCMC")).tooltip(Localizer.getInstance().getMessage("lblBreakdownOfColorTypeCMC"))
|
||||
|
||||
Reference in New Issue
Block a user