/** Draws the screen and all the components in it. */
 public void drawScreen(int par1, int par2, float par3) {
   StringTranslate var4 = StringTranslate.getInstance();
   this.drawDefaultBackground();
   this.drawCenteredString(
       this.fontRenderer,
       var4.translateKey("mco.configure.world.subscription.title"),
       this.width / 2,
       17,
       16777215);
   this.drawString(
       this.fontRenderer,
       var4.translateKey("mco.configure.world.subscription.start"),
       this.width / 2 - 100,
       53,
       10526880);
   this.drawString(this.fontRenderer, this.field_98069_o, this.width / 2 - 100, 66, 16777215);
   this.drawString(
       this.fontRenderer,
       var4.translateKey("mco.configure.world.subscription.daysleft"),
       this.width / 2 - 100,
       85,
       10526880);
   this.drawString(
       this.fontRenderer, String.valueOf(this.field_98068_n), this.width / 2 - 100, 98, 16777215);
   super.drawScreen(par1, par2, par3);
 }
  public void drawScreen(int i, int i1, float f) {

    drawDefaultBackground();
    super.drawScreen(i, i1, f);
    drawCenteredString(
        fontRenderer, mypixelmon.getName() + "can no longer fight", width / 2, 10, 0xFFFFFF);
  }
Esempio n. 3
0
 @Override
 public void drawScreen(int par2, int par3, float par4) {
   this.drawDefaultBackground();
   Frame[] frames = guiManager.getFrames();
   for (int i = frames.length - 1; i >= 0; i--) frames[i].render();
   super.drawScreen(par2, par3, par4);
 }
Esempio n. 4
0
 public void displayGuiScreen(GuiScreen guiscreen) {
   if (currentScreen instanceof GuiUnused) {
     return;
   }
   if (currentScreen != null) {
     currentScreen.onGuiClosed();
   }
   if (guiscreen instanceof GuiMainMenu) {
     statFileWriter.func_27175_b();
   }
   statFileWriter.syncStats();
   if (guiscreen == null && theWorld == null) {
     guiscreen = new GuiMainMenu();
   } else if (guiscreen == null && thePlayer.health <= 0) {
     guiscreen = new GuiGameOver();
   }
   if (guiscreen instanceof GuiMainMenu) {
     ingameGUI.clearChatMessages();
   }
   currentScreen = guiscreen;
   if (guiscreen != null) {
     setIngameNotInFocus();
     ScaledResolution scaledresolution =
         new ScaledResolution(gameSettings, displayWidth, displayHeight);
     int i = scaledresolution.getScaledWidth();
     int j = scaledresolution.getScaledHeight();
     guiscreen.setWorldAndResolution(this, i, j);
     skipRenderWorld = false;
   } else {
     setIngameFocus();
   }
 }
Esempio n. 5
0
 public void drawScreen(int x, int y, float z) {
   synchronized (serverInfo) {
     this.worldSlotContainer.drawScreen(x, y, z);
     this.drawCenteredString(this.fontRenderer, this.screenTitle, this.width / 2, 20, 16777215);
     this.drawCenteredString(
         this.fontRenderer,
         "Spoutcraft Server Browser",
         this.width / 2,
         this.height - 86,
         5263440);
     this.drawCenteredString(
         this.fontRenderer, indexString, this.width / 2, this.height - 71, 5263440);
     this.drawString(
         this.fontRenderer,
         "Displaying " + this.serverInfo.serverList.size() + " servers",
         this.width
             - this.fontRenderer.getStringWidth(
                 "Displaying " + this.serverInfo.serverList.size() + " servers")
             - 2,
         20,
         5263440);
     this.drawString(this.fontRenderer, "Status: " + this.serverInfo.status, 2, 20, 5263440);
   }
   super.drawScreen(x, y, z);
 }
  @Override
  protected void keyTyped(char par1, int key) {
    super.keyTyped(par1, key);

    if (key == 1 || key == this.mc.gameSettings.keyBindInventory.keyCode) {
      this.mc.thePlayer.closeScreen();
      //        	this.mc.displayGuiScreen((GuiScreen)null);
    }

    if (key == mc.gameSettings.keyBindLeft.keyCode) {
      retreatPage();
    } else if (key == mc.gameSettings.keyBindRight.keyCode) {
      advancePage();
    }

    //        if (DustMod.debug && key == mc.gameSettings.keyBindChat.keyCode)
    //        {
    //            EntityPlayer player = ModLoader.getMinecraftInstance().thePlayer;
    //            int scroll = 0;
    //
    //            if (getRunePage() != 0)
    //            {
    //                scroll = DustManager.getShape(getRunePage() - 1).id;
    //                ItemStack to = new ItemStack(DustMod.dustScroll, 1, scroll);
    //                player.inventory.addItemStackToInventory(to);
    //            }
    //            else
    //            {
    //                ItemStack to = new ItemStack(DustMod.negateSacrifice, 64);
    //                player.inventory.addItemStackToInventory(to);
    //            }
    //        }
  }
Esempio n. 7
0
  public void func_571_a(int p_571_1_, int p_571_2_, float p_571_3_) {
    this.func_549_a(0, 0, this.field_951_c, this.field_950_d, 1615855616, -1602211792);
    GL11.glPushMatrix();
    GL11.glScalef(2.0F, 2.0F, 2.0F);
    boolean var4 = this.field_945_b.field_6324_e.func_22144_v().func_40724_s();
    String var5 =
        var4
            ? StatCollector.func_25200_a("deathScreen.title.hardcore")
            : StatCollector.func_25200_a("deathScreen.title");
    this.func_548_a(this.field_6451_g, var5, this.field_951_c / 2 / 2, 30, 16777215);
    GL11.glPopMatrix();
    if (var4) {
      this.func_548_a(
          this.field_6451_g,
          StatCollector.func_25200_a("deathScreen.hardcoreInfo"),
          this.field_951_c / 2,
          144,
          16777215);
    }

    this.func_548_a(
        this.field_6451_g,
        StatCollector.func_25200_a("deathScreen.score")
            + ": \u00a7e"
            + this.field_945_b.field_6322_g.func_6417_t(),
        this.field_951_c / 2,
        100,
        16777215);
    super.func_571_a(p_571_1_, p_571_2_, p_571_3_);
  }
 public void drawScreen(int i, int j, float f) {
   drawDefaultBackground();
   drawCenteredString(
       fontRenderer, "Level save conflict", width / 2, (height / 4 - 60) + 20, 0xffffff);
   drawString(
       fontRenderer,
       "Minecraft detected a conflict in the level save data.",
       width / 2 - 140,
       (height / 4 - 60) + 60 + 0,
       0xa0a0a0);
   drawString(
       fontRenderer,
       "This could be caused by two copies of the game",
       width / 2 - 140,
       (height / 4 - 60) + 60 + 18,
       0xa0a0a0);
   drawString(
       fontRenderer,
       "accessing the same level.",
       width / 2 - 140,
       (height / 4 - 60) + 60 + 27,
       0xa0a0a0);
   drawString(
       fontRenderer,
       "To prevent level corruption, the current game has quit.",
       width / 2 - 140,
       (height / 4 - 60) + 60 + 45,
       0xa0a0a0);
   super.drawScreen(i, j, f);
 }
Esempio n. 9
0
 private void drawPOI(String name, int x, int z, int color) {
   int mouseX =
       (int) ((getScreen().getMouseX() - getX() + scrollX) / scale + heightMap.getMinX() * 16);
   int mouseY =
       (int) ((getScreen().getMouseY() - getY() + scrollY) / scale + heightMap.getMinZ() * 16);
   int radius = (int) (2f / scale);
   if (radius <= 0) {
     radius = 2;
   }
   int mouseRadius = radius * 2;
   if (parent.isInBoundingRect(
       x - mouseRadius, z - mouseRadius, mouseRadius * 2, mouseRadius * 2, mouseX, mouseY)) {
     color = 0xff0000ff;
     parent.drawTooltip(name, x, z);
   }
   RenderUtil.drawRectangle(x - radius, z - radius, x + radius, z + radius, color);
 }
