protected void actionPerformed(GuiButton par1GuiButton) throws IOException { if (par1GuiButton.enabled) { int var2 = this.guiGameSettings.guiScale; if (par1GuiButton.id < 200 && par1GuiButton instanceof GuiOptionButton) { this.guiGameSettings.setOptionValue( ((GuiOptionButton) par1GuiButton).returnEnumOptions(), 1); par1GuiButton.displayString = this.guiGameSettings.getKeyBinding( GameSettings.Options.getEnumOptions(par1GuiButton.id)); } if (par1GuiButton.id == 200) { this.mc.gameSettings.saveOptions(); this.mc.displayGuiScreen(this.parentGuiScreen); } if (this.guiGameSettings.guiScale != var2) { ScaledResolution scr = new ScaledResolution(this.mc, this.mc.displayWidth, this.mc.displayHeight); int var4 = scr.getScaledWidth(); int var5 = scr.getScaledHeight(); this.setWorldAndResolution(this.mc, var4, var5); } if (par1GuiButton.id == 201) { this.mc.gameSettings.saveOptions(); GuiDetailSettingsOF scr1 = new GuiDetailSettingsOF(this, this.guiGameSettings); this.mc.displayGuiScreen(scr1); } if (par1GuiButton.id == 202) { this.mc.gameSettings.saveOptions(); GuiQualitySettingsOF scr2 = new GuiQualitySettingsOF(this, this.guiGameSettings); this.mc.displayGuiScreen(scr2); } if (par1GuiButton.id == 211) { this.mc.gameSettings.saveOptions(); GuiAnimationSettingsOF scr3 = new GuiAnimationSettingsOF(this, this.guiGameSettings); this.mc.displayGuiScreen(scr3); } if (par1GuiButton.id == 212) { this.mc.gameSettings.saveOptions(); GuiPerformanceSettingsOF scr4 = new GuiPerformanceSettingsOF(this, this.guiGameSettings); this.mc.displayGuiScreen(scr4); } if (par1GuiButton.id == 222) { this.mc.gameSettings.saveOptions(); GuiOtherSettingsOF scr5 = new GuiOtherSettingsOF(this, this.guiGameSettings); this.mc.displayGuiScreen(scr5); } if (par1GuiButton.id == GameSettings.Options.AO_LEVEL.ordinal()) { return; } } }
protected void actionPerformed(GuiButton p_146284_1_) { if (p_146284_1_.enabled) { if (p_146284_1_.id < 100 && p_146284_1_ instanceof GuiOptionButton) { GameSettings.Options options = ((GuiOptionButton) p_146284_1_).returnEnumOptions(); this.field_152318_h.setOptionValue(options, 1); p_146284_1_.displayString = this.field_152318_h.getKeyBinding(GameSettings.Options.getEnumOptions(p_146284_1_.id)); if (this.mc.func_152346_Z().func_152934_n() && options != GameSettings.Options.STREAM_CHAT_ENABLED && options != GameSettings.Options.STREAM_CHAT_USER_FILTER) { this.field_152315_t = true; } } else if (p_146284_1_ instanceof GuiOptionSlider) { if (p_146284_1_.id == GameSettings.Options.STREAM_VOLUME_MIC.returnEnumOrdinal()) { this.mc.func_152346_Z().func_152915_s(); } else if (p_146284_1_.id == GameSettings.Options.STREAM_VOLUME_SYSTEM.returnEnumOrdinal()) { this.mc.func_152346_Z().func_152915_s(); } else if (this.mc.func_152346_Z().func_152934_n()) { this.field_152315_t = true; } } if (p_146284_1_.id == 200) { this.mc.gameSettings.saveOptions(); this.mc.displayGuiScreen(this.field_152317_g); } else if (p_146284_1_.id == 201) { this.mc.gameSettings.saveOptions(); this.mc.displayGuiScreen(new GuiIngestServers(this)); } } }
/** Called by the controls from the buttonList when activated. (Mouse pressed for buttons) */ protected void actionPerformed(GuiButton button) throws IOException { if (button.enabled) { if (button.id < 100 && button instanceof GuiOptionButton) { GameSettings.Options gamesettings$options = ((GuiOptionButton) button).returnEnumOptions(); this.field_152318_h.setOptionValue(gamesettings$options, 1); button.displayString = this.field_152318_h.getKeyBinding(GameSettings.Options.getEnumOptions(button.id)); if (this.mc.getTwitchStream().isBroadcasting() && gamesettings$options != GameSettings.Options.STREAM_CHAT_ENABLED && gamesettings$options != GameSettings.Options.STREAM_CHAT_USER_FILTER) { this.field_152315_t = true; } } else if (button instanceof GuiOptionSlider) { if (button.id == GameSettings.Options.STREAM_VOLUME_MIC.returnEnumOrdinal()) { this.mc.getTwitchStream().updateStreamVolume(); } else if (button.id == GameSettings.Options.STREAM_VOLUME_SYSTEM.returnEnumOrdinal()) { this.mc.getTwitchStream().updateStreamVolume(); } else if (this.mc.getTwitchStream().isBroadcasting()) { this.field_152315_t = true; } } if (button.id == 200) { this.mc.gameSettings.saveOptions(); this.mc.displayGuiScreen(this.parentScreen); } else if (button.id == 201) { this.mc.gameSettings.saveOptions(); this.mc.displayGuiScreen(new GuiIngestServers(this)); } } }