net.minecraft.client.gui.GuiOptionButton Java Examples
The following examples show how to use
net.minecraft.client.gui.GuiOptionButton.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: GuiCrashScreen.java From VanillaFix with MIT License | 5 votes |
@Override public void initGui() { super.initGui(); GuiOptionButton mainMenuButton = new GuiOptionButton(0, width / 2 - 155, height / 4 + 120 + 12, I18n.format("gui.toTitle")); buttonList.add(mainMenuButton); if (ModConfig.crashes.disableReturnToMainMenu) { mainMenuButton.enabled = false; mainMenuButton.displayString = I18n.format("vanillafix.gui.disabledByConfig"); } }
Example #2
Source File: GuiCommunityConfig.java From CommunityMod with GNU Lesser General Public License v2.1 | 4 votes |
@Override public void initGui() { // buttonList.add(new GuiOptionButton(2, width / 2 - 154, height - 48, I18n.format("resourcePack.openFolder"))); buttonList.add(new GuiOptionButton(1, width / 2 + 4, height - 48, I18n.format("gui.done"))); if (!changed) { availableSubMods = new ArrayList<>(); selectedSubMods = new ArrayList<>(); Collection<SubModContainer> mods = SubModLoader.getSubMods(); mods = mods.stream().sorted(Comparator.comparing(SubModContainer::getName)).collect(Collectors.toList()); for (SubModContainer container : mods) { boolean flag = CommunityMod.getConfig().isSubModEnabled(container); SubModListEntry entry = new SubModListEntry(this, container); if (flag != SubModLoader.isSubModLoaded(container.getSubMod())) { requiresRestart.add(entry); } if (flag) { selectedSubMods.add(entry); } else { availableSubMods.add(entry); } } } availableSubModsList = new GuiSubModList(mc, 200, height, availableSubMods, "Available Submods"); availableSubModsList.setSlotXBoundsFromLeft(width / 2 - 4 - 200); availableSubModsList.registerScrollButtons(7, 8); selectedSubModsList = new GuiSubModList(mc, 200, height, selectedSubMods, "Selected Submods"); selectedSubModsList.setSlotXBoundsFromLeft(width / 2 + 4); selectedSubModsList.registerScrollButtons(7, 8); }
Example #3
Source File: GuiItemTransfer.java From qcraft-mod with Apache License 2.0 | 4 votes |
@Override public void initGui() { this.buttonList.add( new GuiOptionButton(0, this.width / 2 - 155, this.height / 6 + 96, I18n.format( "gui.yes" )) ); this.buttonList.add( new GuiOptionButton(1, this.width / 2 - 155 + 160, this.height / 6 + 96, I18n.format( "gui.no" )) ); }