CarouselComponent: Proper capitalization
This commit is contained in:
parent
fd74c56aa4
commit
cd60dea84a
|
@ -18,7 +18,7 @@ public final class CarouselComponent extends HudComponent {
|
|||
super(name);
|
||||
|
||||
this.value = value;
|
||||
this.displayValue = value.getValue().toString().toLowerCase();
|
||||
this.displayValue = value.getCapitalizedValue();
|
||||
this.focused = false;
|
||||
}
|
||||
|
||||
|
@ -49,7 +49,7 @@ public final class CarouselComponent extends HudComponent {
|
|||
this.onLeftButtonPress(mouseX);
|
||||
this.onRightButtonPress(mouseX);
|
||||
|
||||
this.displayValue = this.value.getValue().toString().toLowerCase();
|
||||
this.displayValue = this.value.getCapitalizedValue();
|
||||
} else {
|
||||
this.focused = false;
|
||||
}
|
||||
|
|
|
@ -77,10 +77,14 @@ public class Value<T> {
|
|||
}
|
||||
}
|
||||
|
||||
public String getEnumReplacedName() {
|
||||
public String getCapitalizedName() {
|
||||
return Character.toString(this.getName().charAt(0)) + this.getName().toLowerCase().replaceFirst(Character.toString(this.getName().charAt(0)).toLowerCase(), "");
|
||||
}
|
||||
|
||||
public String getCapitalizedValue() {
|
||||
return this.getValue().toString().charAt(0) + this.getValue().toString().toLowerCase().replaceFirst(Character.toString(this.getValue().toString().charAt(0)).toLowerCase(), "");
|
||||
}
|
||||
|
||||
public T getMin() {
|
||||
return min;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue