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

项目:RuneCraftery    文件:GuiVideoSettings.java   
protected void func_73875_a(GuiButton p_73875_1_) {
   if(p_73875_1_.field_73742_g) {
      int var2 = this.field_74106_c.field_74335_Z;
      if(p_73875_1_.field_73741_f < 100 && p_73875_1_ instanceof GuiSmallButton) {
         this.field_74106_c.func_74306_a(((GuiSmallButton)p_73875_1_).func_73753_a(), 1);
         p_73875_1_.field_73744_e = this.field_74106_c.func_74297_c(EnumOptions.func_74379_a(p_73875_1_.field_73741_f));
      }

      if(p_73875_1_.field_73741_f == 200) {
         this.field_73882_e.field_71474_y.func_74303_b();
         this.field_73882_e.func_71373_a(this.field_74105_b);
      }

      if(this.field_74106_c.field_74335_Z != var2) {
         ScaledResolution var3 = new ScaledResolution(this.field_73882_e.field_71474_y, this.field_73882_e.field_71443_c, this.field_73882_e.field_71440_d);
         int var4 = var3.func_78326_a();
         int var5 = var3.func_78328_b();
         this.func_73872_a(this.field_73882_e, var4, var5);
      }

   }
}
项目:RuneCraftery    文件:GuiModList.java   
@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);
        this.buttonList.add(new GuiSmallButton(6, this.width / 2 - 75, this.height - 38, I18n.getString("gui.done")));
        this.modList=new GuiSlotModList(this, mods, listWidth);
        this.modList.registerScrollButtons(this.buttonList, 7, 8);
    }
项目:BetterNutritionMod    文件:GuiModList.java   
@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);
        this.buttonList.add(new GuiSmallButton(6, this.width / 2 - 75, this.height - 38, I18n.getString("gui.done")));
        this.modList=new GuiSlotModList(this, mods, listWidth);
        this.modList.registerScrollButtons(this.buttonList, 7, 8);
    }
