/** Adds the buttons (and other controls) to the screen in question. */
  public void initGui() {
    this.screenTitle = I18n.format("options.videoTitle", new Object[0]);
    this.buttonList.clear();
    this.is64bit = false;
    String[] var1 = new String[] {"sun.arch.data.model", "com.ibm.vm.bitmode", "os.arch"};
    String[] var2 = var1;
    int var3 = var1.length;

    for (int var8 = 0; var8 < var3; ++var8) {
      String var9 = var2[var8];
      String var10 = System.getProperty(var9);

      if (var10 != null && var10.contains("64")) {
        this.is64bit = true;
        break;
      }
    }

    boolean var12 = false;
    boolean var111 = !this.is64bit;
    GameSettings.Options[] var13 = videoOptions;
    int var14 = var13.length;
    boolean var11 = false;
    int x;
    int var15;

    for (var15 = 0; var15 < var14; ++var15) {
      GameSettings.Options y = var13[var15];
      x = this.width / 2 - 155 + var15 % 2 * 160;
      int y1 = this.height / 6 + 21 * (var15 / 2) - 10;

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

    int var16 = this.height / 6 + 21 * (var15 / 2) - 10;
    boolean var17 = false;
    x = this.width / 2 - 155 + 160;
    this.buttonList.add(new GuiOptionButton(202, x, var16, "Quality..."));
    var16 += 21;
    x = this.width / 2 - 155 + 0;
    this.buttonList.add(new GuiOptionButton(201, x, var16, "Details..."));
    x = this.width / 2 - 155 + 160;
    this.buttonList.add(new GuiOptionButton(212, x, var16, "Performance..."));
    var16 += 21;
    x = this.width / 2 - 155 + 0;
    this.buttonList.add(new GuiOptionButton(211, x, var16, "Animations..."));
    x = this.width / 2 - 155 + 160;
    this.buttonList.add(new GuiOptionButton(222, x, var16, "Other..."));
    this.buttonList.add(
        new GuiButton(
            200,
            this.width / 2 - 100,
            this.height / 6 + 168 + 11,
            I18n.format("gui.done", new Object[0])));
  }
  /** Adds the buttons (and other controls) to the screen in question. */
  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);
  }
Beispiel #3
0
  /**
   * 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);
  }