use of mcjty.lib.gui.widgets.ChoiceLabel in project RFToolsControl by McJty.
the class SideEditor method build.
@Override
public void build(Minecraft mc, Gui gui, Panel panel, ParameterEditorCallback callback) {
Panel constantPanel = new Panel(mc, gui).setLayout(new VerticalLayout());
nameLabel = new TextField(mc, gui).addTextEvent((o, text) -> callback.valueChanged(readValue())).addTextEnterEvent((parent, newText) -> closeWindow()).setDesiredWidth(50).setDesiredHeight(14);
constantPanel.addChild(createLabeledPanel(mc, gui, "Node name:", nameLabel, "Optional name of a node in the network"));
label = new ChoiceLabel(mc, gui).addChoices("*", "Down", "Up", "North", "South", "West", "East").addChoiceEvent((parent, newChoice) -> callback.valueChanged(readValue())).setDesiredWidth(60);
constantPanel.addChild(createLabeledPanel(mc, gui, "Side:", label, "Side relative to processor or node", "for the desired block"));
createEditorPanel(mc, gui, panel, callback, constantPanel, ParameterType.PAR_SIDE);
}
Aggregations