Java 类net.minecraft.client.gui.GuiOptionSlider 实例源码

项目:BaseClient    文件:GuiQualitySettingsOF.java   
/**
 * Adds the buttons (and other controls) to the screen in question. Called when the GUI is displayed and when the
 * window resizes, the buttonList is cleared beforehand.
 */
public void initGui()
{
    int i = 0;

    for (GameSettings.Options gamesettings$options : enumOptions)
    {
        int j = this.width / 2 - 155 + i % 2 * 160;
        int k = this.height / 6 + 21 * (i / 2) - 10;

        if (!gamesettings$options.getEnumFloat())
        {
            this.buttonList.add(new GuiOptionButton(gamesettings$options.returnEnumOrdinal(), j, k, gamesettings$options, this.settings.getKeyBinding(gamesettings$options)));
        }
        else
        {
            this.buttonList.add(new GuiOptionSlider(gamesettings$options.returnEnumOrdinal(), j, k, gamesettings$options));
        }

        ++i;
    }

    this.buttonList.add(new GuiButton(200, this.width / 2 - 100, this.height / 6 + 168 + 11, I18n.format("gui.done", new Object[0])));
}
项目:BaseClient    文件:GuiDetailSettingsOF.java   
/**
 * Adds the buttons (and other controls) to the screen in question. Called when the GUI is displayed and when the
 * window resizes, the buttonList is cleared beforehand.
 */
public void initGui()
{
    int i = 0;

    for (GameSettings.Options gamesettings$options : enumOptions)
    {
        int j = this.width / 2 - 155 + i % 2 * 160;
        int k = this.height / 6 + 21 * (i / 2) - 10;

        if (!gamesettings$options.getEnumFloat())
        {
            this.buttonList.add(new GuiOptionButton(gamesettings$options.returnEnumOrdinal(), j, k, gamesettings$options, this.settings.getKeyBinding(gamesettings$options)));
        }
        else
        {
            this.buttonList.add(new GuiOptionSlider(gamesettings$options.returnEnumOrdinal(), j, k, gamesettings$options));
        }

        ++i;
    }

    this.buttonList.add(new GuiButton(200, this.width / 2 - 100, this.height / 6 + 168 + 11, I18n.format("gui.done", new Object[0])));
}
项目:BaseClient    文件:GuiAnimationSettingsOF.java   
/**
 * Adds the buttons (and other controls) to the screen in question. Called when the GUI is displayed and when the
 * window resizes, the buttonList is cleared beforehand.
 */
public void initGui()
{
    int i = 0;

    for (GameSettings.Options gamesettings$options : enumOptions)
    {
        int j = this.width / 2 - 155 + i % 2 * 160;
        int k = this.height / 6 + 21 * (i / 2) - 10;

        if (!gamesettings$options.getEnumFloat())
        {
            this.buttonList.add(new GuiOptionButton(gamesettings$options.returnEnumOrdinal(), j, k, gamesettings$options, this.settings.getKeyBinding(gamesettings$options)));
        }
        else
        {
            this.buttonList.add(new GuiOptionSlider(gamesettings$options.returnEnumOrdinal(), j, k, gamesettings$options));
        }

        ++i;
    }

    this.buttonList.add(new GuiButton(210, this.width / 2 - 155, this.height / 6 + 168 + 11, 70, 20, "All ON"));
    this.buttonList.add(new GuiButton(211, this.width / 2 - 155 + 80, this.height / 6 + 168 + 11, 70, 20, "All OFF"));
    this.buttonList.add(new GuiOptionButton(200, this.width / 2 + 5, this.height / 6 + 168 + 11, I18n.format("gui.done", new Object[0])));
}
项目:BaseClient    文件:GuiOtherSettingsOF.java   
/**
 * Adds the buttons (and other controls) to the screen in question. Called when the GUI is displayed and when the
 * window resizes, the buttonList is cleared beforehand.
 */
