v3.0.1: added a safety check to toolbar layout logic

This commit is contained in:
Evan Debenham
2025-03-05 20:43:22 -05:00
parent 18479aae92
commit 561b7b902f

View File

@@ -556,7 +556,14 @@ public class Toolbar extends Component {
}
float shift = 0;
switch(Mode.valueOf(SPDSettings.toolbarMode())){
Toolbar.Mode mode;
try {
mode = Mode.valueOf(SPDSettings.toolbarMode());
} catch (Exception e){
Game.reportException(e);
mode = PixelScene.landscape() ? Mode.GROUP : Mode.SPLIT;
}
switch(mode){
case SPLIT:
btnWait.setPos(x, y);
btnSearch.setPos(btnWait.right(), y);