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

项目:ObsidianSuite    文件:GuiAnimationMainMenu.java   
/**
   * Adds the buttons (and other controls) to the screen in question.
   */
  public void initGui()
  {
    super.initGui();

      int startY = this.height / 4 + 50;
      int spaceY = 22;

      this.buttonList.clear();
      addSingleplayerMultiplayerButtons(startY, spaceY);
this.buttonList.add(new GuiButton(10, this.width / 2 - 100, startY + spaceY * 2, "Animator"));
      this.buttonList.add(new GuiButton(0, this.width / 2 - 100, startY + spaceY * 4, 98, 20, I18n.format("menu.options", new Object[0])));
      this.buttonList.add(new GuiButton(4, this.width / 2 + 2, startY + spaceY * 4, 98, 20, I18n.format("menu.quit", new Object[0])));
      this.buttonList.add(new GuiButtonLanguage(5, this.width / 2 - 124, startY + spaceY * 4));
  }
项目:Controller-Support    文件:GuiButtonSelector.java   
@Override
public String getDisplayString() {
    if(button instanceof GuiButtonLanguage) {
        return I18n.format("gui.button.language");
    }
    return button.displayString;
}
项目:RuneCraftery    文件:GuiMainMenu.java   
public void func_73866_w_() {
   this.field_73977_n = new DynamicTexture(256, 256);
   this.field_110351_G = this.field_73882_e.func_110434_K().func_110578_a("background", this.field_73977_n);
   Calendar var1 = Calendar.getInstance();
   var1.setTime(new Date());
   if(var1.get(2) + 1 == 11 && var1.get(5) == 9) {
      this.field_73975_c = "Happy birthday, ez!";
   } else if(var1.get(2) + 1 == 6 && var1.get(5) == 1) {
      this.field_73975_c = "Happy birthday, Notch!";
   } else if(var1.get(2) + 1 == 12 && var1.get(5) == 24) {
      this.field_73975_c = "Merry X-mas!";
   } else if(var1.get(2) + 1 == 1 && var1.get(5) == 1) {
      this.field_73975_c = "Happy new year!";
   } else if(var1.get(2) + 1 == 10 && var1.get(5) == 31) {
      this.field_73975_c = "OOoooOOOoooo! Spooky!";
   }

   boolean var2 = true;
   int var3 = this.field_73881_g / 4 + 48;
   if(this.field_73882_e.func_71355_q()) {
      this.func_73972_b(var3, 24);
   } else {
      this.func_73969_a(var3, 24);
   }

   this.func_130020_g();
   this.field_73887_h.add(new GuiButton(0, this.field_73880_f / 2 - 100, var3 + 72 + 12, 98, 20, I18n.func_135053_a("menu.options")));
   this.field_73887_h.add(new GuiButton(4, this.field_73880_f / 2 + 2, var3 + 72 + 12, 98, 20, I18n.func_135053_a("menu.quit")));
   this.field_73887_h.add(new GuiButtonLanguage(5, this.field_73880_f / 2 - 124, var3 + 72 + 12));
   Object var4 = this.field_104025_t;
   synchronized(this.field_104025_t) {
      this.field_92023_s = this.field_73886_k.func_78256_a(this.field_92025_p);
      this.field_92024_r = this.field_73886_k.func_78256_a(field_96138_a);
      int var5 = Math.max(this.field_92023_s, this.field_92024_r);
      this.field_92022_t = (this.field_73880_f - var5) / 2;
      this.field_92021_u = ((GuiButton)this.field_73887_h.get(0)).field_73743_d - 24;
      this.field_92020_v = this.field_92022_t + var5;
      this.field_92019_w = this.field_92021_u + 24;
   }
}
项目:New-Menu    文件:NewMenu.java   
public void initGui()
{
    this.viewportTexture = new DynamicTexture(256, 256);
    this.field_110351_G = this.mc.getTextureManager().getDynamicTextureLocation("background", this.viewportTexture);
    Calendar calendar = Calendar.getInstance();
    calendar.setTime(new Date());

    if (calendar.get(2) + 1 == 11 && calendar.get(5) == 9)
    {
        this.splashText = "Happy birthday, ez!";
    }
    else if (calendar.get(2) + 1 == 6 && calendar.get(5) == 1)
    {
        this.splashText = "Happy birthday, Notch!";
    }
    else if (calendar.get(2) + 1 == 12 && calendar.get(5) == 24)
    {
        this.splashText = "Merry X-mas!";
    }
    else if (calendar.get(2) + 1 == 1 && calendar.get(5) == 1)
    {
        this.splashText = "Happy new year!";
    }
    else if (calendar.get(2) + 1 == 10 && calendar.get(5) == 31)
    {
        this.splashText = "OOoooOOOoooo! Spooky!";
    }

    boolean flag = true;
    int i = this.height / 4 + 48;

    if (this.mc.isDemo())
    {
        this.addDemoButtons(i, 24);
    }
    else
    {
        this.addSingleplayerMultiplayerButtons(i, 24);
    }

    this.buttonList.add(new GuiButton(0, this.width / 2 - 100, i + 72 + 12, 98, 20, I18n.format("menu.options", new Object[0])));
    this.buttonList.add(new GuiButton(4, this.width / 2 + 2, i + 72 + 12, 98, 20, I18n.format("menu.quit", new Object[0])));
    this.buttonList.add(new GuiButtonLanguage(20, this.width / 2 - 124, i + 72 + 12));
    synchronized (this.rectDownload_t)
    {
        this.rectDownload_u = ((GuiButton)this.buttonList.get(0)).yPosition - 24;
        this.rectDownload_w = this.rectDownload_u + 24;
    }
}
项目:PopularMMOS-EpicProportions-Mod    文件:GuiMainMenu.java   
/**
 * Adds the buttons (and other controls) to the screen in question.
 */