public void initGui()
{
    int i = 0;

    for (GameSettings.Options gamesettings$options : enumOptions)
    {
        int j = this.width / 2 - 155 + i % 2 * 160;
        int k = this.height / 6 + 21 * (i / 2) - 10;

        if (!gamesettings$options.getEnumFloat())
        {
            this.buttonList.add(new GuiOptionButton(gamesettings$options.returnEnumOrdinal(), j, k, gamesettings$options, this.settings.getKeyBinding(gamesettings$options)));
        }
        else
        {
            this.buttonList.add(new GuiOptionSlider(gamesettings$options.returnEnumOrdinal(), j, k, gamesettings$options));
        }

        ++i;
    }

    this.buttonList.add(new GuiButton(210, this.width / 2 - 100, this.height / 6 + 168 + 11 - 44, "Reset Video Settings..."));
    this.buttonList.add(new GuiButton(200, this.width / 2 - 100, this.height / 6 + 168 + 11, I18n.format("gui.done", new Object[0])));
}
项目:BaseClient    文件:GuiPerformanceSettingsOF.java   
/**
 * Adds the buttons (and other controls) to the screen in question. Called when the GUI is displayed and when the
 * window resizes, the buttonList is cleared beforehand.
 */
public void initGui()
{
    int i = 0;

    for (GameSettings.Options gamesettings$options : enumOptions)
    {
        int j = this.width / 2 - 155 + i % 2 * 160;
        int k = this.height / 6 + 21 * (i / 2) - 10;

        if (!gamesettings$options.getEnumFloat())
        {
            this.buttonList.add(new GuiOptionButton(gamesettings$options.returnEnumOrdinal(), j, k, gamesettings$options, this.settings.getKeyBinding(gamesettings$options)));
        }
        else
        {
            this.buttonList.add(new GuiOptionSlider(gamesettings$options.returnEnumOrdinal(), j, k, gamesettings$options));
        }

        ++i;
    }

    this.buttonList.add(new GuiButton(200, this.width / 2 - 100, this.height / 6 + 168 + 11, I18n.format("gui.done", new Object[0])));
}
项目:Resilience-Client-Source    文件:GuiQualitySettingsOF.java   
/**
 * Adds the buttons (and other controls) to the screen in question.
 */
public void initGui()
{
    int i = 0;
    GameSettings.Options[] aenumoptions = enumOptions;
    int j = aenumoptions.length;

    for (int k = 0; k < j; ++k)
    {
        GameSettings.Options enumoptions = aenumoptions[k];
        int x = this.width / 2 - 155 + i % 2 * 160;
        int y = this.height / 6 + 21 * (i / 2) - 10;

        if (!enumoptions.getEnumFloat())
        {
            this.buttonList.add(new GuiOptionButton(enumoptions.returnEnumOrdinal(), x, y, enumoptions, this.settings.getKeyBinding(enumoptions)));
        }
        else
        {
            this.buttonList.add(new GuiOptionSlider(enumoptions.returnEnumOrdinal(), x, y, enumoptions));
        }

        ++i;
    }

    this.buttonList.add(new GuiButton(200, this.width / 2 - 100, this.height / 6 + 168 + 11, I18n.format("gui.done", new Object[0])));
}
项目:Resilience-Client-Source    文件:GuiDetailSettingsOF.java   
/**
 * Adds the buttons (and other controls) to the screen in question.
 */
public void initGui()
{
    int i = 0;
    GameSettings.Options[] aenumoptions = enumOptions;
    int j = aenumoptions.length;

    for (int k = 0; k < j; ++k)
    {
        GameSettings.Options enumoptions = aenumoptions[k];
        int x = this.width / 2 - 155 + i % 2 * 160;
        int y = this.height / 6 + 21 * (i / 2) - 10;

        if (!enumoptions.getEnumFloat())
        {
            this.buttonList.add(new GuiOptionButton(enumoptions.returnEnumOrdinal(), x, y, enumoptions, this.settings.getKeyBinding(enumoptions)));
        }
        else
        {
            this.buttonList.add(new GuiOptionSlider(enumoptions.returnEnumOrdinal(), x, y, enumoptions));
        }

        ++i;
    }

    this.buttonList.add(new GuiButton(200, this.width / 2 - 100, this.height / 6 + 168 + 11, I18n.format("gui.done", new Object[0])));
}
项目:Resilience-Client-Source    文件:GuiAnimationSettingsOF.java   
/**
 * Adds the buttons (and other controls) to the screen in question.
 */
