mirror of
https://github.com/rockyhawk64/CommandPanels.git
synced 2025-11-18 07:14:17 +01:00
fix dialog shows only one item per layout when using conditions
This commit is contained in:
parent
3479487a7c
commit
a40c4c4863
@ -69,30 +69,31 @@ public class DialogPanelBuilder extends PanelBuilder {
|
||||
// Add the component to the dialog
|
||||
if (panel.getComponents().get(id) instanceof DialogButton button){
|
||||
buttons.add(buttonBuilder.buildButton(button, panel));
|
||||
continue;
|
||||
break;
|
||||
}
|
||||
if (panel.getComponents().get(id) instanceof DialogItem item){
|
||||
bodies.add(bodyBuilder.createItem(item, panel));
|
||||
continue;
|
||||
break;
|
||||
}
|
||||
if (panel.getComponents().get(id) instanceof DialogBodyText text){
|
||||
bodies.add(bodyBuilder.createText(text, panel));
|
||||
continue;
|
||||
break;
|
||||
}
|
||||
if (panel.getComponents().get(id) instanceof DialogInputBool bool){
|
||||
inputs.add(inputBuilder.createBool(bool));
|
||||
continue;
|
||||
break;
|
||||
}
|
||||
if (panel.getComponents().get(id) instanceof DialogInputRange range){
|
||||
inputs.add(inputBuilder.createRange(range));
|
||||
continue;
|
||||
break;
|
||||
}
|
||||
if (panel.getComponents().get(id) instanceof DialogInputOption option){
|
||||
inputs.add(inputBuilder.createOption(option));
|
||||
continue;
|
||||
break;
|
||||
}
|
||||
if (panel.getComponents().get(id) instanceof DialogInputText inputText){
|
||||
inputs.add(inputBuilder.createText(inputText));
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -102,9 +102,7 @@ public class CustomForm {
|
||||
inputOrder.add(stepSlider);
|
||||
}
|
||||
// unknown component, skip
|
||||
default -> {
|
||||
continue;
|
||||
}
|
||||
default -> {}
|
||||
}
|
||||
|
||||
// Only one component per order slot
|
||||
|
||||
Loading…
Reference in New Issue
Block a user