mirror of
https://github.com/correl/mage.git
synced 2025-03-12 17:00:08 -09:00
[UI] Capitalize first leffer of abilities in ability (mode) picker
This commit is contained in:
parent
4f0f42133d
commit
d1a8678086
1 changed files with 8 additions and 1 deletions
|
@ -433,7 +433,14 @@ public class AbilityPicker extends JXPanel implements MouseWheelListener {
|
|||
|
||||
public AbilityPickerAction(UUID id, String choice) {
|
||||
this.id = id;
|
||||
putValue(Action.NAME, choice);
|
||||
putValue(Action.NAME, capitalizeFirstLetter(choice));
|
||||
}
|
||||
|
||||
private String capitalizeFirstLetter(String choice) {
|
||||
if (choice == null || choice.isEmpty()) {
|
||||
return choice;
|
||||
}
|
||||
return choice.substring(0, 1).toUpperCase() + choice.substring(1);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
Loading…
Add table
Reference in a new issue