use of net.malisis.core.client.gui.component.container.BasicForm in project Almura by AlmuraDev.
the class ConnectingGui method construct.
@Override
public void construct() {
this.guiscreenBackground = true;
Keyboard.enableRepeatEvents(true);
this.form = new BasicForm(this, 200, 200, "Server Status");
this.form.setAnchor(Anchor.CENTER | Anchor.MIDDLE);
this.form.setMovable(false);
this.form.setClosable(false);
this.form.setBorder(FontColors.WHITE, 1, 185);
this.form.setBackgroundAlpha(215);
this.form.setBottomPadding(3);
this.form.setRightPadding(3);
this.form.setTopPadding(20);
this.form.setLeftPadding(3);
// Almura header
final UIImage almuraHeader = new UIImage(this, new GuiTexture(GuiConfig.Location.ALMURA_LOGO), null);
almuraHeader.setSize(60, 99);
almuraHeader.setPosition(0, 5, Anchor.TOP | Anchor.CENTER);
final UISeparator aboveLogoSeparator = new UISeparator(this);
aboveLogoSeparator.setSize(this.form.getWidth() - 5, 1);
aboveLogoSeparator.setPosition(0, 107, Anchor.TOP | Anchor.CENTER);
this.form.add(aboveLogoSeparator);
this.messageLabel = new UILabel(this, "Connecting from Server...");
this.messageLabel.setFontOptions(FontOptions.builder().from(FontColors.WHITE_FO).shadow(true).scale(1.1F).build());
this.messageLabel.setPosition(0, 115, Anchor.CENTER | Anchor.TOP);
this.form.add(this.messageLabel);
this.messageLabel2 = new UILabel(this, "Synchronizing data...");
this.messageLabel2.setFontOptions(FontOptions.builder().from(FontColors.WHITE_FO).shadow(true).scale(1.1F).build());
this.messageLabel2.setPosition(0, 128, Anchor.CENTER | Anchor.TOP);
this.form.add(this.messageLabel2);
this.magic = new UILabel(this, "valuesvalues");
magic.setFontOptions(FontOptions.builder().from(FontColors.WHITE_FO).obfuscated(true).scale(1.0F).build());
magic.setPosition(0, -25, Anchor.CENTER | Anchor.BOTTOM);
this.form.add(magic);
final UISeparator aboveButtonsSeparator = new UISeparator(this);
aboveButtonsSeparator.setSize(this.form.getWidth() - 5, 1);
aboveButtonsSeparator.setPosition(0, -20, Anchor.BOTTOM | Anchor.CENTER);
this.form.add(aboveButtonsSeparator);
// Close button
this.buttonClose = new UIButtonBuilder(this).width(40).anchor(Anchor.BOTTOM | Anchor.CENTER).text("Return to Server Menu").fontOptions(FontOptions.builder().from(FontColors.WHITE_FO).shadow(true).build()).listener(this).build("button.return");
this.form.add(almuraHeader, this.buttonClose);
addToScreen(this.form);
}
use of net.malisis.core.client.gui.component.container.BasicForm in project Almura by AlmuraDev.
the class MembershipAppliedGui method construct.
@Override
public void construct() {
this.guiscreenBackground = true;
Keyboard.enableRepeatEvents(true);
final BasicForm form = new BasicForm(this, 150, 100, "Almura Memberships");
form.setZIndex(10);
form.setBackgroundAlpha(255);
final UILabel label0 = new UILabel(this, "Congratulations!");
label0.setFontOptions(FontOptions.builder().from(FontColors.WHITE_FO).shadow(true).scale(1.0F).build());
label0.setPosition(0, 10, Anchor.CENTER | Anchor.TOP);
final UILabel membershipLabel = new UILabel(this, membership);
membershipLabel.setFontOptions(FontOptions.builder().from(FontColors.GOLD_FO).shadow(true).scale(1.0F).build());
membershipLabel.setPosition(0, label0.getY() + 15, Anchor.CENTER | Anchor.TOP);
final UILabel valueLabel = new UILabel(this, "Successfully applied!");
valueLabel.setFontOptions(FontOptions.builder().from(FontColors.GREEN_FO).shadow(true).scale(1.0F).build());
valueLabel.setPosition(0, membershipLabel.getY() + 15, Anchor.CENTER | Anchor.TOP);
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, membershipLabel, valueLabel, aboveCloseSeparator);
addToScreen(form);
}
use of net.malisis.core.client.gui.component.container.BasicForm in project Almura by AlmuraDev.
the class MembershipDetailsGui method construct.
@Override
public void construct() {
this.guiscreenBackground = true;
Keyboard.enableRepeatEvents(true);
final BasicForm form = new BasicForm(this, 250, 200, membership);
form.setZIndex(10);
form.setBackgroundAlpha(255);
final UILabel unlocksWorldsLabel = new UILabel(this, "Unlocks Worlds:");
unlocksWorldsLabel.setFontOptions(FontOptions.builder().from(FontColors.WHITE_FO).shadow(true).scale(1.0F).build());
unlocksWorldsLabel.setPosition(25, 10, Anchor.LEFT | Anchor.TOP);
form.add(unlocksWorldsLabel);
final UILabel cemariaWorldLabel = new UILabel(this, "Cemaria");
cemariaWorldLabel.setFontOptions(FontOptions.builder().from(FontColors.GREEN_FO).shadow(true).scale(1.0F).build());
cemariaWorldLabel.setPosition(unlocksWorldsLabel.getX() + unlocksWorldsLabel.getWidth() + 5, unlocksWorldsLabel.getY(), Anchor.LEFT | Anchor.TOP);
form.add(cemariaWorldLabel);
final UILabel highgardenWorldLabel = new UILabel(this, "Highgarden");
highgardenWorldLabel.setFontOptions(FontOptions.builder().from(FontColors.GREEN_FO).shadow(true).scale(1.0F).build());
highgardenWorldLabel.setPosition(unlocksWorldsLabel.getX() + unlocksWorldsLabel.getWidth() + 5, cemariaWorldLabel.getY() + 10, Anchor.LEFT | Anchor.TOP);
form.add(highgardenWorldLabel);
final UILabel forestRiverWorldLabel = new UILabel(this, "ForestRiver");
forestRiverWorldLabel.setFontOptions(FontOptions.builder().from(FontColors.GREEN_FO).shadow(true).scale(1.0F).build());
forestRiverWorldLabel.setPosition(unlocksWorldsLabel.getX() + unlocksWorldsLabel.getWidth() + 5, highgardenWorldLabel.getY() + 10, Anchor.LEFT | Anchor.TOP);
form.add(forestRiverWorldLabel);
if (membershipLevel >= 2) {
final UILabel atlantisWorldLabel = new UILabel(this, "Atlantis");
atlantisWorldLabel.setFontOptions(FontOptions.builder().from(FontColors.GREEN_FO).shadow(true).scale(1.0F).build());
atlantisWorldLabel.setPosition(unlocksWorldsLabel.getX() + unlocksWorldsLabel.getWidth() + 5, forestRiverWorldLabel.getY() + 10, Anchor.LEFT | Anchor.TOP);
form.add(atlantisWorldLabel);
final UILabel keystoneWorldLabel = new UILabel(this, "Keystone");
keystoneWorldLabel.setFontOptions(FontOptions.builder().from(FontColors.GREEN_FO).shadow(true).scale(1.0F).build());
keystoneWorldLabel.setPosition(unlocksWorldsLabel.getX() + unlocksWorldsLabel.getWidth() + 5, atlantisWorldLabel.getY() + 10, Anchor.LEFT | Anchor.TOP);
form.add(keystoneWorldLabel);
final UILabel marionWorldLabel = new UILabel(this, "Marion");
marionWorldLabel.setFontOptions(FontOptions.builder().from(FontColors.GREEN_FO).shadow(true).scale(1.0F).build());
marionWorldLabel.setPosition(unlocksWorldsLabel.getX() + unlocksWorldsLabel.getWidth() + 5, keystoneWorldLabel.getY() + 10, Anchor.LEFT | Anchor.TOP);
form.add(marionWorldLabel);
if (membershipLevel == 3) {
final UILabel zealWorldLabel = new UILabel(this, "Zeal");
zealWorldLabel.setFontOptions(FontOptions.builder().from(FontColors.GREEN_FO).shadow(true).scale(1.0F).build());
zealWorldLabel.setPosition(unlocksWorldsLabel.getX() + unlocksWorldsLabel.getWidth() + 5, marionWorldLabel.getY() + 10, Anchor.LEFT | Anchor.TOP);
form.add(zealWorldLabel);
final UILabel tollanaWorldLabel = new UILabel(this, "Tollana");
tollanaWorldLabel.setFontOptions(FontOptions.builder().from(FontColors.GREEN_FO).shadow(true).scale(1.0F).build());
tollanaWorldLabel.setPosition(unlocksWorldsLabel.getX() + unlocksWorldsLabel.getWidth() + 5, zealWorldLabel.getY() + 10, Anchor.LEFT | Anchor.TOP);
form.add(tollanaWorldLabel);
final UILabel othalaWorldLabel = new UILabel(this, "Othala");
othalaWorldLabel.setFontOptions(FontOptions.builder().from(FontColors.GREEN_FO).shadow(true).scale(1.0F).build());
othalaWorldLabel.setPosition(unlocksWorldsLabel.getX() + unlocksWorldsLabel.getWidth() + 5, tollanaWorldLabel.getY() + 10, Anchor.LEFT | Anchor.TOP);
form.add(othalaWorldLabel);
}
}
final UILabel featuresLabel = new UILabel(this, "Features: ");
featuresLabel.setFontOptions(FontOptions.builder().from(FontColors.WHITE_FO).shadow(true).scale(1.0F).build());
if (membershipLevel == 1) {
featuresLabel.setPosition(25, 45, Anchor.LEFT | Anchor.TOP);
form.setSize(form.getWidth(), 170);
}
if (membershipLevel == 2) {
featuresLabel.setPosition(25, 75, Anchor.LEFT | Anchor.TOP);
form.setSize(form.getWidth(), 210);
}
if (membershipLevel == 3) {
featuresLabel.setPosition(25, 105, Anchor.LEFT | Anchor.TOP);
form.setSize(form.getWidth(), 300);
}
form.add(featuresLabel);
final UILabel keepInventoryOnDeathLabel = new UILabel(this, "- Keep Inventory on Death");
keepInventoryOnDeathLabel.setFontOptions(FontOptions.builder().from(FontColors.GRAY_FO).shadow(true).scale(1.0F).build());
keepInventoryOnDeathLabel.setPosition(35, featuresLabel.getY() + 10, Anchor.LEFT | Anchor.TOP);
form.add(keepInventoryOnDeathLabel);
final UILabel keepExperienceOnDeathLabel = new UILabel(this, "- Keep Experience on Death");
keepExperienceOnDeathLabel.setFontOptions(FontOptions.builder().from(FontColors.GRAY_FO).shadow(true).scale(1.0F).build());
keepExperienceOnDeathLabel.setPosition(keepInventoryOnDeathLabel.getX(), keepInventoryOnDeathLabel.getY() + 10, Anchor.LEFT | Anchor.TOP);
form.add(keepExperienceOnDeathLabel);
final UILabel abilityToReviveLabel = new UILabel(this, "- Ability to Revive");
abilityToReviveLabel.setFontOptions(FontOptions.builder().from(FontColors.GRAY_FO).shadow(true).scale(1.0F).build());
abilityToReviveLabel.setPosition(keepInventoryOnDeathLabel.getX(), keepExperienceOnDeathLabel.getY() + 10, Anchor.LEFT | Anchor.TOP);
form.add(abilityToReviveLabel);
final UILabel griefPreventionLeaseLabel = new UILabel(this, "- 90 day Grief Prevention Leases");
griefPreventionLeaseLabel.setFontOptions(FontOptions.builder().from(FontColors.GRAY_FO).shadow(true).scale(1.0F).build());
griefPreventionLeaseLabel.setPosition(keepInventoryOnDeathLabel.getX(), abilityToReviveLabel.getY() + 10, Anchor.LEFT | Anchor.TOP);
form.add(griefPreventionLeaseLabel);
final UILabel priorityPlayerTechnicalSupportLabel = new UILabel(this, "- Priority Player Technical Support");
priorityPlayerTechnicalSupportLabel.setFontOptions(FontOptions.builder().from(FontColors.GRAY_FO).shadow(true).scale(1.0F).build());
priorityPlayerTechnicalSupportLabel.setPosition(keepInventoryOnDeathLabel.getX(), griefPreventionLeaseLabel.getY() + 10, Anchor.LEFT | Anchor.TOP);
form.add(priorityPlayerTechnicalSupportLabel);
final UILabel earlyAccessToNewContentLabel = new UILabel(this, "- Early access to new content");
earlyAccessToNewContentLabel.setFontOptions(FontOptions.builder().from(FontColors.GRAY_FO).shadow(true).scale(1.0F).build());
earlyAccessToNewContentLabel.setPosition(keepInventoryOnDeathLabel.getX(), priorityPlayerTechnicalSupportLabel.getY() + 10, Anchor.LEFT | Anchor.TOP);
form.add(earlyAccessToNewContentLabel);
if (membershipLevel == 1) {
final UILabel citizenItemSlotsLabel = new UILabel(this, "- 100 item slots on Exchange");
citizenItemSlotsLabel.setFontOptions(FontOptions.builder().from(FontColors.GRAY_FO).shadow(true).scale(1.0F).build());
citizenItemSlotsLabel.setPosition(keepInventoryOnDeathLabel.getX(), earlyAccessToNewContentLabel.getY() + 10, Anchor.LEFT | Anchor.TOP);
form.add(citizenItemSlotsLabel);
}
if (membershipLevel >= 2) {
final UILabel abilityToFlyLabel = new UILabel(this, "- Ability to Fly!");
abilityToFlyLabel.setFontOptions(FontOptions.builder().from(FontColors.GRAY_FO).shadow(true).scale(1.0F).build());
abilityToFlyLabel.setPosition(keepInventoryOnDeathLabel.getX(), earlyAccessToNewContentLabel.getY() + 10, Anchor.LEFT | Anchor.TOP);
form.add(abilityToFlyLabel);
if (membershipLevel == 2) {
final UILabel explorerItemSlotsLabel = new UILabel(this, "- 500 item slots on Exchange");
explorerItemSlotsLabel.setFontOptions(FontOptions.builder().from(FontColors.GRAY_FO).shadow(true).scale(1.0F).build());
explorerItemSlotsLabel.setPosition(keepInventoryOnDeathLabel.getX(), abilityToFlyLabel.getY() + 10, Anchor.LEFT | Anchor.TOP);
form.add(explorerItemSlotsLabel);
}
if (membershipLevel == 3) {
final UILabel pioneerItemSlotLabel = new UILabel(this, "- 5,000 item slots on Exchange");
pioneerItemSlotLabel.setFontOptions(FontOptions.builder().from(FontColors.GRAY_FO).shadow(true).scale(1.0F).build());
pioneerItemSlotLabel.setPosition(keepInventoryOnDeathLabel.getX(), abilityToFlyLabel.getY() + 10, Anchor.LEFT | Anchor.TOP);
form.add(pioneerItemSlotLabel);
final UILabel commandsLabel = new UILabel(this, "Additional Commands: ");
commandsLabel.setFontOptions(FontOptions.builder().from(FontColors.WHITE_FO).shadow(true).scale(1.0F).build());
commandsLabel.setPosition(25, pioneerItemSlotLabel.getY() + 15, Anchor.LEFT | Anchor.TOP);
form.add(commandsLabel);
final UILabel backCommandLabel = new UILabel(this, "- /back");
backCommandLabel.setFontOptions(FontOptions.builder().from(FontColors.GRAY_FO).shadow(true).scale(1.0F).build());
backCommandLabel.setPosition(keepInventoryOnDeathLabel.getX(), commandsLabel.getY() + 10, Anchor.LEFT | Anchor.TOP);
form.add(backCommandLabel);
final UILabel nicknameCommandLabel = new UILabel(this, "- /nickname");
nicknameCommandLabel.setFontOptions(FontOptions.builder().from(FontColors.GRAY_FO).shadow(true).scale(1.0F).build());
nicknameCommandLabel.setPosition(keepInventoryOnDeathLabel.getX(), backCommandLabel.getY() + 10, Anchor.LEFT | Anchor.TOP);
form.add(nicknameCommandLabel);
final UILabel anvilCommandLabel = new UILabel(this, "- /anvil");
anvilCommandLabel.setFontOptions(FontOptions.builder().from(FontColors.GRAY_FO).shadow(true).scale(1.0F).build());
anvilCommandLabel.setPosition(keepInventoryOnDeathLabel.getX(), nicknameCommandLabel.getY() + 10, Anchor.LEFT | Anchor.TOP);
form.add(anvilCommandLabel);
final UILabel enchantingTableCommandLabel = new UILabel(this, "- /enchantingtable");
enchantingTableCommandLabel.setFontOptions(FontOptions.builder().from(FontColors.GRAY_FO).shadow(true).scale(1.0F).build());
enchantingTableCommandLabel.setPosition(keepInventoryOnDeathLabel.getX(), anvilCommandLabel.getY() + 10, Anchor.LEFT | Anchor.TOP);
form.add(enchantingTableCommandLabel);
}
}
final UISeparator aboveCloseSeparator = new UISeparator(this);
aboveCloseSeparator.setSize(form.getWidth() - 5, 1);
aboveCloseSeparator.setPosition(0, -18, 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, aboveCloseSeparator);
addToScreen(form);
}
use of net.malisis.core.client.gui.component.container.BasicForm in project Almura by AlmuraDev.
the class PurchaseConfirmGui method construct.
@Override
public void construct() {
this.guiscreenBackground = true;
Keyboard.enableRepeatEvents(true);
final BasicForm form = new BasicForm(this, 150, 125, "Confirmation");
form.setZIndex(10);
form.setBackgroundAlpha(255);
final UILabel label0 = new UILabel(this, "Do you wish to purchase:");
label0.setFontOptions(FontOptions.builder().from(FontColors.WHITE_FO).shadow(true).scale(1.0F).build());
label0.setPosition(0, 10, Anchor.CENTER | Anchor.TOP);
final UILabel membershipLabel = new UILabel(this, membership);
membershipLabel.setFontOptions(FontOptions.builder().from(FontColors.GOLD_FO).shadow(true).scale(1.0F).build());
membershipLabel.setPosition(0, label0.getY() + 15, Anchor.CENTER | Anchor.TOP);
final UILabel amountLabel = new UILabel(this, "Amount: ");
amountLabel.setFontOptions(FontOptions.builder().from(FontColors.WHITE_FO).shadow(true).scale(1.0F).build());
amountLabel.setPosition(-25, membershipLabel.getY() + 15, Anchor.CENTER | Anchor.TOP);
final UILabel valueLabel = new UILabel(this, value);
valueLabel.setFontOptions(FontOptions.builder().from(FontColors.GREEN_FO).shadow(true).scale(1.0F).build());
valueLabel.setPosition(amountLabel.getX() + amountLabel.getWidth() + 5, membershipLabel.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 buttonPurchase = new UIButtonBuilder(this).text("Purchase").anchor(Anchor.BOTTOM | Anchor.CENTER).position(0, -25).width(40).listener(this).build("button.purchase");
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.cancel")).anchor(Anchor.BOTTOM | Anchor.RIGHT).position(0, 0).width(40).listener(this).build("button.close");
form.add(buttonClose, label0, membershipLabel, amountLabel, valueLabel, aboveCloseSeparator, buttonPurchase, belowAmountSeparator);
addToScreen(form);
}
use of net.malisis.core.client.gui.component.container.BasicForm in project Almura by AlmuraDev.
the class SkillsUpgradeConfirmGui method construct.
@Override
public void construct() {
this.guiscreenBackground = true;
Keyboard.enableRepeatEvents(true);
final BasicForm form = new BasicForm(this, 150, 125, "Confirmation");
form.setZIndex(10);
form.setBackgroundAlpha(255);
final UILabel label0 = new UILabel(this, "Do you wish to upgrade to:");
label0.setFontOptions(FontOptions.builder().from(FontColors.WHITE_FO).shadow(true).scale(1.0F).build());
label0.setPosition(0, 10, Anchor.CENTER | Anchor.TOP);
final UILabel membershipLabel = new UILabel(this, membership);
membershipLabel.setFontOptions(FontOptions.builder().from(FontColors.GOLD_FO).shadow(true).scale(1.0F).build());
membershipLabel.setPosition(0, label0.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 buttonPurchase = new UIButtonBuilder(this).text("Upgrade Me!").anchor(Anchor.BOTTOM | Anchor.CENTER).position(0, -25).width(40).listener(this).build("button.upgrade");
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.cancel")).anchor(Anchor.BOTTOM | Anchor.RIGHT).position(0, 0).width(40).listener(this).build("button.close");
form.add(buttonClose, label0, membershipLabel, aboveCloseSeparator, buttonPurchase, belowAmountSeparator);
addToScreen(form);
}
Aggregations