use of net.malisis.core.client.gui.component.interaction.button.builder.UIButtonBuilder in project Almura by AlmuraDev.
the class ApplyTexturePackConfirmGui method construct.
@Override
public void construct() {
this.guiscreenBackground = true;
Keyboard.enableRepeatEvents(true);
final BasicForm form = new BasicForm(this, 350, 125, "Almura Resource Loader");
form.setZIndex(10);
form.setClosable(false);
form.setBackgroundAlpha(255);
final UILabel label0 = new UILabel(this, "We noticed you're not using the preferred texture pack.");
label0.setFontOptions(FontOptions.builder().from(FontColors.WHITE_FO).shadow(true).scale(1.0F).build());
label0.setPosition(0, 10, Anchor.CENTER | Anchor.TOP);
final UILabel label1 = new UILabel(this, "Do you want to apply the following texture pack?");
label1.setFontOptions(FontOptions.builder().from(FontColors.WHITE_FO).shadow(true).scale(1.0F).build());
label1.setPosition(0, label0.getY() + 15, Anchor.CENTER | Anchor.TOP);
final UILabel label2 = new UILabel(this, AlmuraSettings.getPreferredTexturePack());
label2.setFontOptions(FontOptions.builder().from(FontColors.GREEN_FO).shadow(true).scale(1.0F).build());
label2.setPosition(0, label1.getY() + 15, Anchor.CENTER | Anchor.TOP);
final UISeparator belowAmountSeparator = new UISeparator(this);
belowAmountSeparator.setSize(form.getWidth() - 5, 1);
belowAmountSeparator.setPosition(0, -45, Anchor.BOTTOM | Anchor.CENTER);
final UIButton buttonYes = new UIButtonBuilder(this).text("Yes").anchor(Anchor.BOTTOM | Anchor.CENTER).position(-20, -25).width(40).listener(this).build("button.yes");
final UIButton buttonNo = new UIButtonBuilder(this).text("No").anchor(Anchor.BOTTOM | Anchor.CENTER).position(20, -25).width(40).listener(this).build("button.close");
final UISeparator aboveCloseSeparator = new UISeparator(this);
aboveCloseSeparator.setSize(form.getWidth() - 5, 1);
aboveCloseSeparator.setPosition(0, -20, Anchor.BOTTOM | Anchor.CENTER);
final UIButton buttonClose = new UIButtonBuilder(this).text(I18n.format("almura.button.close")).anchor(Anchor.BOTTOM | Anchor.RIGHT).position(0, 0).width(40).listener(this).build("button.close");
form.add(buttonClose, label0, label1, label2, aboveCloseSeparator, buttonYes, buttonNo, belowAmountSeparator);
addToScreen(form);
}
Aggregations