Esempio n. 10
0
  /**
   * Fired when a control is clicked. This is the equivalent of
   * ActionListener.actionPerformed(ActionEvent e).
   */
  protected void actionPerformed(GuiButton par1GuiButton) {
    if (par1GuiButton.id == 1) {
      mc.displayGuiScreen(null);
      mc.setIngameFocus();
    }

    super.actionPerformed(par1GuiButton);
  }
 public void func_73876_c() {
   super.func_73876_c();
   ++this.field_74039_z;
   if (this.field_74041_x.func_77553_a()) {
     this.field_74026_B = this.field_74041_x.func_77554_c();
     this.field_74041_x.func_77552_b();
   }
 }
Esempio n. 12
0
 /** Fired when a key is typed. This is the equivalent of KeyListener.keyTyped(KeyEvent e). */
 protected void keyTyped(char par1, int par2) {
   if (par2 == mc.gameSettings.keyBindInventory.keyCode) {
     mc.displayGuiScreen(null);
     mc.setIngameFocus();
   } else {
     super.keyTyped(par1, par2);
   }
 }
Esempio n. 13
0
  @Override
  public void drawScreen(int par1, int par2, float par3) {
    drawDefaultBackground();
    // Draw label at top of screen
    drawCenteredString(fontRenderer, "Overlay settings", width / 2, height / 2 - 80 - 20, 0x4444bb);

    // Draw buttons
    super.drawScreen(par1, par2, par3);
  }
Esempio n. 14
0
 protected void keyTyped(char c, int i) {
   if (buttonId >= 0) {
     options.setKeyBinding(buttonId, i);
     ((GuiButton) controlList.get(buttonId)).displayString =
         options.getOptionDisplayString(buttonId);
     buttonId = -1;
   } else {
     super.keyTyped(c, i);
   }
 }
Esempio n. 15
0
 public void func_570_g() {
   super.func_570_g();
   ++this.field_48154_a;
   GuiButton var2;
   if (this.field_48154_a == 20) {
     for (Iterator var1 = this.field_949_e.iterator(); var1.hasNext(); var2.field_937_g = true) {
       var2 = (GuiButton) var1.next();
     }
   }
 }
  /** Draws the screen and all the components in it. */
  public void drawScreen(int par1, int par2, float par3) {
    this.renderSkybox(par1, par2, par3);
    Tessellator var4 = Tessellator.instance;
    short var5 = 274;
    int var6 = this.width / 2 - var5 / 2;
    byte var7 = 30;
    this.drawGradientRect(0, 0, this.width, this.height, -2130706433, 16777215);
    this.drawGradientRect(0, 0, this.width, this.height, 0, Integer.MIN_VALUE);
    GL11.glBindTexture(GL11.GL_TEXTURE_2D, this.mc.renderEngine.getTexture("/title/mclogo.png"));
    GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);

    if ((double) this.updateCounter < 1.0E-4D) {
      this.drawTexturedModalRect(var6 + 0, var7 + 0, 0, 0, 99, 44);
      this.drawTexturedModalRect(var6 + 99, var7 + 0, 129, 0, 27, 44);
      this.drawTexturedModalRect(var6 + 99 + 26, var7 + 0, 126, 0, 3, 44);
      this.drawTexturedModalRect(var6 + 99 + 26 + 3, var7 + 0, 99, 0, 26, 44);
      this.drawTexturedModalRect(var6 + 155, var7 + 0, 0, 45, 155, 44);
    } else {
      this.drawTexturedModalRect(var6 + 0, var7 + 0, 0, 0, 155, 44);
      this.drawTexturedModalRect(var6 + 155, var7 + 0, 0, 45, 155, 44);
    }

    var4.setColorOpaque_I(16777215);
    GL11.glPushMatrix();
    GL11.glTranslatef((float) (this.width / 2 + 90), 70.0F, 0.0F);
    GL11.glRotatef(-20.0F, 0.0F, 0.0F, 1.0F);
    float var8 =
        1.8F
            - MathHelper.abs(
                MathHelper.sin(
                        (float) (Minecraft.getSystemTime() % 1000L)
                            / 1000.0F
                            * (float) Math.PI
                            * 2.0F)
                    * 0.1F);
    var8 = var8 * 100.0F / (float) (this.fontRenderer.getStringWidth(this.splashText) + 32);
    GL11.glScalef(var8, var8, var8);
    this.drawCenteredString(this.fontRenderer, this.splashText, 0, -8, 16776960);
    GL11.glPopMatrix();
    String var9 = "Minecraft 1.3.2";

    if (this.mc.isDemo()) {
      var9 = var9 + " Demo";
    }

    this.drawString(this.fontRenderer, var9, 2, this.height - 10, 16777215);
    String var10 = "Copyright Mojang AB. Ported by Nick Parker";
    this.drawString(
        this.fontRenderer,
        var10,
        this.width - this.fontRenderer.getStringWidth(var10) - 2,
        this.height - 10,
        16777215);
    super.drawScreen(par1, par2, par3);
  }
