/** Adds the buttons (and other controls) to the screen in question. */ public void initGui() { StringTranslate var1 = StringTranslate.getInstance(); int var2 = 0; EnumOptions[] var3 = enumOptions; int var4 = var3.length; for (int var5 = 0; var5 < var4; ++var5) { EnumOptions var6 = var3[var5]; int var7 = this.width / 2 - 155 + var2 % 2 * 160; int var8 = this.height / 6 + 21 * (var2 / 2) - 10; if (!var6.getEnumFloat()) { this.controlList.add( new GuiSmallButton( var6.returnEnumOrdinal(), var7, var8, var6, this.settings.getKeyBinding(var6))); } else { this.controlList.add( new GuiSlider( var6.returnEnumOrdinal(), var7, var8, var6, this.settings.getKeyBinding(var6), this.settings.getOptionFloatValue(var6))); } ++var2; } this.controlList.add( new GuiButton( 200, this.width / 2 - 100, this.height / 6 + 168 + 11, var1.translateKey("gui.done"))); }
/** Translates and formats the given string key with the given arguments. */ public String translateString(String par1Str, Object... par2ArrayOfObj) { return StringTranslate.getInstance().translateKeyFormat(par1Str, par2ArrayOfObj); }