* Deck editor - Added possibility to edit number of cards for deck and sideboard directly if deck editor is in normal mode to build a deck from complete card pool.

This commit is contained in:
LevelX2 2014-05-09 16:00:37 +02:00
parent 7d714947aa
commit 0561499d5b
13 changed files with 351 additions and 55 deletions

View file

@ -88,9 +88,9 @@ public final class Constants {
}
public enum DeckEditorMode {
Constructed,
Limited,
Sideboard
FREE_BUILDING,
LIMITED_BUILDING,
SIDEBOARDING
}
public enum SortBy {
@ -101,7 +101,7 @@ public final class Constants {
NAME ("Name"),
UNSORTED ("Unsorted");
private String text;
private final String text;
SortBy(String text) {
this.text = text;
@ -113,18 +113,19 @@ public final class Constants {
}
public static SortBy getByString(String text) {
if (text.equals("Casting Cost")) {
return CASTING_COST;
} else if (text.equals("Rarity")) {
return RARITY;
} else if (text.equals("Color")) {
return COLOR;
}else if (text.equals("Color Detailed")) {
return COLOR_DETAILED;
}else if (text.equals("Name")) {
return NAME;
}else {
return UNSORTED;
switch (text) {
case "Casting Cost":
return CASTING_COST;
case "Rarity":
return RARITY;
case "Color":
return COLOR;
case "Color Detailed":
return COLOR_DETAILED;
case "Name":
return NAME;
default:
return UNSORTED;
}
}