use of gregtech.api.terminal.gui.widgets.SelectorWidget in project GregTech by GregTechCEu.
the class GuideConfigEditor method createPageConfig.
private DraggableScrollableWidgetGroup createPageConfig() {
DraggableScrollableWidgetGroup group = new DraggableScrollableWidgetGroup(0, 0, getSize().width, getSize().height - 10).setBackground(TerminalTheme.COLOR_B_3).setYScrollBarWidth(4).setYBarStyle(null, TerminalTheme.COLOR_F_1);
group.addWidget(new LabelWidget(5, 5, "section", -1).setShadow(true));
group.addWidget(new TextFieldWidget(5, 15, 116, 20, new ColorRectTexture(0x9f000000), null, null).setTextResponder(s -> {
if (pageEditor != null) {
pageEditor.setSection(s);
}
}, true).setTextSupplier(() -> getPageEditor().getSection(), true).setMaxStringLength(Integer.MAX_VALUE).setValidator(s -> true));
group.addWidget(new ImageWidget(5, 40, 116, 1, new ColorRectTexture(-1)));
group.addWidget(new LabelWidget(5, 45, "type", -1).setShadow(true));
group.addWidget(new SelectorWidget(30, 55, 91, 20, candidates, -1, () -> type, true).setIsUp(true).setOnChanged(type -> this.type = type).setColors(TerminalTheme.COLOR_B_2.getColor(), TerminalTheme.COLOR_F_1.getColor(), TerminalTheme.COLOR_B_2.getColor()).setBackground(TerminalTheme.COLOR_6));
group.addWidget(new PhantomSlotWidget(handler, 0, 6, 56).setBackgroundTexture(TerminalTheme.COLOR_B_2));
group.addWidget(new ImageWidget(5, 80, 116, 1, new ColorRectTexture(-1)));
group.addWidget(new LabelWidget(5, 85, "title", -1).setShadow(true));
titleEditor = new TextEditorWidget(5, 95, 116, 70, s -> {
if (pageEditor != null) {
pageEditor.setTitle(s);
}
}, true).setContent("Template").setBackground(new ColorRectTexture(0xA3FFFFFF));
group.addWidget(titleEditor);
return group;
}
Aggregations