forked from External/mage
GUI: lobby - improved details info about match (#11438)
This commit is contained in:
parent
414699f7d4
commit
6cd8649857
4 changed files with 148 additions and 108 deletions
|
|
@ -10,23 +10,21 @@ package mage.constants;
|
|||
* @author alexander-novo
|
||||
*/
|
||||
public enum MatchBufferTime {
|
||||
NONE(0, "None"),
|
||||
SEC__01(1, "1 Second"),
|
||||
SEC__02(2, "2 Seconds"),
|
||||
SEC__03(3, "3 Seconds"),
|
||||
SEC__05(5, "5 Seconds"),
|
||||
SEC__10(10, "10 Seconds"),
|
||||
SEC__15(15, "15 Seconds"),
|
||||
SEC__20(20, "20 Seconds"),
|
||||
SEC__25(25, "25 Seconds"),
|
||||
SEC__30(30, "30 Seconds");
|
||||
NONE(0),
|
||||
SEC__01(1),
|
||||
SEC__02(2),
|
||||
SEC__03(3),
|
||||
SEC__05(5),
|
||||
SEC__10(10),
|
||||
SEC__15(15),
|
||||
SEC__20(20),
|
||||
SEC__25(25),
|
||||
SEC__30(30);
|
||||
|
||||
private final int bufferSecs;
|
||||
private final String name;
|
||||
|
||||
MatchBufferTime(int bufferSecs, String name) {
|
||||
MatchBufferTime(int bufferSecs) {
|
||||
this.bufferSecs = bufferSecs;
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public int getBufferSecs() {
|
||||
|
|
@ -34,11 +32,25 @@ public enum MatchBufferTime {
|
|||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
if (this == NONE){
|
||||
return "None";
|
||||
} else if (this == SEC__01){
|
||||
return "1 Second";
|
||||
} else {
|
||||
return bufferSecs + " Seconds";
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return name;
|
||||
return getName();
|
||||
}
|
||||
|
||||
public String getShortName() {
|
||||
if (this == NONE){
|
||||
return "None";
|
||||
} else {
|
||||
return bufferSecs + "s";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue