use of net.malisis.core.client.gui.GuiTexture in project Almura by AlmuraDev.
the class ServerMenu method construct.
@Override
public void construct() {
// Create the form
final UIBackgroundContainer form = new UIBackgroundContainer(this, "", 225, 225);
// form.setTitle(TextFormatting.WHITE + "Multiplayer");
form.setAnchor(Anchor.CENTER | Anchor.MIDDLE);
// Create the logo
logoImage = new UIImage(this, new GuiTexture(GuiConfig.Location.ALMURA_LOGO), null);
logoImage.setSize(60, 99);
logoImage.setPosition(0, 0, Anchor.TOP | Anchor.CENTER);
liveServerOnline = new UILabel(this, TextFormatting.YELLOW + "Updating...");
liveServerOnline.setPosition(0, getPaddedY(logoImage, padding) + 7, Anchor.TOP | Anchor.CENTER);
liveServerTitle = new UILabel(this, TextFormatting.WHITE + "Public Server : ");
liveServerTitle.setPosition(-liveServerTitle.getWidth() / 2 + padding, liveServerOnline.getY(), Anchor.TOP | Anchor.CENTER);
// Create the live Almura button
almuraLiveButton = new UIButton(this, "Join ");
almuraLiveButton.setSize(40, 16);
almuraLiveButton.setName("button.server.almura.live");
almuraLiveButton.setPosition(liveServerTitle.getWidth() / 2 + padding, getPaddedY(logoImage, padding) + 3, Anchor.TOP | Anchor.CENTER);
almuraLiveButton.setVisible(false);
almuraLiveButton.register(this);
livePlayersOnline = new UILabel(this, TextFormatting.DARK_BLUE + "(0/50)");
livePlayersOnline.setPosition(0, liveServerOnline.getY(), Anchor.TOP | Anchor.CENTER);
livePlayersOnline.setVisible(false);
devServerOnline = new UILabel(this, TextFormatting.YELLOW + "Updating...");
devServerOnline.setPosition(0, getPaddedY(almuraLiveButton, padding) + 8, Anchor.TOP | Anchor.CENTER);
devServerTitle = new UILabel(this, TextFormatting.WHITE + "Dev Server : ");
devServerTitle.setPosition(26, devServerTitle.getY(), Anchor.TOP | Anchor.CENTER);
// Create the beta Almura button
almuraDevButton = new UIButton(this, "Join ");
almuraDevButton.setSize(40, 16);
almuraDevButton.setName("button.server.almura.dev");
almuraDevButton.setPosition(devServerOnline.getX() + devServerOnline.getWidth() + 5, getPaddedY(almuraLiveButton, padding) + 3, Anchor.TOP | Anchor.LEFT);
almuraDevButton.setVisible(false);
almuraDevButton.register(this);
devPlayersOnline = new UILabel(this, TextFormatting.DARK_BLUE + "(0/50)");
devPlayersOnline.setPosition(0, getPaddedY(almuraLiveButton, padding) + 8, Anchor.TOP | Anchor.CENTER);
devPlayersOnline.setVisible(false);
centerAlign();
// Create the join another server button
UIButton anotherButton = new UIButton(this, "Other Multiplayer");
anotherButton.setPosition(0, getPaddedY(almuraDevButton, padding) + 13, Anchor.TOP | Anchor.CENTER);
anotherButton.setSize(GuiConfig.Button.WIDTH_LONG, GuiConfig.Button.HEIGHT);
anotherButton.setName("button.server.another");
anotherButton.register(this);
// Create the back button
UIButton backButton = new UIButton(this, "Back");
backButton.setPosition(0, getPaddedY(anotherButton, padding) + 3, Anchor.TOP | Anchor.CENTER);
backButton.setSize(GuiConfig.Button.WIDTH_LONG, GuiConfig.Button.HEIGHT);
backButton.setName("button.back");
backButton.register(this);
final UIButton forumsButton = new UIButtonBuilder(this).container(this.buttonContainer).icon(GuiConfig.Icon.ENJIN).size(GuiConfig.Button.WIDTH_ICON, GuiConfig.Button.HEIGHT_ICON).position(-padding, -padding).anchor(Anchor.BOTTOM | Anchor.RIGHT).listener(this).tooltip(Text.of(I18n.format("almura.menu.forums"))).build("button.forums");
final UIButton issuesButton = new UIButtonBuilder(this).container(this.buttonContainer).icon(GuiConfig.Icon.FA_GITHUB).size(GuiConfig.Button.WIDTH_ICON, GuiConfig.Button.HEIGHT_ICON).position(SimpleScreen.getPaddedX(forumsButton, padding, Anchor.RIGHT), forumsButton.getY()).anchor(Anchor.BOTTOM | Anchor.RIGHT).listener(this).tooltip(Text.of(I18n.format(I18n.format("almura.menu.issues")))).build("button.issues");
final UIButton shopButton = new UIButtonBuilder(this).container(this.buttonContainer).icon(GuiConfig.Icon.FA_SHOPPING_BAG).size(GuiConfig.Button.WIDTH_ICON, GuiConfig.Button.HEIGHT_ICON).position(SimpleScreen.getPaddedX(issuesButton, padding, Anchor.RIGHT), issuesButton.getY()).anchor(Anchor.BOTTOM | Anchor.RIGHT).listener(this).tooltip(Text.of(I18n.format("almura.menu.shop"))).build("button.shop");
final UILabel trademarkLabel = new UILabel(this, TextFormatting.YELLOW + I18n.format("almura.menu.main.trademark"));
trademarkLabel.setPosition(padding, -padding, Anchor.BOTTOM | Anchor.LEFT);
final UILabel copyrightLabel = new UILabel(this, TextFormatting.YELLOW + I18n.format("almura.menu.main.copyright"));
copyrightLabel.setPosition(trademarkLabel.getX(), SimpleScreen.getPaddedY(trademarkLabel, padding, Anchor.BOTTOM), trademarkLabel.getAnchor());
form.add(logoImage, liveServerTitle, liveServerOnline, almuraLiveButton, devServerTitle, devServerOnline, almuraDevButton, devPlayersOnline, livePlayersOnline, anotherButton, backButton);
form.setColor(Integer.MIN_VALUE);
form.setBackgroundAlpha(0);
addToScreen(form, forumsButton, issuesButton, shopButton, trademarkLabel, copyrightLabel);
}
use of net.malisis.core.client.gui.GuiTexture in project Almura by AlmuraDev.
the class MultiplayerScreen method construct.
@Override
public void construct() {
this.renderer.setDefaultTexture(GuiConfig.SpriteSheet.ALMURA);
// Container to cover the screen (fixes issues with stuck button highlighting)
final BasicContainer<?> screenContainer = new BasicContainer(this);
screenContainer.setBackgroundAlpha(0);
// Primary content
final BasicContainer<?> contentContainer = new BasicContainer(this, UIConstants.Button.WIDTH_LONG, 206);
contentContainer.setPosition(0, -10, Anchor.MIDDLE | Anchor.CENTER);
contentContainer.setBackgroundAlpha(0);
// Create logo
final UIImage logoImage = new UIImage(this, new GuiTexture(GuiConfig.Location.ALMURA_LOGO), null);
logoImage.setSize(60, 99);
logoImage.setPosition(0, 0, Anchor.TOP | Anchor.CENTER);
// Container for server entries
this.serverList = new BasicList<>(this, UIConstants.Button.WIDTH_LONG - 2, 26);
this.serverList.setPosition(0, BasicScreen.getPaddedY(logoImage, 10), Anchor.TOP | Anchor.CENTER);
this.serverList.setColor(0x000000);
this.serverList.setBackgroundAlpha(185);
this.serverList.setItemComponentSpacing(1);
this.serverList.setBorder(0xFFFFFF, 1, 185);
this.serverList.setPadding(2);
this.serverList.setItemComponentFactory(ServerEntryItemComponent::new);
this.serverList.setSelectConsumer(i -> this.updateButtons());
this.serverList.setItems(serverEntries);
this.serverList.createItemComponents();
// Join button
this.joinButton = new UIButtonBuilder(this).text(I18n.format("almura.menu_button.join")).enabled(false).width(UIConstants.Button.WIDTH_LONG).height(UIConstants.Button.HEIGHT).position(0, BasicScreen.getPaddedY(this.serverList, 2)).anchor(Anchor.TOP | Anchor.LEFT).onClick(this::join).build("button.join");
// Back button
this.backButton = new UIButtonBuilder(this).text(I18n.format("gui.back")).width(UIConstants.Button.WIDTH_SHORT).height(UIConstants.Button.HEIGHT).position(0, BasicScreen.getPaddedY(this.joinButton, 2)).anchor(Anchor.TOP | Anchor.LEFT).onClick(this::close).build("button.back");
// Other button
this.otherButton = new UIButtonBuilder(this).text(I18n.format("almura.menu_button.other")).width(UIConstants.Button.WIDTH_SHORT).height(UIConstants.Button.HEIGHT).position(0, BasicScreen.getPaddedY(this.joinButton, 2)).anchor(Anchor.TOP | Anchor.RIGHT).onClick(() -> Minecraft.getMinecraft().displayGuiScreen(new GuiMultiplayer(this))).build("button.other");
// Add everything to the bowl
contentContainer.add(logoImage, this.serverList, this.joinButton, backButton, otherButton);
screenContainer.add(contentContainer);
// Bake that cake
this.addToScreen(screenContainer);
// Select the first entry
this.serverList.setSelectedItem(serverEntries.stream().findFirst().orElse(null));
updateButtons();
}
use of net.malisis.core.client.gui.GuiTexture in project Almura by AlmuraDev.
the class SimpleAboutMenu method construct.
@SuppressWarnings({ "unchecked" })
@Override
public void construct() {
super.construct();
this.list = new BasicList<>(this, 125, UIComponent.INHERITED);
this.list.setPosition(4, 0);
this.list.setItemComponentSpacing(4);
this.list.setCanDeselect(false);
final List<AboutItemData> elementDataList = Lists.newArrayList();
// Static entry
elementDataList.add(new AboutItemData(this.list, new UIImage(this, new GuiTexture(GuiConfig.Location.ALMURA_MAN), null), 5, 0, 23, 32, 8, AboutConfig.TITLE, AboutConfig.STORY));
// Dynamic entry
AboutConfig.ENTRIES.forEach(entry -> {
Text titles = Text.EMPTY;
for (final String title : entry.titles) {
titles = titles.toBuilder().append(Text.of(" • ", I18n.format(title)), Text.NEW_LINE).build();
}
elementDataList.add(new AboutItemData(this.list, new UIImage(this, new GuiRemoteTexture(GuiConfig.Location.GENERIC_AVATAR, new ResourceLocation(Almura.ID, "textures/gui/skins/avatars/" + entry.uniqueId + ".png"), String.format(GuiConfig.Url.SKINS, entry.uniqueId, 32), 32, 32), null), 2, 0, 32, 32, 4, Text.of(entry.color, I18n.format(entry.name)), Text.of(TextColors.WHITE, I18n.format(entry.description), Text.NEW_LINE, Text.NEW_LINE, TextStyles.BOLD, I18n.format("almura.menu.about.titles"), TextStyles.RESET, TextColors.RESET, Text.NEW_LINE, titles)));
});
final UIButton doneButton = new UIButtonBuilder(this).text(I18n.format("gui.done")).size(98, 20).position(0, -15, 1).anchor(Anchor.BOTTOM | Anchor.CENTER).listener(this).build("button.done");
this.textField = new UITextField(this, "", true);
this.textField.setPosition(BasicScreen.getPaddedX(this.list, 4), 0);
this.textField.setEditable(false);
this.textField.setFontOptions(FontOptions.builder().from(FontColors.WHITE_FO).shadow(false).build());
this.list.setItemComponentFactory(AboutItemComponent::new);
this.list.setItems(elementDataList);
this.list.setSelectConsumer(i -> this.textField.setText(TextSerializers.LEGACY_FORMATTING_CODE.serialize(i.getContent())));
this.list.setSelectedItem(elementDataList.get(0));
this.getContainer().add(this.list, this.textField);
// SpongeForge
final UILabel spongeForgeVersionLabel = new UILabel(this, TextFormatting.WHITE + "SpongeForge: " + ((Optional<String>) Sponge.getPlatform().asMap().get("ImplementationVersion")).orElse("dev"));
spongeForgeVersionLabel.setPosition(4, -24, Anchor.LEFT | Anchor.BOTTOM);
// Forge
final PluginContainer forgeContainer = Sponge.getPluginManager().getPlugin("Forge").orElseThrow(NullPointerException::new);
final UILabel forgeVersionLabel = new UILabel(this, TextFormatting.WHITE + "Forge: " + forgeContainer.getVersion().orElse("dev"));
forgeVersionLabel.setPosition(4, -14, Anchor.LEFT | Anchor.BOTTOM);
addToScreen(forgeVersionLabel);
// Almura
final PluginContainer almuraContainer = Sponge.getPluginManager().getPlugin("almura").orElseThrow(NullPointerException::new);
final UILabel almuraVersionLabel = new UILabel(this, TextFormatting.WHITE + "Almura 3.1 - " + Almura.buildNumber);
almuraVersionLabel.setPosition(4, -4, Anchor.LEFT | Anchor.BOTTOM);
addToScreen(almuraVersionLabel);
addToScreen(doneButton);
addToScreen(spongeForgeVersionLabel);
}
use of net.malisis.core.client.gui.GuiTexture in project Almura by AlmuraDev.
the class DisconnectedGui method construct.
@Override
public void construct() {
this.guiscreenBackground = true;
Keyboard.enableRepeatEvents(true);
this.form = new BasicForm(this, 350, 140, "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.DEAD_STEVE), null);
almuraHeader.setSize(59, 59);
almuraHeader.setPosition(0, 5, Anchor.TOP | Anchor.CENTER);
this.messageLabel = new UILabel(this, "Disconnected from Server");
this.messageLabel.setFontOptions(FontOptions.builder().from(FontColors.WHITE_FO).shadow(true).scale(1.1F).build());
this.messageLabel.setPosition(0, almuraHeader.getHeight() + 5, Anchor.CENTER | Anchor.TOP);
final UISeparator belowLabelSeparator = new UISeparator(this);
belowLabelSeparator.setSize(this.form.getWidth() - 5, 1);
belowLabelSeparator.setPosition(0, this.messageLabel.getY() + 10, Anchor.CENTER | Anchor.TOP);
this.form.add(belowLabelSeparator);
this.reasonBox = new BasicTextBox(this, "Unknown Reason", true);
this.reasonBox.setAlpha(0);
this.reasonBox.setFontOptions(FontOptions.builder().from(FontColors.WHITE_FO).shadow(true).scale(0.7F).build());
this.reasonBox.setPosition(0, this.messageLabel.getY() + 14, Anchor.CENTER | Anchor.TOP);
this.reasonBox.setOptions(16238795, 0, 0);
this.reasonBox.setSize(this.form.getWidth() - 5, 15);
if (reason.length() > 0) {
this.reasonBox.setText(reason);
}
for (int i = 0; i < 4; i++) {
if (this.reasonBox.getScrollbar().isEnabled()) {
this.reasonBox.setSize(this.reasonBox.getWidth(), this.reasonBox.getHeight() + 15);
this.form.setSize(this.form.getWidth(), this.form.getHeight() + 15);
}
}
this.reasonBox.getScrollbar().autoHide = true;
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).position(0, -1).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.messageLabel, this.reasonBox, this.buttonClose);
addToScreen(this.form);
}
use of net.malisis.core.client.gui.GuiTexture in project Almura by AlmuraDev.
the class MembershipGui method construct.
@Override
public void construct() {
this.guiscreenBackground = true;
Keyboard.enableRepeatEvents(true);
this.form = new BasicForm(this, 310, 250, "Almura Memberships");
this.form.setAnchor(Anchor.CENTER | Anchor.MIDDLE);
this.form.setMovable(true);
this.form.setClosable(true);
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);
final BasicForm citizenArea = new BasicForm(this, 100, 200, "");
citizenArea.setPosition(0, 0, Anchor.LEFT | Anchor.TOP);
citizenArea.setMovable(false);
citizenArea.setClosable(false);
citizenArea.setBorder(FontColors.WHITE, 1, 185);
citizenArea.setBackgroundAlpha(215);
citizenArea.setBottomPadding(3);
citizenArea.setRightPadding(3);
citizenArea.setTopPadding(3);
citizenArea.setLeftPadding(3);
final UIImage citizenLogo = new UIImage(this, new GuiTexture(GuiConfig.Location.citizen_logo), null);
citizenLogo.setSize(99, 99);
citizenLogo.setPosition(0, -3, Anchor.TOP | Anchor.CENTER);
this.citizen_details_button = new UIButtonBuilder(this).fontOptions(FontOptions.builder().from(FontColors.WHITE_FO).shadow(true).scale(0.8F).build()).hoverFontOptions(FontOptions.builder().from(FontColors.WHITE_FO).shadow(true).scale(0.8F).build()).width(40).anchor(Anchor.TOP | Anchor.CENTER).position(0, citizenLogo.getY() + 100).text("Details").listener(this).enabled(true).build("button.citizen_details");
final UILabel citizenLabel0 = new UILabel(this, "Chose One");
citizenLabel0.setFontOptions(FontOptions.builder().from(FontColors.WHITE_FO).underline(true).shadow(true).scale(0.8F).build());
citizenLabel0.setPosition(0, 125, Anchor.CENTER | Anchor.TOP);
this.citizen_donation_button = new UIButtonBuilder(this).fontOptions(FontOptions.builder().from(FontColors.WHITE_FO).shadow(true).scale(0.8F).build()).hoverFontOptions(FontOptions.builder().from(FontColors.WHITE_FO).shadow(true).scale(0.8F).build()).width(40).anchor(Anchor.TOP | Anchor.CENTER).position(0, citizenLabel0.getY() + 10).text("$25.00 Donation").listener(this).enabled(currentMembershipLevel == 0).build("button.citizen_donation");
this.citizen_purchase_button = new UIButtonBuilder(this).fontOptions(FontOptions.builder().from(FontColors.WHITE_FO).shadow(true).scale(0.8F).build()).hoverFontOptions(FontOptions.builder().from(FontColors.WHITE_FO).shadow(true).scale(0.8F).build()).width(40).anchor(Anchor.TOP | Anchor.CENTER).position(0, citizen_donation_button.getY() + 18).text("$2.5 million in-game").listener(this).enabled(availableFunds >= 2500000 && currentMembershipLevel == 0).build("button.citizen_purchase");
this.citizen_skills_button = new UIButtonBuilder(this).fontOptions(FontOptions.builder().from(FontColors.WHITE_FO).shadow(true).scale(0.8F).build()).hoverFontOptions(FontOptions.builder().from(FontColors.WHITE_FO).shadow(true).scale(0.8F).build()).width(40).anchor(Anchor.TOP | Anchor.CENTER).position(0, citizen_purchase_button.getY() + 18).text("Skills total at 250+").listener(this).enabled(skillsLevel >= 250 && currentMembershipLevel == 0).build("button.citizen_skills");
citizenArea.add(citizenLogo, citizen_details_button, citizenLabel0, citizen_donation_button, citizen_skills_button, citizen_purchase_button);
final BasicForm explorerArea = new BasicForm(this, 100, 200, "");
explorerArea.setPosition(0, 0, Anchor.CENTER | Anchor.TOP);
explorerArea.setMovable(false);
explorerArea.setClosable(false);
explorerArea.setBorder(FontColors.WHITE, 1, 185);
explorerArea.setBackgroundAlpha(215);
explorerArea.setBottomPadding(3);
explorerArea.setRightPadding(3);
explorerArea.setTopPadding(3);
explorerArea.setLeftPadding(3);
final UIImage explorerLogo = new UIImage(this, new GuiTexture(GuiConfig.Location.explorer_logo), null);
explorerLogo.setSize(99, 99);
explorerLogo.setPosition(0, -3, Anchor.TOP | Anchor.CENTER);
this.explorer_details_button = new UIButtonBuilder(this).fontOptions(FontOptions.builder().from(FontColors.WHITE_FO).shadow(true).scale(0.8F).build()).hoverFontOptions(FontOptions.builder().from(FontColors.WHITE_FO).shadow(true).scale(0.8F).build()).width(40).anchor(Anchor.TOP | Anchor.CENTER).position(0, explorerLogo.getY() + 100).text("Details").listener(this).enabled(true).build("button.explorer_details");
final UILabel explorerLabel0 = new UILabel(this, "Chose One");
explorerLabel0.setFontOptions(FontOptions.builder().from(FontColors.WHITE_FO).underline(true).shadow(true).scale(0.8F).build());
explorerLabel0.setPosition(0, 125, Anchor.CENTER | Anchor.TOP);
this.explorer_donation_button = new UIButtonBuilder(this).fontOptions(FontOptions.builder().from(FontColors.WHITE_FO).shadow(true).scale(0.8F).build()).hoverFontOptions(FontOptions.builder().from(FontColors.WHITE_FO).shadow(true).scale(0.8F).build()).width(40).anchor(Anchor.TOP | Anchor.CENTER).position(0, explorerLabel0.getY() + 10).text("$50.00 Donation").listener(this).enabled(currentMembershipLevel == 0 || currentMembershipLevel == 1).build("button.explorer_donation");
this.explorer_purchase_button = new UIButtonBuilder(this).fontOptions(FontOptions.builder().from(FontColors.WHITE_FO).shadow(true).scale(0.8F).build()).hoverFontOptions(FontOptions.builder().from(FontColors.WHITE_FO).shadow(true).scale(0.8F).build()).width(40).anchor(Anchor.TOP | Anchor.CENTER).position(0, explorer_donation_button.getY() + 18).text("$5 million in-game").listener(this).enabled(availableFunds >= 5000000 && (currentMembershipLevel == 0 || currentMembershipLevel == 1)).build("button.explorer_purchase");
this.explorer_skills_button = new UIButtonBuilder(this).fontOptions(FontOptions.builder().from(FontColors.WHITE_FO).shadow(true).scale(0.8F).build()).hoverFontOptions(FontOptions.builder().from(FontColors.WHITE_FO).shadow(true).scale(0.8F).build()).width(40).anchor(Anchor.TOP | Anchor.CENTER).position(0, explorer_purchase_button.getY() + 18).text("Skills total at 375+").listener(this).enabled(skillsLevel >= 375 && (currentMembershipLevel == 0 || currentMembershipLevel == 1)).build("button.explorer_skills");
explorerArea.add(explorerLogo, explorer_details_button, explorerLabel0, explorer_donation_button, explorer_skills_button, explorer_purchase_button);
final BasicForm pioneerArea = new BasicForm(this, 100, 200, "");
pioneerArea.setPosition(0, 0, Anchor.RIGHT | Anchor.TOP);
pioneerArea.setMovable(false);
pioneerArea.setClosable(false);
pioneerArea.setBorder(FontColors.WHITE, 1, 185);
pioneerArea.setBackgroundAlpha(215);
pioneerArea.setBottomPadding(3);
pioneerArea.setRightPadding(3);
pioneerArea.setTopPadding(3);
pioneerArea.setLeftPadding(3);
final UIImage pioneerLogo = new UIImage(this, new GuiTexture(GuiConfig.Location.pioneer_logo), null);
pioneerLogo.setSize(99, 99);
pioneerLogo.setPosition(0, -3, Anchor.TOP | Anchor.CENTER);
this.pioneer_details_button = new UIButtonBuilder(this).fontOptions(FontOptions.builder().from(FontColors.WHITE_FO).shadow(true).scale(0.8F).build()).hoverFontOptions(FontOptions.builder().from(FontColors.WHITE_FO).shadow(true).scale(0.8F).build()).width(40).anchor(Anchor.TOP | Anchor.CENTER).position(0, pioneerLogo.getY() + 100).text("Details").listener(this).enabled(true).build("button.pioneer_details");
final UILabel pioneerLabel0 = new UILabel(this, "Chose One");
pioneerLabel0.setFontOptions(FontOptions.builder().from(FontColors.WHITE_FO).underline(true).shadow(true).scale(0.8F).build());
pioneerLabel0.setPosition(0, 125, Anchor.CENTER | Anchor.TOP);
this.pioneer_donation_button = new UIButtonBuilder(this).fontOptions(FontOptions.builder().from(FontColors.WHITE_FO).shadow(true).scale(0.8F).build()).hoverFontOptions(FontOptions.builder().from(FontColors.WHITE_FO).shadow(true).scale(0.8F).build()).width(40).anchor(Anchor.TOP | Anchor.CENTER).position(0, pioneerLabel0.getY() + 10).text("$100.00 Donation").tooltip("Hi").listener(this).enabled(currentMembershipLevel == 0 || currentMembershipLevel == 1 || currentMembershipLevel == 2).build("button.pioneer_donation");
this.pioneer_purchase_button = new UIButtonBuilder(this).fontOptions(FontOptions.builder().from(FontColors.WHITE_FO).shadow(true).scale(0.8F).build()).hoverFontOptions(FontOptions.builder().from(FontColors.WHITE_FO).shadow(true).scale(0.8F).build()).width(40).anchor(Anchor.TOP | Anchor.CENTER).position(0, pioneer_donation_button.getY() + 18).text("$10 million in-game").listener(this).enabled(availableFunds >= 10000000 && (currentMembershipLevel == 0 || currentMembershipLevel == 1 || currentMembershipLevel == 2)).build("button.pioneer_purchase");
this.pioneer_skills_button = new UIButtonBuilder(this).fontOptions(FontOptions.builder().from(FontColors.WHITE_FO).shadow(true).scale(0.8F).build()).hoverFontOptions(FontOptions.builder().from(FontColors.WHITE_FO).shadow(true).scale(0.8F).build()).width(40).anchor(Anchor.TOP | Anchor.CENTER).position(0, pioneer_purchase_button.getY() + 18).text("Skills total at 400+").listener(this).enabled(skillsLevel >= 400 && (currentMembershipLevel == 0 || currentMembershipLevel == 1 || currentMembershipLevel == 2)).build("button.pioneer_skills");
pioneerArea.add(pioneerLogo, pioneer_details_button, pioneerLabel0, pioneer_donation_button, pioneer_skills_button, pioneer_purchase_button);
final UILabel skillsLabel = new UILabel(this, "Current Skills Total: ");
skillsLabel.setFontOptions(FontOptions.builder().from(FontColors.WHITE_FO).shadow(true).scale(0.8F).build());
skillsLabel.setPosition(10, -5, Anchor.LEFT | Anchor.BOTTOM);
final UILabel skillsLevelLabel = new UILabel(this, "" + skillsLevel);
skillsLevelLabel.setFontOptions(FontOptions.builder().from(FontColors.BLUE_FO).shadow(true).scale(0.8F).build());
skillsLevelLabel.setPosition(skillsLabel.getX() + skillsLabel.getWidth(), -5, Anchor.LEFT | Anchor.BOTTOM);
final UISeparator topWindowTitleSeparator = new UISeparator(this);
topWindowTitleSeparator.setSize(this.form.getWidth(), 1);
topWindowTitleSeparator.setPosition(0, -5, Anchor.TOP | Anchor.CENTER);
this.form.add(topWindowTitleSeparator);
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);
this.buttonClose = new UIButtonBuilder(this).width(40).anchor(Anchor.BOTTOM | Anchor.RIGHT).text(I18n.format("almura.menu_button.close")).listener(this).build("button.close");
this.form.add(citizenArea, explorerArea, pioneerArea, skillsLabel, skillsLevelLabel, this.buttonClose);
addToScreen(this.form);
}
Aggregations