public void initGui()
{
    int i = 0;
    GameSettings.Options[] aenumoptions = enumOptions;
    int j = aenumoptions.length;

    for (int k = 0; k < j; ++k)
    {
        GameSettings.Options enumoptions = aenumoptions[k];
        int x = this.width / 2 - 155 + i % 2 * 160;
        int y = this.height / 6 + 21 * (i / 2) - 10;

        if (!enumoptions.getEnumFloat())
        {
            this.buttonList.add(new GuiOptionButton(enumoptions.returnEnumOrdinal(), x, y, enumoptions, this.settings.getKeyBinding(enumoptions)));
        }
        else
        {
            this.buttonList.add(new GuiOptionSlider(enumoptions.returnEnumOrdinal(), x, y, enumoptions));
        }

        ++i;
    }

    this.buttonList.add(new GuiButton(210, this.width / 2 - 155, this.height / 6 + 168 + 11, 70, 20, "All ON"));
    this.buttonList.add(new GuiButton(211, this.width / 2 - 155 + 80, this.height / 6 + 168 + 11, 70, 20, "All OFF"));
    this.buttonList.add(new GuiOptionButton(200, this.width / 2 + 5, this.height / 6 + 168 + 11, I18n.format("gui.done", new Object[0])));
}
项目:Resilience-Client-Source    文件:GuiOtherSettingsOF.java   
/**
 * Adds the buttons (and other controls) to the screen in question.
 */
public void initGui()
{
    int i = 0;
    GameSettings.Options[] aenumoptions = enumOptions;
    int j = aenumoptions.length;

    for (int k = 0; k < j; ++k)
    {
        GameSettings.Options enumoptions = aenumoptions[k];
        int x = this.width / 2 - 155 + i % 2 * 160;
        int y = this.height / 6 + 21 * (i / 2) - 10;

        if (!enumoptions.getEnumFloat())
        {
            this.buttonList.add(new GuiOptionButton(enumoptions.returnEnumOrdinal(), x, y, enumoptions, this.settings.getKeyBinding(enumoptions)));
        }
        else
        {
            this.buttonList.add(new GuiOptionSlider(enumoptions.returnEnumOrdinal(), x, y, enumoptions));
        }

        ++i;
    }

    this.buttonList.add(new GuiButton(210, this.width / 2 - 100, this.height / 6 + 168 + 11 - 44, "Reset Video Settings..."));
    this.buttonList.add(new GuiButton(200, this.width / 2 - 100, this.height / 6 + 168 + 11, I18n.format("gui.done", new Object[0])));
}
项目:Resilience-Client-Source    文件:GuiPerformanceSettingsOF.java   
/**
 * Adds the buttons (and other controls) to the screen in question.
 */
public void initGui()
{
    int i = 0;
    GameSettings.Options[] aenumoptions = enumOptions;
    int j = aenumoptions.length;

    for (int k = 0; k < j; ++k)
    {
        GameSettings.Options enumoptions = aenumoptions[k];
        int x = this.width / 2 - 155 + i % 2 * 160;
        int y = this.height / 6 + 21 * (i / 2) - 10;

        if (!enumoptions.getEnumFloat())
        {
            this.buttonList.add(new GuiOptionButton(enumoptions.returnEnumOrdinal(), x, y, enumoptions, this.settings.getKeyBinding(enumoptions)));
        }
        else
        {
            this.buttonList.add(new GuiOptionSlider(enumoptions.returnEnumOrdinal(), x, y, enumoptions));
        }

        ++i;
    }

    this.buttonList.add(new GuiButton(200, this.width / 2 - 100, this.height / 6 + 168 + 11, I18n.format("gui.done", new Object[0])));
}
项目:CustomOreGen    文件:GuiCustomOreGenSettings.java   
public GuiNumericSlider(int id, int x, int y, int width, int height, NumericOption numeric)
{
    super(id, x, y, GameSettings.Options.ANAGLYPH);            
    this._numeric = numeric;
    super.width = width;
    super.height = height;
    ReflectionHelper.setPrivateValue(GuiOptionSlider.class, this, (float)numeric.getNormalizedDisplayValue(), 0);
    this.onValueChanged();
}
项目:DecompiledMinecraft    文件:GuiStreamOptions.java   
/**
 * Adds the buttons (and other controls) to the screen in question. Called when the GUI is displayed and when the
 * window resizes, the buttonList is cleared beforehand.
 */
