/** Draws the screen and all the components in it. */ public void drawScreen(int par1, int par2, float par3) { StringTranslate var4 = StringTranslate.getInstance(); this.drawDefaultBackground(); this.drawCenteredString( this.fontRenderer, var4.translateKey("mco.configure.world.subscription.title"), this.width / 2, 17, 16777215); this.drawString( this.fontRenderer, var4.translateKey("mco.configure.world.subscription.start"), this.width / 2 - 100, 53, 10526880); this.drawString(this.fontRenderer, this.field_98069_o, this.width / 2 - 100, 66, 16777215); this.drawString( this.fontRenderer, var4.translateKey("mco.configure.world.subscription.daysleft"), this.width / 2 - 100, 85, 10526880); this.drawString( this.fontRenderer, String.valueOf(this.field_98068_n), this.width / 2 - 100, 98, 16777215); super.drawScreen(par1, par2, par3); }
public void initGui() { StringTranslate stringtranslate = StringTranslate.getInstance(); field_22107_a = stringtranslate.translateKey("options.videoTitle"); int i = 0; EnumOptions aenumoptions[] = field_22108_k; int j = aenumoptions.length; for (int k = 0; k < j; k++) { EnumOptions enumoptions = aenumoptions[k]; if (!enumoptions.getEnumFloat()) { controlList.add( new GuiSmallButton( enumoptions.returnEnumOrdinal(), (width / 2 - 155) + (i % 2) * 160, height / 6 + 24 * (i >> 1), enumoptions, guiGameSettings.getKeyBinding(enumoptions))); } else { controlList.add( new GuiSlider( enumoptions.returnEnumOrdinal(), (width / 2 - 155) + (i % 2) * 160, height / 6 + 24 * (i >> 1), enumoptions, guiGameSettings.getKeyBinding(enumoptions), guiGameSettings.getOptionFloatValue(enumoptions))); } i++; } controlList.add( new GuiButton( 200, width / 2 - 100, height / 6 + 168, stringtranslate.translateKey("gui.done"))); }
/** * Returns the translation of the given index in the given String array. If the index is smaller * than 0 or greater than/equal to the length of the String array, it is changed to 0. */ private static String getTranslation(String[] par0ArrayOfStr, int par1) { if (par1 < 0 || par1 >= par0ArrayOfStr.length) { par1 = 0; } StringTranslate var2 = StringTranslate.getInstance(); return var2.translateKey(par0ArrayOfStr[par1]); }
/** Adds the buttons (and other controls) to the screen in question. */ public void initGui() { this.func_98063_a(this.field_98065_b.field_96408_a); StringTranslate var1 = StringTranslate.getInstance(); Keyboard.enableRepeatEvents(true); this.buttonList.add( new GuiButton( 0, this.width / 2 - 100, this.height / 4 + 120 + 12, var1.translateKey("gui.cancel"))); }
private static String func_74299_a(String[] p_74299_0_, int p_74299_1_) { if (p_74299_1_ < 0 || p_74299_1_ >= p_74299_0_.length) { p_74299_1_ = 0; } StringTranslate var2 = StringTranslate.func_74808_a(); return var2.func_74805_b(p_74299_0_[p_74299_1_]); }
private static String func_48571_a(String par0ArrayOfStr[], int par1) { if (par1 < 0 || par1 >= par0ArrayOfStr.length) { par1 = 0; } StringTranslate stringtranslate = StringTranslate.getInstance(); return stringtranslate.translateKey(par0ArrayOfStr[par1]); }
public void initGui() { StringTranslate var1 = StringTranslate.getInstance(); this.controlList.clear(); this.controlList.add( new GuiButton( 0, this.width / 2 - 100, this.height / 4 + 120 + 12, var1.translateKey("Back to server list"))); // Spout }
/** the element in the slot that was clicked, boolean for wether it was double clicked or not */ protected void elementClicked(int par1, boolean par2) { StringTranslate.getInstance().setLanguage((String) this.field_77251_g.get(par1), false); this.languageGui.mc.fontRenderer.setUnicodeFlag(StringTranslate.getInstance().isUnicode()); GuiLanguage.getGameSettings(this.languageGui).language = (String) this.field_77251_g.get(par1); this.languageGui.fontRenderer.setBidiFlag( StringTranslate.isBidirectional(GuiLanguage.getGameSettings(this.languageGui).language)); GuiLanguage.getDoneButton(this.languageGui).displayString = StringTranslate.getInstance().translateKey("gui.done"); GuiLanguage.getGameSettings(this.languageGui).saveOptions(); }
public void func_571_a(int p_571_1_, int p_571_2_, float p_571_3_) { func_579_b(0); StringTranslate stringtranslate = StringTranslate.func_20162_a(); func_548_a( field_6451_g, stringtranslate.func_20163_a("multiplayer.downloadingTerrain"), field_951_c / 2, field_950_d / 2 - 50, 0xffffff); super.func_571_a(p_571_1_, p_571_2_, p_571_3_); }
/** * Adds Singleplayer and Multiplayer buttons on Main Menu for players who have bought the game. */ private void addSingleplayerMultiplayerButtons( int par1, int par2, StringTranslate par3StringTranslate) { this.buttonList.add( new GuiButton( 1, this.width / 2 - 100, par1, par3StringTranslate.translateKey("menu.singleplayer"))); this.buttonList.add( new GuiButton( 2, this.width / 2 - 100, par1 + par2 * 1, par3StringTranslate.translateKey("menu.multiplayer"))); }
public void initGui() { synchronized (serverInfo) { this.serverInfo.status = "Done"; } StringTranslate var1 = StringTranslate.getInstance(); this.screenTitle = var1.translateKey("Select server"); this.field_22098_o = var1.translateKey("Unknown"); this.field_22097_p = var1.translateKey("aaa"); this.loadSaves(); this.worldSlotContainer = new GuiServerSlot(this); this.worldSlotContainer.registerScrollButtons(this.controlList, 4, 5); this.initButtons(); }
public GuiConnectFailed(String var1, String var2, Object... var3) { StringTranslate var4 = StringTranslate.getInstance(); this.errorMessage = var4.translateKey(var1); if (var3 != null) { this.errorDetail = var4.translateKeyFormat(var2, var3); } else { this.errorDetail = var4.translateKey(var2); } // Spout Start ReconnectManager.detectKick(var1, var2, var3); // Spout End }
/** returns the name of the saved game */ protected String getSaveName(int par1) { String s = ((SaveFormatComparator) saveList.get(par1)).getDisplayName(); if (s == null || MathHelper.stringNullOrLengthZero(s)) { StringTranslate stringtranslate = StringTranslate.getInstance(); s = (new StringBuilder()) .append(stringtranslate.translateKey("selectWorld.world")) .append(" ") .append(par1 + 1) .toString(); } return s; }
public void initGui() { StringTranslate stringtranslate = StringTranslate.getInstance(); controlList.add( new GuiSmallButton( 5, width / 2 - 154, height - 48, stringtranslate.translateKey("texturePack.openFolder"))); controlList.add( new GuiSmallButton( 6, width / 2 + 4, height - 48, stringtranslate.translateKey("gui.done"))); mc.texturePackList.updateAvaliableTexturePacks(); fileLocation = (new File(Minecraft.getMinecraftDir(), "texturepacks")).getAbsolutePath(); guiTexturePackSlot = new GuiTexturePackSlot(this); guiTexturePackSlot.registerScrollButtons(controlList, 7, 8); }
@Override /** Adds the buttons (and other controls) to the screen in question. */ public void initGui() { for (ModContainer mod : mods) { listWidth = Math.max(listWidth, getFontRenderer().getStringWidth(mod.getName()) + 10); listWidth = Math.max(listWidth, getFontRenderer().getStringWidth(mod.getVersion()) + 10); } listWidth = Math.min(listWidth, 150); StringTranslate translations = StringTranslate.getInstance(); this.controlList.add( new GuiSmallButton( 6, this.width / 2 - 75, this.height - 38, translations.translateKey("gui.done"))); this.modList = new GuiSlotModList(this, mods, listWidth); this.modList.registerScrollButtons(this.controlList, 7, 8); }
public void func_73863_a(int p_73863_1_, int p_73863_2_, float p_73863_3_) { this.field_74032_v = null; StringTranslate var4 = StringTranslate.func_74808_a(); this.func_73873_v_(); this.field_74022_d.func_77211_a(p_73863_1_, p_73863_2_, p_73863_3_); this.func_73732_a( this.field_73886_k, var4.func_74805_b("multiplayer.title"), this.field_73880_f / 2, 20, 16777215); super.func_73863_a(p_73863_1_, p_73863_2_, p_73863_3_); if (this.field_74032_v != null) { this.func_74007_a(this.field_74032_v, p_73863_1_, p_73863_2_); } }
public void func_73866_w_() { StringTranslate var1 = StringTranslate.func_74808_a(); this.field_73887_h.add( new GuiSmallButton( 5, this.field_73880_f / 2 - 154, this.field_73881_g - 48, var1.func_74805_b("texturePack.openFolder"))); this.field_73887_h.add( new GuiSmallButton( 6, this.field_73880_f / 2 + 4, this.field_73881_g - 48, var1.func_74805_b("gui.done"))); this.field_73882_e.field_71418_C.func_77305_c(); this.field_73966_c = (new File(Minecraft.func_71380_b(), "texturepacks")).getAbsolutePath(); this.field_73964_d = new GuiTexturePackSlot(this); this.field_73964_d.func_77220_a(this.field_73887_h, 7, 8); }
private void func_98060_b(StringTranslate par1StringTranslate, int par2, int par3) { this.buttonList.add( new GuiButton( 3, this.width / 2 - 100, par2 + par3 * 2, par1StringTranslate.translateKey("menu.online"))); }
public void drawScreen(int i, int j, float f) { guiTexturePackSlot.drawScreen(i, j, f); if (field_6454_o <= 0) { mc.texturePackList.updateAvaliableTexturePacks(); field_6454_o += 20; } StringTranslate stringtranslate = StringTranslate.getInstance(); drawCenteredString( fontRenderer, stringtranslate.translateKey("texturePack.title"), width / 2, 16, 0xffffff); drawCenteredString( fontRenderer, stringtranslate.translateKey("texturePack.folderInfo"), width / 2 - 77, height - 26, 0x808080); super.drawScreen(i, j, f); }
/** Adds the buttons (and other controls) to the screen in question. */ public void initGui() { StringTranslate var1 = StringTranslate.getInstance(); this.buttonList.add( new GuiFancyButton( 5, this.width / 2 - 74, this.height - 48, var1.translateKey("texturePack.openFolder"), 3)); this.buttonList.add( new GuiFancyButton( 6, this.width / 2 + 74, this.height - 48, var1.translateKey("gui.done"), 3)); this.mc.texturePackList.updateAvaliableTexturePacks(); this.fileLocation = (new File(Minecraft.getMinecraftDir(), "texturepacks")).getAbsolutePath(); this.guiTexturePackSlot = new GuiFancyTexturePackSlot(this); this.guiTexturePackSlot.registerScrollButtons(this.buttonList, 7, 8); bg = new GuiFancyRotatingBackground(mc, width, height, zLevel); }
private void func_73972_b(int par1, int par2, StringTranslate par3StringTranslate) { this.controlList.add( new GuiButton( 11, this.width / 2 - 100, par1, par3StringTranslate.translateKey("menu.playdemo"))); this.controlList.add( this.field_73973_d = new GuiButton( 12, this.width / 2 - 100, par1 + par2 * 1, par3StringTranslate.translateKey("menu.resetdemo"))); ISaveFormat var4 = this.mc.getSaveLoader(); WorldInfo var5 = var4.getWorldInfo("Demo_World"); if (var5 == null) { this.field_73973_d.enabled = false; } }
/** Adds Demo buttons on Main Menu for players who are playing Demo. */ private void addDemoButtons(int par1, int par2, StringTranslate par3StringTranslate) { this.buttonList.add( new GuiButton( 11, this.width / 2 - 100, par1, par3StringTranslate.translateKey("menu.playdemo"))); this.buttonList.add( this.buttonResetDemo = new GuiButton( 12, this.width / 2 - 100, par1 + par2 * 1, par3StringTranslate.translateKey("menu.resetdemo"))); ISaveFormat var4 = this.mc.getSaveLoader(); WorldInfo var5 = var4.getWorldInfo("Demo_World"); if (var5 == null) { this.buttonResetDemo.enabled = false; } }
/** Draws the screen and all the components in it. */ public void drawScreen(int par1, int par2, float par3) { StringTranslate var4 = StringTranslate.getInstance(); this.drawDefaultBackground(); this.drawCenteredString( this.fontRenderer, var4.translateKey("selectServer.direct"), this.width / 2, this.height / 4 - 60 + 20, 16777215); this.drawString( this.fontRenderer, var4.translateKey("addServer.enterIp"), this.width / 2 - 100, 100, 10526880); this.serverTextField.drawTextBox(); super.drawScreen(par1, par2, par3); }
public void initGui() { StringTranslate stringtranslate = StringTranslate.getInstance(); int i = func_20080_j(); for (int j = 0; j < options.keyBindings.length; j++) { controlList.add( new GuiSmallButton( j, i + (j % 2) * 160, height / 6 + 24 * (j >> 1), 70, 20, options.getOptionDisplayString(j))); } controlList.add( new GuiButton( 200, width / 2 - 100, height / 6 + 168, stringtranslate.translateKey("gui.done"))); screenTitle = stringtranslate.translateKey("controls.title"); }
protected void drawSlot(int par1, int par2, int par3, int par4, Tessellator par5Tessellator) { this.languageGui.fontRenderer.setBidiFlag(true); this.languageGui.drawCenteredString( this.languageGui.fontRenderer, (String) this.field_77253_h.get(this.field_77251_g.get(par1)), this.languageGui.width / 2, par3 + 1, 16777215); this.languageGui.fontRenderer.setBidiFlag( StringTranslate.isBidirectional(GuiLanguage.getGameSettings(this.languageGui).language)); }
/** Draws the screen and all the components in it. */ public void drawScreen(int par1, int par2, float par3) { bg.RenderBackground(par1, par2, par3); this.guiTexturePackSlot.drawScreen(par1, par2, par3); if (this.refreshTimer <= 0) { this.mc.texturePackList.updateAvaliableTexturePacks(); this.refreshTimer += 20; } StringTranslate var4 = StringTranslate.getInstance(); this.drawCenteredString( this.fontRenderer, var4.translateKey("texturePack.title"), this.width / 2, 16, 16777215); this.drawCenteredString( this.fontRenderer, var4.translateKey("texturePack.folderInfo"), this.width / 2 - 77, this.height - 26, 8421504); super.drawScreen(par1, par2, par3); }
/** Adds the buttons (and other controls) to the screen in question. */ public void initGui() { StringTranslate var1 = StringTranslate.getInstance(); Keyboard.enableRepeatEvents(true); this.controlList.clear(); this.controlList.add( new GuiButton( 0, this.width / 2 - 100, this.height / 4 + 96 + 12, var1.translateKey("selectServer.select"))); this.controlList.add( new GuiButton( 1, this.width / 2 - 100, this.height / 4 + 120 + 12, var1.translateKey("gui.cancel"))); this.serverTextField = new GuiTextField(this.fontRenderer, this.width / 2 - 100, 116, 200, 20); this.serverTextField.setMaxStringLength(128); this.serverTextField.setFocused(true); this.serverTextField.setText(lastServerName); ((GuiButton) this.controlList.get(0)).enabled = this.serverTextField.getText().length() > 0 && this.serverTextField.getText().split(":").length > 0; }
/** Adds the buttons (and other controls) to the screen in question. */ public void initGui() { this.viewportTexture = this.mc.renderEngine.allocateAndSetupTexture(new BufferedImage(256, 256, 2)); Calendar var1 = Calendar.getInstance(); var1.setTime(new Date()); if (var1.get(2) + 1 == 11 && var1.get(5) == 9) { this.splashText = "Happy birthday, ez!"; } else if (var1.get(2) + 1 == 6 && var1.get(5) == 1) { this.splashText = "Happy birthday, Notch!"; } else if (var1.get(2) + 1 == 12 && var1.get(5) == 24) { this.splashText = "Merry X-mas!"; } else if (var1.get(2) + 1 == 1 && var1.get(5) == 1) { this.splashText = "Happy new year!"; } StringTranslate var2 = StringTranslate.getInstance(); int var4 = this.height / 4 + 48; if (this.mc.isDemo()) { this.func_73972_b(var4, 24, var2); } else { this.func_73969_a(var4, 24, var2); } if (this.mc.hideQuitButton) { this.controlList.add( new GuiButton(0, this.width / 2 - 100, var4 + 24, var2.translateKey("menu.options"))); } else { this.controlList.add( new GuiButton( 0, this.width / 2 - 100, var4 + 24 + 12, 98, 20, var2.translateKey("menu.options"))); this.controlList.add( new GuiButton( 4, this.width / 2 + 2, var4 + 24 + 12, 98, 20, var2.translateKey("menu.quit"))); } this.controlList.add(new GuiButtonLanguage(5, this.width / 2 - 124, var4 + 24 + 12)); }
public void func_73863_a(int p_73863_1_, int p_73863_2_, float p_73863_3_) { this.field_73964_d.func_77211_a(p_73863_1_, p_73863_2_, p_73863_3_); if (this.field_73965_b <= 0) { this.field_73882_e.field_71418_C.func_77305_c(); this.field_73965_b += 20; } StringTranslate var4 = StringTranslate.func_74808_a(); this.func_73732_a( this.field_73886_k, var4.func_74805_b("texturePack.title"), this.field_73880_f / 2, 16, 16777215); this.func_73732_a( this.field_73886_k, var4.func_74805_b("texturePack.folderInfo"), this.field_73880_f / 2 - 77, this.field_73881_g - 26, 8421504); super.func_73863_a(p_73863_1_, p_73863_2_, p_73863_3_); }
public GuiConfirmOpenLink(GuiScreen p_i3102_1_, String p_i3102_2_, int p_i3102_3_) { super( p_i3102_1_, StringTranslate.func_74808_a().func_74805_b("chat.link.confirm"), p_i3102_2_, p_i3102_3_); StringTranslate stringtranslate = StringTranslate.func_74808_a(); field_73941_c = stringtranslate.func_74805_b("gui.yes"); field_73939_d = stringtranslate.func_74805_b("gui.no"); field_73946_b = stringtranslate.func_74805_b("chat.copy"); field_73947_a = stringtranslate.func_74805_b("chat.link.warning"); }