项目:RuneCraftery    文件:GuiModList.java   
@Override
public void func_73866_w_()
{
    for (ModContainer mod : mods) {
        listWidth=Math.max(listWidth,getFontRenderer().func_78256_a(mod.getName()) + 10);
        listWidth=Math.max(listWidth,getFontRenderer().func_78256_a(mod.getVersion()) + 10);
    }
    listWidth=Math.min(listWidth, 150);
    this.field_73887_h.add(new GuiSmallButton(6, this.field_73880_f / 2 - 75, this.field_73881_g - 38, I18n.func_135053_a("gui.done")));
    this.modList=new GuiSlotModList(this, mods, listWidth);
    this.modList.registerScrollButtons(this.field_73887_h, 7, 8);
}
项目:RuneCraftery    文件:GuiOptions.java   
public void func_73866_w_() {
   int var1 = 0;
   this.field_74054_a = I18n.func_135053_a("options.title");
   EnumOptions[] var2 = field_74052_b;
   int var3 = var2.length;

   for(int var4 = 0; var4 < var3; ++var4) {
      EnumOptions var5 = var2[var4];
      if(var5.func_74380_a()) {
         this.field_73887_h.add(new GuiSlider(var5.func_74381_c(), this.field_73880_f / 2 - 155 + var1 % 2 * 160, this.field_73881_g / 6 - 12 + 24 * (var1 >> 1), var5, this.field_74051_d.func_74297_c(var5), this.field_74051_d.func_74296_a(var5)));
      } else {
         GuiSmallButton var6 = new GuiSmallButton(var5.func_74381_c(), this.field_73880_f / 2 - 155 + var1 % 2 * 160, this.field_73881_g / 6 - 12 + 24 * (var1 >> 1), var5, this.field_74051_d.func_74297_c(var5));
         if(var5 == EnumOptions.DIFFICULTY && this.field_73882_e.field_71441_e != null && this.field_73882_e.field_71441_e.func_72912_H().func_76093_s()) {
            var6.field_73742_g = false;
            var6.field_73744_e = I18n.func_135053_a("options.difficulty") + ": " + I18n.func_135053_a("options.difficulty.hardcore");
         }

         this.field_73887_h.add(var6);
      }

      ++var1;
   }

   this.field_73887_h.add(new GuiButton(101, this.field_73880_f / 2 - 152, this.field_73881_g / 6 + 96 - 6, 150, 20, I18n.func_135053_a("options.video")));
   this.field_73887_h.add(new GuiButton(100, this.field_73880_f / 2 + 2, this.field_73881_g / 6 + 96 - 6, 150, 20, I18n.func_135053_a("options.controls")));
   this.field_73887_h.add(new GuiButton(102, this.field_73880_f / 2 - 152, this.field_73881_g / 6 + 120 - 6, 150, 20, I18n.func_135053_a("options.language")));
   this.field_73887_h.add(new GuiButton(103, this.field_73880_f / 2 + 2, this.field_73881_g / 6 + 120 - 6, 150, 20, I18n.func_135053_a("options.multiplayer.title")));
   this.field_73887_h.add(new GuiButton(105, this.field_73880_f / 2 - 152, this.field_73881_g / 6 + 144 - 6, 150, 20, I18n.func_135053_a("options.resourcepack")));
   this.field_73887_h.add(new GuiButton(104, this.field_73880_f / 2 + 2, this.field_73881_g / 6 + 144 - 6, 150, 20, I18n.func_135053_a("options.snooper.view")));
   this.field_73887_h.add(new GuiButton(200, this.field_73880_f / 2 - 100, this.field_73881_g / 6 + 168, I18n.func_135053_a("gui.done")));
}
项目:RuneCraftery    文件:GuiVideoSettings.java   
public void func_73866_w_() {
   this.field_74107_a = I18n.func_135053_a("options.videoTitle");
   this.field_73887_h.clear();
   this.field_73887_h.add(new GuiButton(200, this.field_73880_f / 2 - 100, this.field_73881_g / 6 + 168, I18n.func_135053_a("gui.done")));
   this.field_74104_d = false;
   String[] var1 = new String[]{"sun.arch.data.model", "com.ibm.vm.bitmode", "os.arch"};
   String[] var2 = var1;
   int var3 = var1.length;

   for(int var4 = 0; var4 < var3; ++var4) {
      String var5 = var2[var4];
      String var6 = System.getProperty(var5);
      if(var6 != null && var6.contains("64")) {
         this.field_74104_d = true;
         break;
      }
   }

   int var8 = 0;
   var3 = this.field_74104_d?0:-15;
   EnumOptions[] var9 = field_74108_m;
   int var10 = var9.length;

   for(int var11 = 0; var11 < var10; ++var11) {
      EnumOptions var7 = var9[var11];
      if(var7.func_74380_a()) {
         this.field_73887_h.add(new GuiSlider(var7.func_74381_c(), this.field_73880_f / 2 - 155 + var8 % 2 * 160, this.field_73881_g / 7 + var3 + 24 * (var8 >> 1), var7, this.field_74106_c.func_74297_c(var7), this.field_74106_c.func_74296_a(var7)));
      } else {
         this.field_73887_h.add(new GuiSmallButton(var7.func_74381_c(), this.field_73880_f / 2 - 155 + var8 % 2 * 160, this.field_73881_g / 7 + var3 + 24 * (var8 >> 1), var7, this.field_74106_c.func_74297_c(var7)));
      }

      ++var8;
   }

}
项目:RuneCraftery    文件:ScreenChatOptions.java   
protected void func_73875_a(GuiButton p_73875_1_) {
   if(p_73875_1_.field_73742_g) {
      if(p_73875_1_.field_73741_f < 100 && p_73875_1_ instanceof GuiSmallButton) {
         this.field_73890_c.func_74306_a(((GuiSmallButton)p_73875_1_).func_73753_a(), 1);
         p_73875_1_.field_73744_e = this.field_73890_c.func_74297_c(EnumOptions.func_74379_a(p_73875_1_.field_73741_f));
      }

      if(p_73875_1_.field_73741_f == 200) {
         this.field_73882_e.field_71474_y.func_74303_b();
         this.field_73882_e.func_71373_a(this.field_73889_b);
      }

   }
}
项目:RuneCraftery    文件:GuiControls.java   
public void func_73866_w_() {
   int var1 = this.func_73907_g();

   for(int var2 = 0; var2 < this.field_73910_c.field_74324_K.length; ++var2) {
      this.field_73887_h.add(new GuiSmallButton(var2, var1 + var2 % 2 * 160, this.field_73881_g / 6 + 24 * (var2 >> 1), 70, 20, this.field_73910_c.func_74301_b(var2)));
   }

   this.field_73887_h.add(new GuiButton(200, this.field_73880_f / 2 - 100, this.field_73881_g / 6 + 168, I18n.func_135053_a("gui.done")));
   this.field_73911_a = I18n.func_135053_a("controls.title");
}
项目:RuneCraftery    文件:GuiModsMissingForServer.java   
@Override

    /**
     * Adds the buttons (and other controls) to the screen in question.
     */
    public void initGui()
    {
        this.buttonList.add(new GuiSmallButton(1, this.width / 2 - 75, this.height - 38, I18n.getString("gui.done")));
    }