public void initGui()
{
    int i = 0;
    this.field_152319_i = I18n.format("options.stream.title", new Object[0]);
    this.field_152313_r = I18n.format("options.stream.chat.title", new Object[0]);

    for (GameSettings.Options gamesettings$options : field_152312_a)
    {
        if (gamesettings$options.getEnumFloat())
        {
            this.buttonList.add(new GuiOptionSlider(gamesettings$options.returnEnumOrdinal(), this.width / 2 - 155 + i % 2 * 160, this.height / 6 + 24 * (i >> 1), gamesettings$options));
        }
        else
        {
            this.buttonList.add(new GuiOptionButton(gamesettings$options.returnEnumOrdinal(), this.width / 2 - 155 + i % 2 * 160, this.height / 6 + 24 * (i >> 1), gamesettings$options, this.field_152318_h.getKeyBinding(gamesettings$options)));
        }

        ++i;
    }

    if (i % 2 == 1)
    {
        ++i;
    }

    this.field_152314_s = this.height / 6 + 24 * (i >> 1) + 6;
    i = i + 2;

    for (GameSettings.Options gamesettings$options1 : field_152316_f)
    {
        if (gamesettings$options1.getEnumFloat())
        {
            this.buttonList.add(new GuiOptionSlider(gamesettings$options1.returnEnumOrdinal(), this.width / 2 - 155 + i % 2 * 160, this.height / 6 + 24 * (i >> 1), gamesettings$options1));
        }
        else
        {
            this.buttonList.add(new GuiOptionButton(gamesettings$options1.returnEnumOrdinal(), this.width / 2 - 155 + i % 2 * 160, this.height / 6 + 24 * (i >> 1), gamesettings$options1, this.field_152318_h.getKeyBinding(gamesettings$options1)));
        }

        ++i;
    }

    this.buttonList.add(new GuiButton(200, this.width / 2 - 155, this.height / 6 + 168, 150, 20, I18n.format("gui.done", new Object[0])));
    GuiButton guibutton = new GuiButton(201, this.width / 2 + 5, this.height / 6 + 168, 150, 20, I18n.format("options.stream.ingestSelection", new Object[0]));
    guibutton.enabled = this.mc.getTwitchStream().isReadyToBroadcast() && this.mc.getTwitchStream().func_152925_v().length > 0 || this.mc.getTwitchStream().func_152908_z();
    this.buttonList.add(guibutton);
}
项目:DecompiledMinecraft    文件:GuiStreamOptions.java   
/**
 * 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));
        }
    }
}
项目:BaseClient    文件:GuiStreamOptions.java   
/**
 * Adds the buttons (and other controls) to the screen in question. Called when the GUI is displayed and when the
 * window resizes, the buttonList is cleared beforehand.
 */
public void initGui()
{
    int i = 0;
    this.field_152319_i = I18n.format("options.stream.title", new Object[0]);
    this.field_152313_r = I18n.format("options.stream.chat.title", new Object[0]);

    for (GameSettings.Options gamesettings$options : field_152312_a)
    {
        if (gamesettings$options.getEnumFloat())
        {
            this.buttonList.add(new GuiOptionSlider(gamesettings$options.returnEnumOrdinal(), this.width / 2 - 155 + i % 2 * 160, this.height / 6 + 24 * (i >> 1), gamesettings$options));
        }
        else
        {
            this.buttonList.add(new GuiOptionButton(gamesettings$options.returnEnumOrdinal(), this.width / 2 - 155 + i % 2 * 160, this.height / 6 + 24 * (i >> 1), gamesettings$options, this.field_152318_h.getKeyBinding(gamesettings$options)));
        }

        ++i;
    }

    if (i % 2 == 1)
    {
        ++i;
    }

    this.field_152314_s = this.height / 6 + 24 * (i >> 1) + 6;
    i = i + 2;

    for (GameSettings.Options gamesettings$options1 : field_152316_f)
    {
        if (gamesettings$options1.getEnumFloat())
        {
            this.buttonList.add(new GuiOptionSlider(gamesettings$options1.returnEnumOrdinal(), this.width / 2 - 155 + i % 2 * 160, this.height / 6 + 24 * (i >> 1), gamesettings$options1));
        }
        else
        {
            this.buttonList.add(new GuiOptionButton(gamesettings$options1.returnEnumOrdinal(), this.width / 2 - 155 + i % 2 * 160, this.height / 6 + 24 * (i >> 1), gamesettings$options1, this.field_152318_h.getKeyBinding(gamesettings$options1)));
        }

        ++i;
    }

    this.buttonList.add(new GuiButton(200, this.width / 2 - 155, this.height / 6 + 168, 150, 20, I18n.format("gui.done", new Object[0])));
    GuiButton guibutton = new GuiButton(201, this.width / 2 + 5, this.height / 6 + 168, 150, 20, I18n.format("options.stream.ingestSelection", new Object[0]));
    guibutton.enabled = this.mc.getTwitchStream().isReadyToBroadcast() && this.mc.getTwitchStream().func_152925_v().length > 0 || this.mc.getTwitchStream().func_152908_z();
    this.buttonList.add(guibutton);
}
项目:BaseClient    文件:GuiStreamOptions.java   
/**
 * 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));
        }
    }
}
项目:BaseClient    文件:GuiStreamOptions.java   
/**
 * Adds the buttons (and other controls) to the screen in question. Called when the GUI is displayed and when the
 * window resizes, the buttonList is cleared beforehand.
 */