Esempio n. 17
0
 public void drawScreen(int var1, int var2, float var3) {
   this.drawDefaultBackground();
   this.drawCenteredString(
       this.fontRenderer, this.errorMessage, this.width / 2, this.height / 2 - 50, 16777215);
   this.drawCenteredString(
       this.fontRenderer, this.errorDetail, this.width / 2, this.height / 2 - 10, 16777215);
   super.drawScreen(var1, var2, var3);
   // Spout Start
   ReconnectManager.teleport(this.mc);
   // Spout End
 }
Esempio n. 18
0
 protected void keyTyped(char c, int i) {
   if (recording && !SimpleKeyBindingManager.isModifierKey(i)) {
     item.setKey(i);
     item.setRawModifiers((byte) 0);
     SimpleKeyBindingManager.setModifiersToShortcut(item);
     recording = false;
     updateRecordButton();
   } else {
     super.keyTyped(c, i);
   }
 }
Esempio n. 19
0
 public void func_571_a(int p_571_1_, int p_571_2_, float p_571_3_) {
   func_579_b(0);
   StringTranslate stringtranslate = StringTranslate.func_20162_a();
   func_548_a(
       field_6451_g,
       stringtranslate.func_20163_a("multiplayer.downloadingTerrain"),
       field_951_c / 2,
       field_950_d / 2 - 50,
       0xffffff);
   super.func_571_a(p_571_1_, p_571_2_, p_571_3_);
 }
  @Override
  public void drawScreen(int par1, int par2, float par3) {
    super.drawScreen(par1, par2, par3);
    drawDefaultBackground();
    drawGuiContainerBackgroundLayer(par3, par1, par2);
    drawGuiContainerForegroundLayer();

    for (int i = 0; i < controlList.size(); i++) {
      GuiButton guibutton = (GuiButton) controlList.get(i);
      guibutton.drawButton(mc, par1, par2);
    }
  }
  /** Called when the mouse is clicked. */
  protected void mouseClicked(int par1, int par2, int par3) {
    super.mouseClicked(par1, par2, par3);

    if (this.field_92025_p.length() > 0
        && par1 >= this.field_92022_t
        && par1 <= this.field_92020_v
        && par2 >= this.field_92021_u
        && par2 <= this.field_92019_w) {
      GuiConfirmOpenLink var4 = new GuiConfirmOpenLink(this, "http://tinyurl.com/javappc", 13);
      var4.func_92026_h();
      this.mc.displayGuiScreen(var4);
    }
  }
Esempio n. 22
0
 /** Draws the screen and all the components in it. */
 public void drawScreen(int par1, int par2, float par3) {
   this.drawDefaultBackground();
   this.drawCenteredString(
       this.fontRenderer, I18n.func_135053_a("selectServer.direct"), this.width / 2, 20, 16777215);
   this.drawString(
       this.fontRenderer,
       I18n.func_135053_a("addServer.enterIp"),
       this.width / 2 - 100,
       100,
       10526880);
   this.serverTextField.drawTextBox();
   super.drawScreen(par1, par2, par3);
 }
  @Override
  protected void actionPerformed(GuiButton but) {
    if (but == button) {
      showSacrifices = !showSacrifices;

      if (showSacrifices) {
        but.displayString = "Description >";
      } else {
        but.displayString = "< Information";
      }
    } else {
      super.actionPerformed(but);
    }
  }