项目:RuneCraftery    文件:GuiScreenTemporaryResourcePackSelect.java   
/**
 * Adds the buttons (and other controls) to the screen in question.
 */
public void initGui()
{
    this.buttonList.add(new GuiSmallButton(5, this.width / 2 - 154, this.height - 48, I18n.getString("resourcePack.openFolder")));
    this.buttonList.add(new GuiSmallButton(6, this.width / 2 + 4, this.height - 48, I18n.getString("gui.done")));
    this.field_110346_c = new GuiScreenTemporaryResourcePackSelectSelectionList(this, this.mc.getResourcePackRepository());
    this.field_110346_c.registerScrollButtons(7, 8);
}
项目:RuneCraftery    文件:GuiAchievements.java   
/**
 * Adds the buttons (and other controls) to the screen in question.
 */
public void initGui()
{
    this.buttonList.clear();
    this.buttonList.add(new GuiSmallButton(1, this.width / 2 + 24, this.height / 2 + 74, 80, 20, I18n.getString("gui.done")));
    this.buttonList.add(button = new GuiSmallButton(2, (width - achievementsPaneWidth) / 2 + 24, height / 2 + 74, 125, 20, AchievementPage.getTitle(currentPage)));
}
项目:BetterNutritionMod    文件:GuiModsMissingForServer.java   
@Override

    /**
     * Adds the buttons (and other controls) to the screen in question.
     */
    public void initGui()
    {
        this.buttonList.add(new GuiSmallButton(1, this.width / 2 - 75, this.height - 38, I18n.getString("gui.done")));
    }
项目:BetterNutritionMod    文件:GuiScreenTemporaryResourcePackSelect.java   
/**
 * Adds the buttons (and other controls) to the screen in question.
 */
public void initGui()
{
    this.buttonList.add(new GuiSmallButton(5, this.width / 2 - 154, this.height - 48, I18n.getString("resourcePack.openFolder")));
    this.buttonList.add(new GuiSmallButton(6, this.width / 2 + 4, this.height - 48, I18n.getString("gui.done")));
    this.field_110346_c = new GuiScreenTemporaryResourcePackSelectSelectionList(this, this.mc.getResourcePackRepository());
    this.field_110346_c.registerScrollButtons(7, 8);
}
项目:BetterNutritionMod    文件:GuiAchievements.java   
/**
 * Adds the buttons (and other controls) to the screen in question.
 */