public void initGui()
{
    int i = 0;
    this.field_152319_i = I18n.format("options.stream.title", new Object[0]);
    this.field_152313_r = I18n.format("options.stream.chat.title", new Object[0]);

    for (GameSettings.Options gamesettings$options : field_152312_a)
    {
        if (gamesettings$options.getEnumFloat())
        {
            this.buttonList.add(new GuiOptionSlider(gamesettings$options.returnEnumOrdinal(), this.width / 2 - 155 + i % 2 * 160, this.height / 6 + 24 * (i >> 1), gamesettings$options));
        }
        else
        {
            this.buttonList.add(new GuiOptionButton(gamesettings$options.returnEnumOrdinal(), this.width / 2 - 155 + i % 2 * 160, this.height / 6 + 24 * (i >> 1), gamesettings$options, this.field_152318_h.getKeyBinding(gamesettings$options)));
        }

        ++i;
    }

    if (i % 2 == 1)
    {
        ++i;
    }

    this.field_152314_s = this.height / 6 + 24 * (i >> 1) + 6;
    i = i + 2;

    for (GameSettings.Options gamesettings$options1 : field_152316_f)
    {
        if (gamesettings$options1.getEnumFloat())
        {
            this.buttonList.add(new GuiOptionSlider(gamesettings$options1.returnEnumOrdinal(), this.width / 2 - 155 + i % 2 * 160, this.height / 6 + 24 * (i >> 1), gamesettings$options1));
        }
        else
        {
            this.buttonList.add(new GuiOptionButton(gamesettings$options1.returnEnumOrdinal(), this.width / 2 - 155 + i % 2 * 160, this.height / 6 + 24 * (i >> 1), gamesettings$options1, this.field_152318_h.getKeyBinding(gamesettings$options1)));
        }

        ++i;
    }

    this.buttonList.add(new GuiButton(200, this.width / 2 - 155, this.height / 6 + 168, 150, 20, I18n.format("gui.done", new Object[0])));
    GuiButton guibutton = new GuiButton(201, this.width / 2 + 5, this.height / 6 + 168, 150, 20, I18n.format("options.stream.ingestSelection", new Object[0]));
    guibutton.enabled = this.mc.getTwitchStream().isReadyToBroadcast() && this.mc.getTwitchStream().func_152925_v().length > 0 || this.mc.getTwitchStream().func_152908_z();
    this.buttonList.add(guibutton);
}
项目:BaseClient    文件:GuiStreamOptions.java   
/**
 * 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));
        }
    }
}
项目:Cauldron    文件:GuiStreamOptions.java   
public void initGui()
{
    int i = 0;
    this.field_152319_i = I18n.format("options.stream.title", new Object[0]);
    this.field_152313_r = I18n.format("options.stream.chat.title", new Object[0]);
    GameSettings.Options[] aoptions = field_152312_a;
    int j = aoptions.length;
    int k;
    GameSettings.Options options;

    for (k = 0; k < j; ++k)
    {
        options = aoptions[k];

        if (options.getEnumFloat())
        {
            this.buttonList.add(new GuiOptionSlider(options.returnEnumOrdinal(), this.width / 2 - 155 + i % 2 * 160, this.height / 6 + 24 * (i >> 1), options));
        }
        else
        {
            this.buttonList.add(new GuiOptionButton(options.returnEnumOrdinal(), this.width / 2 - 155 + i % 2 * 160, this.height / 6 + 24 * (i >> 1), options, this.field_152318_h.getKeyBinding(options)));
        }

        ++i;
    }

    if (i % 2 == 1)
    {
        ++i;
    }

    this.field_152314_s = this.height / 6 + 24 * (i >> 1) + 6;
    i += 2;
    aoptions = field_152316_f;
    j = aoptions.length;

    for (k = 0; k < j; ++k)
    {
        options = aoptions[k];

        if (options.getEnumFloat())
        {
            this.buttonList.add(new GuiOptionSlider(options.returnEnumOrdinal(), this.width / 2 - 155 + i % 2 * 160, this.height / 6 + 24 * (i >> 1), options));
        }
        else
        {
            this.buttonList.add(new GuiOptionButton(options.returnEnumOrdinal(), this.width / 2 - 155 + i % 2 * 160, this.height / 6 + 24 * (i >> 1), options, this.field_152318_h.getKeyBinding(options)));
        }

        ++i;
    }

    this.buttonList.add(new GuiButton(200, this.width / 2 - 155, this.height / 6 + 168, 150, 20, I18n.format("gui.done", new Object[0])));
    GuiButton guibutton = new GuiButton(201, this.width / 2 + 5, this.height / 6 + 168, 150, 20, I18n.format("options.stream.ingestSelection", new Object[0]));
    guibutton.enabled = this.mc.func_152346_Z().func_152924_m() && this.mc.func_152346_Z().func_152925_v().length > 0 || this.mc.func_152346_Z().func_152908_z();
    this.buttonList.add(guibutton);
}
项目:Cauldron    文件:GuiStreamOptions.java   
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));
        }
    }
}
项目:Cauldron    文件:GuiStreamOptions.java   
public void initGui()
{
    int i = 0;
    this.field_152319_i = I18n.format("options.stream.title", new Object[0]);
    this.field_152313_r = I18n.format("options.stream.chat.title", new Object[0]);
    GameSettings.Options[] aoptions = field_152312_a;
    int j = aoptions.length;
    int k;
    GameSettings.Options options;

    for (k = 0; k < j; ++k)
    {
        options = aoptions[k];

        if (options.getEnumFloat())
        {
            this.buttonList.add(new GuiOptionSlider(options.returnEnumOrdinal(), this.width / 2 - 155 + i % 2 * 160, this.height / 6 + 24 * (i >> 1), options));
        }
        else
        {
            this.buttonList.add(new GuiOptionButton(options.returnEnumOrdinal(), this.width / 2 - 155 + i % 2 * 160, this.height / 6 + 24 * (i >> 1), options, this.field_152318_h.getKeyBinding(options)));
        }

        ++i;
    }

    if (i % 2 == 1)
    {
        ++i;
    }

    this.field_152314_s = this.height / 6 + 24 * (i >> 1) + 6;
    i += 2;
    aoptions = field_152316_f;
    j = aoptions.length;

    for (k = 0; k < j; ++k)
    {
        options = aoptions[k];

        if (options.getEnumFloat())
        {
            this.buttonList.add(new GuiOptionSlider(options.returnEnumOrdinal(), this.width / 2 - 155 + i % 2 * 160, this.height / 6 + 24 * (i >> 1), options));
        }
        else
        {
            this.buttonList.add(new GuiOptionButton(options.returnEnumOrdinal(), this.width / 2 - 155 + i % 2 * 160, this.height / 6 + 24 * (i >> 1), options, this.field_152318_h.getKeyBinding(options)));
        }

        ++i;
    }

    this.buttonList.add(new GuiButton(200, this.width / 2 - 155, this.height / 6 + 168, 150, 20, I18n.format("gui.done", new Object[0])));
    GuiButton guibutton = new GuiButton(201, this.width / 2 + 5, this.height / 6 + 168, 150, 20, I18n.format("options.stream.ingestSelection", new Object[0]));
    guibutton.enabled = this.mc.func_152346_Z().func_152924_m() && this.mc.func_152346_Z().func_152925_v().length > 0 || this.mc.func_152346_Z().func_152908_z();
    this.buttonList.add(guibutton);
}
项目:Cauldron    文件:GuiStreamOptions.java   
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));
        }
    }
}