Esempio n. 24
0
  public void drawScreen(int i, int j, float f) {
    drawDefaultBackground();
    drawCenteredString(fontRenderer, screenTitle, width / 2, 20, 0xffffff);
    int k = func_20080_j();
    for (int l = 0; l < options.keyBindings.length; l++) {
      drawString(
          fontRenderer,
          options.getKeyBindingDescription(l),
          k + (l % 2) * 160 + 70 + 6,
          height / 6 + 24 * (l >> 1) + 7,
          -1);
    }

    super.drawScreen(i, j, f);
  }
Esempio n. 25
0
 @Override
 public void drawScreen(int i, int j, float f) {
   drawRect(2, height - 14, width - 2, height - 2, 0x88000088);
   drawString(
       fontRenderer,
       (new StringBuilder())
           .append("> ")
           .append(message)
           .append(((updateCounter / 6) % 2) != 0 ? "" : "_")
           .toString(),
       4,
       height - 12,
       0xe0e0e0);
   super.drawScreen(i, j, f);
 }
  @Override

  /**
   * Fired when a control is clicked. This is the equivalent of
   * ActionListener.actionPerformed(ActionEvent e).
   */
  protected void actionPerformed(GuiButton button) {
    if (button.enabled) {
      switch (button.id) {
        case 6:
          this.mc.displayGuiScreen(this.mainMenu);
          return;
      }
    }
    super.actionPerformed(button);
  }
Esempio n. 27
0
  /** Called when the mouse is clicked. */
  protected void mouseClicked(int par1, int par2, int par3) {
    super.mouseClicked(par1, par2, par3);

    synchronized (field_104025_t) {
      if (field_92025_p.length() > 0
          && par1 >= field_92022_t
          && par1 <= field_92020_v
          && par2 >= field_92021_u
          && par2 <= field_92019_w) {
        GuiConfirmOpenLink guiconfirmopenlink =
            new GuiConfirmOpenLink(this, field_104024_v, 13, true);
        guiconfirmopenlink.func_92026_h();
        mc.displayGuiScreen(guiconfirmopenlink);
      }
    }
  }
 public void func_73863_a(int p_73863_1_, int p_73863_2_, float p_73863_3_) {
   this.field_74032_v = null;
   StringTranslate var4 = StringTranslate.func_74808_a();
   this.func_73873_v_();
   this.field_74022_d.func_77211_a(p_73863_1_, p_73863_2_, p_73863_3_);
   this.func_73732_a(
       this.field_73886_k,
       var4.func_74805_b("multiplayer.title"),
       this.field_73880_f / 2,
       20,
       16777215);
   super.func_73863_a(p_73863_1_, p_73863_2_, p_73863_3_);
   if (this.field_74032_v != null) {
     this.func_74007_a(this.field_74032_v, p_73863_1_, p_73863_2_);
   }
 }
Esempio n. 29
0
 public void drawScreen(int i, int j, float f) {
   guiTexturePackSlot.drawScreen(i, j, f);
   if (field_6454_o <= 0) {
     mc.texturePackList.updateAvaliableTexturePacks();
     field_6454_o += 20;
   }
   StringTranslate stringtranslate = StringTranslate.getInstance();
   drawCenteredString(
       fontRenderer, stringtranslate.translateKey("texturePack.title"), width / 2, 16, 0xffffff);
   drawCenteredString(
       fontRenderer,
       stringtranslate.translateKey("texturePack.folderInfo"),
       width / 2 - 77,
       height - 26,
       0x808080);
   super.drawScreen(i, j, f);
 }
 @Override
 public void initGui() {
   super.initGui();
   guiLeft = (width - xSize) / 2;
   guiTop = (height - ySize) / 2;
   this.controlList.add(
       button =
           new GuiButton(
               1,
               (width + xSize) / 2 + 2 - offX,
               (height - ySize) / 2 + 2 + ySize - 20,
               (width - xSize) / 2 + offX - 2,
               20,
               "Description >"));
   //        nameField = new GuiTextField(this.fontRenderer, (width-xSize)/2 -
   // offX,(height-ySize)/2-fontRenderer.FONT_HEIGHT-2, xSize,12);
 }