use of com.simibubi.create.content.curiosities.symmetry.mirror.TriplePlaneMirror in project Create by Creators-of-Create.
the class SymmetryWandScreen method init.
@Override
public void init() {
setWindowSize(background.width, background.height);
setWindowOffset(-20, 0);
super.init();
int x = guiLeft;
int y = guiTop;
labelType = new Label(x + 49, y + 28, TextComponent.EMPTY).colored(0xFFFFFFFF).withShadow();
labelAlign = new Label(x + 49, y + 50, TextComponent.EMPTY).colored(0xFFFFFFFF).withShadow();
int state = currentElement instanceof TriplePlaneMirror ? 2 : currentElement instanceof CrossPlaneMirror ? 1 : 0;
areaType = new SelectionScrollInput(x + 45, y + 21, 109, 18).forOptions(SymmetryMirror.getMirrors()).titled(mirrorType.plainCopy()).writingTo(labelType).setState(state);
areaType.calling(position -> {
switch(position) {
case 0:
currentElement = new PlaneMirror(currentElement.getPosition());
break;
case 1:
currentElement = new CrossPlaneMirror(currentElement.getPosition());
break;
case 2:
currentElement = new TriplePlaneMirror(currentElement.getPosition());
break;
default:
break;
}
initAlign(currentElement, x, y);
});
initAlign(currentElement, x, y);
addRenderableWidget(labelAlign);
addRenderableWidget(areaType);
addRenderableWidget(labelType);
confirmButton = new IconButton(x + background.width - 33, y + background.height - 24, AllIcons.I_CONFIRM);
confirmButton.withCallback(() -> {
onClose();
});
addRenderableWidget(confirmButton);
}
Aggregations