use of gregtech.api.gui.IUIHolder in project GregTech by GregTechCEu.
the class TextPluginBehavior method customUI.
@Override
public WidgetPluginConfig customUI(WidgetPluginConfig widgets, IUIHolder holder, EntityPlayer entityPlayer) {
widgets.setSize(260, 210);
for (int i = 0; i < texts.length; i++) {
int finalI = i;
widgets.addWidget(new TextFieldWidget(25, 25 + i * 10, 100, 10, true, () -> this.texts[finalI], (text) -> setText(finalI, text, this.colors[finalI])).setValidator((data) -> true));
widgets.addWidget(new WidgetARGB(135, 25 + i * 10, 10, colors[i], color -> setText(finalI, this.texts[finalI], color)));
}
return widgets;
}
Aggregations