public void initGui()
{
    this.viewportTexture = new DynamicTexture(256, 256);
    this.field_110351_G = this.mc.getTextureManager().getDynamicTextureLocation("background", this.viewportTexture);
    Calendar calendar = Calendar.getInstance();
    calendar.setTime(new Date());

    if (calendar.get(2) + 1 == 11 && calendar.get(5) == 9)
    {
        this.splashText = "Happy birthday, ez!";
    }
    else if (calendar.get(2) + 1 == 6 && calendar.get(5) == 1)
    {
        this.splashText = "Happy birthday, Notch!";
    }
    else if (calendar.get(2) + 1 == 12 && calendar.get(5) == 24)
    {
        this.splashText = "Merry X-mas!";
    }
    else if (calendar.get(2) + 1 == 1 && calendar.get(5) == 1)
    {
        this.splashText = "Happy new year!";
    }
    else if (calendar.get(2) + 1 == 10 && calendar.get(5) == 31)
    {
        this.splashText = "OOoooOOOoooo! Spooky!";
    }

    boolean flag = true;
    int i = this.height / 4 + 48;

    if (this.mc.isDemo())
    {
        this.addDemoButtons(i, 24);
    }
    else
    {
        this.addSingleplayerMultiplayerButtons(i, 24);
    }

    this.buttonList.add(new GuiButton(0, this.width / 2 - 100, i + 72 + 12, 98, 20, I18n.format("menu.options", new Object[0])));
    this.buttonList.add(new GuiButton(4, this.width / 2 + 2, i + 72 + 12, 98, 20, I18n.format("menu.quit", new Object[0])));
    this.buttonList.add(new GuiButtonLanguage(5, this.width / 2 - 124, i + 72 + 12));
    Object object = this.field_104025_t;

    synchronized (this.field_104025_t)
    {
        this.field_92023_s = this.fontRendererObj.getStringWidth(this.field_92025_p);
        this.field_92024_r = this.fontRendererObj.getStringWidth(this.field_146972_A);
        int j = Math.max(this.field_92023_s, this.field_92024_r);
        this.field_92022_t = (this.width - j) / 2;
        this.field_92021_u = ((GuiButton)this.buttonList.get(0)).yPosition - 24;
        this.field_92020_v = this.field_92022_t + j;
        this.field_92019_w = this.field_92021_u + 24;
    }
}
项目:ARKCraft-Code    文件:GuiMainMenuOverride.java   
/**
 * Adds the buttons (and other controls) to the screen in question.
 */
public void initGui()
{
    this.viewportTexture = new DynamicTexture(256, 256);
    this.field_110351_G = this.mc.getTextureManager().getDynamicTextureLocation("background",
            this.viewportTexture);
    Calendar calendar = Calendar.getInstance();
    calendar.setTime(new Date());

    if (calendar.get(2) + 1 == 11 && calendar.get(5) == 9)
    {
        this.splashText = "Happy birthday, ez!";
    }
    else if (calendar.get(2) + 1 == 6 && calendar.get(5) == 1)
    {
        this.splashText = "Happy birthday, Notch!";
    }
    else if (calendar.get(2) + 1 == 12 && calendar.get(5) == 24)
    {
        this.splashText = "Merry X-mas!";
    }
    else if (calendar.get(2) + 1 == 1 && calendar.get(5) == 1)
    {
        this.splashText = "Happy new year!";
    }
    else if (calendar.get(2) + 1 == 10 && calendar.get(5) == 31)
    {
        this.splashText = "OOoooOOOoooo! Spooky!";
    }

    boolean flag = true;
    int i = this.height / 4 + 48;

    if (this.mc.isDemo())
    {
        this.addDemoButtons(i, 24);
    }
    else
    {
        this.addSingleplayerMultiplayerButtons(i, 24);
    }

    this.buttonList.add(new GuiARKButton(0, this.width / 2 - 100, i + 72 + 12, 98, 20, I18n
            .format("menu.options", new Object[0])));
    this.buttonList.add(new GuiARKButton(4, this.width / 2 + 2, i + 72 + 12, 98, 20, I18n
            .format("menu.quit", new Object[0])));
    this.buttonList.add(new GuiButtonLanguage(5, this.width / 2 - 124, i + 72 + 12));
    Object object = this.threadLock;

    synchronized (this.threadLock)
    {
        this.field_92023_s = this.fontRendererObj.getStringWidth(this.openGLWarning1);
        this.field_92024_r = this.fontRendererObj.getStringWidth(this.openGLWarning2);
        int j = Math.max(this.field_92023_s, this.field_92024_r);
        this.field_92022_t = (this.width - j) / 2;
        this.field_92021_u = ((GuiARKButton) this.buttonList.get(0)).yPosition - 24;
        this.field_92020_v = this.field_92022_t + j;
        this.field_92019_w = this.field_92021_u + 24;
    }
}