public void initGui()
{
    this.buttonList.clear();
    this.buttonList.add(new GuiSmallButton(1, this.width / 2 + 24, this.height / 2 + 74, 80, 20, I18n.getString("gui.done")));
    this.buttonList.add(button = new GuiSmallButton(2, (width - achievementsPaneWidth) / 2 + 24, height / 2 + 74, 125, 20, AchievementPage.getTitle(currentPage)));
}
项目:RuneCraftery    文件:GuiModsMissingForServer.java   
@Override
public void func_73866_w_()
{
    this.field_73887_h.add(new GuiSmallButton(1, this.field_73880_f / 2 - 75, this.field_73881_g - 38, I18n.func_135053_a("gui.done")));
}
项目:RuneCraftery    文件:GuiScreenTemporaryResourcePackSelect.java   
public void func_73866_w_() {
   this.field_73887_h.add(new GuiSmallButton(5, this.field_73880_f / 2 - 154, this.field_73881_g - 48, I18n.func_135053_a("resourcePack.openFolder")));
   this.field_73887_h.add(new GuiSmallButton(6, this.field_73880_f / 2 + 4, this.field_73881_g - 48, I18n.func_135053_a("gui.done")));
   this.field_110346_c = new GuiScreenTemporaryResourcePackSelectSelectionList(this, this.field_73882_e.func_110438_M());
   this.field_110346_c.func_77220_a(7, 8);
}
项目:RuneCraftery    文件:GuiYesNo.java   
public void func_73866_w_() {
   this.field_73887_h.add(new GuiSmallButton(0, this.field_73880_f / 2 - 155, this.field_73881_g / 6 + 96, this.field_73941_c));
   this.field_73887_h.add(new GuiSmallButton(1, this.field_73880_f / 2 - 155 + 160, this.field_73881_g / 6 + 96, this.field_73939_d));
}
项目:RuneCraftery    文件:GuiOptions.java   
protected void func_73875_a(GuiButton p_73875_1_) {
   if(p_73875_1_.field_73742_g) {
      if(p_73875_1_.field_73741_f < 100 && p_73875_1_ instanceof GuiSmallButton) {
         this.field_74051_d.func_74306_a(((GuiSmallButton)p_73875_1_).func_73753_a(), 1);
         p_73875_1_.field_73744_e = this.field_74051_d.func_74297_c(EnumOptions.func_74379_a(p_73875_1_.field_73741_f));
      }

      if(p_73875_1_.field_73741_f == 101) {
         this.field_73882_e.field_71474_y.func_74303_b();
         this.field_73882_e.func_71373_a(new GuiVideoSettings(this, this.field_74051_d));
      }

      if(p_73875_1_.field_73741_f == 100) {
         this.field_73882_e.field_71474_y.func_74303_b();
         this.field_73882_e.func_71373_a(new GuiControls(this, this.field_74051_d));
      }

      if(p_73875_1_.field_73741_f == 102) {
         this.field_73882_e.field_71474_y.func_74303_b();
         this.field_73882_e.func_71373_a(new GuiLanguage(this, this.field_74051_d, this.field_73882_e.func_135016_M()));
      }

      if(p_73875_1_.field_73741_f == 103) {
         this.field_73882_e.field_71474_y.func_74303_b();
         this.field_73882_e.func_71373_a(new ScreenChatOptions(this, this.field_74051_d));
      }

      if(p_73875_1_.field_73741_f == 104) {
         this.field_73882_e.field_71474_y.func_74303_b();
         this.field_73882_e.func_71373_a(new GuiSnooper(this, this.field_74051_d));
      }

      if(p_73875_1_.field_73741_f == 200) {
         this.field_73882_e.field_71474_y.func_74303_b();
         this.field_73882_e.func_71373_a(this.field_74053_c);
      }

      if(p_73875_1_.field_73741_f == 105) {
         this.field_73882_e.field_71474_y.func_74303_b();
         this.field_73882_e.func_71373_a(new GuiScreenTemporaryResourcePackSelect(this, this.field_74051_d));
      }

   }
}
项目:RuneCraftery    文件:GuiLanguage.java   
public void func_73866_w_() {
   this.field_73887_h.add(this.field_74048_m = new GuiSmallButton(6, this.field_73880_f / 2 - 75, this.field_73881_g - 38, I18n.func_135053_a("gui.done")));
   this.field_74046_c = new GuiSlotLanguage(this);
   this.field_74046_c.func_77220_a(7, 8);
}
项目:RuneCraftery    文件:GuiLanguage.java   
static GuiSmallButton func_74042_b(GuiLanguage p_74042_0_) {
   return p_74042_0_.field_74048_m;
}
项目:RuneCraftery    文件:ScreenChatOptions.java   
public void func_73866_w_() {
   int var1 = 0;
   this.field_73888_d = I18n.func_135053_a("options.chat.title");
   this.field_82268_n = I18n.func_135053_a("options.multiplayer.title");
   EnumOptions[] var2 = field_73891_a;
   int var3 = var2.length;

   int var4;
   EnumOptions var5;
   for(var4 = 0; var4 < var3; ++var4) {
      var5 = var2[var4];
      if(var5.func_74380_a()) {
         this.field_73887_h.add(new GuiSlider(var5.func_74381_c(), this.field_73880_f / 2 - 155 + var1 % 2 * 160, this.field_73881_g / 6 + 24 * (var1 >> 1), var5, this.field_73890_c.func_74297_c(var5), this.field_73890_c.func_74296_a(var5)));
      } else {
         this.field_73887_h.add(new GuiSmallButton(var5.func_74381_c(), this.field_73880_f / 2 - 155 + var1 % 2 * 160, this.field_73881_g / 6 + 24 * (var1 >> 1), var5, this.field_73890_c.func_74297_c(var5)));
      }

      ++var1;
   }

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

   this.field_82269_o = this.field_73881_g / 6 + 24 * (var1 >> 1);
   var1 += 2;
   var2 = field_82267_b;
   var3 = var2.length;

   for(var4 = 0; var4 < var3; ++var4) {
      var5 = var2[var4];
      if(var5.func_74380_a()) {
         this.field_73887_h.add(new GuiSlider(var5.func_74381_c(), this.field_73880_f / 2 - 155 + var1 % 2 * 160, this.field_73881_g / 6 + 24 * (var1 >> 1), var5, this.field_73890_c.func_74297_c(var5), this.field_73890_c.func_74296_a(var5)));
      } else {
         this.field_73887_h.add(new GuiSmallButton(var5.func_74381_c(), this.field_73880_f / 2 - 155 + var1 % 2 * 160, this.field_73881_g / 6 + 24 * (var1 >> 1), var5, this.field_73890_c.func_74297_c(var5)));
      }

      ++var1;
   }

   this.field_73887_h.add(new GuiButton(200, this.field_73880_f / 2 - 100, this.field_73881_g / 6 + 168, I18n.func_135053_a("gui.done")));
}
项目:RuneCraftery    文件:GuiScreenConfirmation.java   
public void func_73866_w_() {
   this.field_73887_h.add(new GuiSmallButton(0, this.field_73880_f / 2 - 155, this.field_73881_g / 6 + 112, this.field_140046_b));
   this.field_73887_h.add(new GuiSmallButton(1, this.field_73880_f / 2 - 155 + 160, this.field_73881_g / 6 + 112, this.field_140047_c));
}
项目:RuneCraftery    文件:GuiMemoryErrorScreen.java   
public void func_73866_w_() {
   this.field_73887_h.clear();
   this.field_73887_h.add(new GuiSmallButton(0, this.field_73880_f / 2 - 155, this.field_73881_g / 4 + 120 + 12, I18n.func_135053_a("gui.toMenu")));
   this.field_73887_h.add(new GuiSmallButton(1, this.field_73880_f / 2 - 155 + 160, this.field_73881_g / 4 + 120 + 12, I18n.func_135053_a("menu.quit")));
}
项目:RuneCraftery    文件:GuiAchievements.java   
public void func_73866_w_() {
   this.field_73887_h.clear();
   this.field_73887_h.add(new GuiSmallButton(1, this.field_73880_f / 2 + 24, this.field_73881_g / 2 + 74, 80, 20, I18n.func_135053_a("gui.done")));
}