예제 #1
0
  /** Draws the screen and all the components in it. */
  public void drawScreen(int par1, int par2, float par3) {
    this.drawDefaultBackground();
    StringTranslate stringtranslate = StringTranslate.getInstance();

    if (this.clientHandler == null) {
      this.drawCenteredString(
          this.fontRenderer,
          stringtranslate.translateKey("connect.connecting"),
          this.width / 2,
          this.height / 2 - 50,
          16777215);
      this.drawCenteredString(
          this.fontRenderer, "", this.width / 2, this.height / 2 - 10, 16777215);
    } else {
      this.drawCenteredString(
          this.fontRenderer,
          stringtranslate.translateKey("connect.authorizing"),
          this.width / 2,
          this.height / 2 - 50,
          16777215);
      this.drawCenteredString(
          this.fontRenderer,
          this.clientHandler.field_72560_a,
          this.width / 2,
          this.height / 2 - 10,
          16777215);
    }

    super.drawScreen(par1, par2, par3);
  }
예제 #2
0
 /** Adds the buttons (and other controls) to the screen in question. */
 public void initGui() {
   StringTranslate stringtranslate = StringTranslate.getInstance();
   this.buttonList.clear();
   this.buttonList.add(
       new GuiButton(
           0,
           this.width / 2 - 100,
           this.height / 4 + 120 + 12,
           stringtranslate.translateKey("gui.cancel")));
 }