mirror of
https://github.com/MineLittlePony/MineLittlePony.git
synced 2024-11-22 04:27:59 +01:00
Fixed settings screen crash
This commit is contained in:
parent
75f26ce061
commit
90a5ac34fd
1 changed files with 5 additions and 4 deletions
|
@ -136,10 +136,11 @@ public class PonySettingsScreen extends GameGui {
|
|||
|
||||
if (hiddenOptions) {
|
||||
for (Setting<?> i : config.getCategory("customisation").entries()) {
|
||||
Button button = content
|
||||
.addButton(new Toggle(LEFT, row += 20, ((Setting<Boolean>)i).get()))
|
||||
.onChange((Setting<Boolean>)i);
|
||||
button.getStyle().setText(OPTIONS_PREFIX + i.name().toLowerCase());
|
||||
if (i.get() instanceof Boolean value) {
|
||||
content.addButton(new Toggle(LEFT, row += 20, value))
|
||||
.onChange((Setting<Boolean>)i)
|
||||
.getStyle().setText(OPTIONS_PREFIX + i.name().toLowerCase());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue