Пример #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
  @Override
  public void drawScreen(int mouseX, int mouseY, float ticks) {
    rankList.drawScreen(mouseX, mouseY, ticks);

    drawCenteredString(
        fontRendererObj,
        I18n.format(Caveworld.CONFIG_LANG + "select.minerRank"),
        width / 2,
        15,
        0xFFFFFF);

    super.drawScreen(mouseX, mouseY, ticks);

    filterTextField.drawTextBox();

    if (detailHoverChecker.checkHover(mouseX, mouseY)) {
      func_146283_a(
          fontRendererObj.listFormattedStringToWidth(
              I18n.format(Caveworld.CONFIG_LANG + "detail.hover"), 300),
          mouseX,
          mouseY);
    } else if (instantHoverChecker.checkHover(mouseX, mouseY)) {
      func_146283_a(
          fontRendererObj.listFormattedStringToWidth(
              I18n.format(Caveworld.CONFIG_LANG + "instant.hover"), 300),
          mouseX,
          mouseY);
    }
  }
Пример #3
0
  /** Draws the screen and all the components in it. */
  @Override
  public void drawScreen(int mouseX, int mouseY, float par3) {
    GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
    mc.renderEngine.bindTexture(new ResourceLocation("playblock:textures/gui/projector_bg.png"));
    int left = (width - xSize) / 2;
    int top = (height - ySize) / 2;
    drawTexturedModalRect(left, top, 0, 0, xSize, ySize);
    uriField.drawTextBox();
    heightField.drawTextBox();
    widthField.drawTextBox();
    triggerRangeField.drawTextBox();
    fadeRangeField.drawTextBox();

    fontRendererObj.drawString(
        StringUtils.translate("options.url"), left + 10, top + 20, 0xff999999);
    fontRendererObj.drawString(
        StringUtils.translate("options.screenSize"), left + 10, top + 40, 0xff999999);
    fontRendererObj.drawString("x", left + 117, top + 40, 0xff999999);
    fontRendererObj.drawString(
        StringUtils.translate("options.turnOn"), left + 10, top + 60, 0xff999999);
    fontRendererObj.drawString(
        StringUtils.translate("options.blocksAway"), left + 117, top + 60, 0xff999999);
    fontRendererObj.drawString(
        StringUtils.translate("options.turnOff"), left + 10, top + 80, 0xff999999);
    fontRendererObj.drawString(
        StringUtils.translate("options.blocksAway"), left + 117, top + 80, 0xff999999);
    fontRendererObj.drawString("TEST VERSION - skcraft.com", left + 10, top + 132, 0xffffffff);

    super.drawScreen(mouseX, mouseY, par3);
  }
  @Override
  public void drawScreen(int var1, int var2, float var3) {
    this.drawDefaultBackground();
    this.drawCenteredString(this.fontRendererObj, this.screenTitle, this.width / 2, 40, 16777215);

    this.drawCenteredString(
        this.fontRendererObj,
        "Width: " + this.xzSize,
        this.width / 2,
        this.height / 4 + 40,
        16777215);
    this.drawCenteredString(
        this.fontRendererObj,
        "Height: " + this.ySize,
        this.width / 2,
        this.height / 4 + 80,
        16777215);

    GL11.glPushMatrix();
    GL11.glTranslatef((float) (this.width / 2), 0.0F, 50.0F);
    float var4 = 93.75F;
    GL11.glScalef(-var4, -var4, -var4);
    GL11.glRotatef(180.0F, 0.0F, 1.0F, 0.0F);

    GL11.glPopMatrix();
    super.drawScreen(var1, var2, var3);
  }
Пример #5
0
  @Override
  public void drawScreen(int par1, int par2, float par3) {

    this.drawBackground(par1);
    super.drawScreen(par1, par2, par3);

    int posX = (this.width) / 2;
    int posY = (this.height) / 2;
    try {
      fontRendererObj.drawSplitString(
          "Press Enter to confirm", posX + 1 - 75, posY - 1, 180, 0x000000);
      fontRendererObj.drawSplitString("Press Enter to confirm", posX - 75, posY, 180, 0xffffff);

      fontRendererObj.drawSplitString(
          "What Channel do you want to connect to ? : " + channelField.getText(),
          posX + 1 - 75,
          posY - 1 - 20,
          180,
          0x000000);
      fontRendererObj.drawSplitString(
          "What Channel do you want to connect to ? : " + channelField.getText(),
          posX - 75,
          posY - 20,
          180,
          0xff0000);

    } finally {
      if (channelName != null) channelField.drawTextBox();
    }
  }
Пример #6
0
  @Override
  public void drawScreen(int mouseX, int mouseY, float partialTicks) {
    this.drawDefaultBackground();
    this.drawCenteredString(
        this.fontRendererObj, "Debug options", this.width / 2, this.height / 4 - 40, 0xFFFFFF);

    super.drawScreen(mouseX, mouseY, partialTicks);
  }
Пример #7
0
  public void drawScreen(int arg0, int arg1, float arg2) {
    int x = Mouse.getX() / 2;
    int y = (mc.displayHeight - Mouse.getY()) / 2;

    for (String player : TeamInfo.players.keySet()) {
      if ((Mouse.isButtonDown(0))
          && (!((Boolean) TeamInfo.dragable.get(player)).booleanValue())
          && (x >= ((Integer) TeamInfo.toplefti.get(player)).intValue())
          && (x <= ((Integer) TeamInfo.toplefti.get(player)).intValue() + 108.0F * Util.scale)
          && (y >= ((Integer) TeamInfo.topleftj.get(player)).intValue())
          && (y <= ((Integer) TeamInfo.topleftj.get(player)).intValue() + this.size * Util.scale)) {
        if (Keyboard.isKeyDown(Keyboard.KEY_O)) {
          TeamInfo.showgui.put(
              player, Boolean.valueOf(!((Boolean) TeamInfo.showgui.get(player)).booleanValue()));
        }
        int p = 0;
        for (String players : TeamInfo.players.keySet()) {
          if (((Boolean) TeamInfo.dragable.get(players)).booleanValue()) p++;
        }
        if (p < 1) {
          diffu = (x - ((Integer) TeamInfo.toplefti.get(player)).intValue());
          diffv = (y - ((Integer) TeamInfo.topleftj.get(player)).intValue());
          TeamInfo.dragable.put(player, Boolean.valueOf(true));
        }
      } else if ((Mouse.isButtonDown(0))
          && (((Boolean) TeamInfo.dragable.get(player)).booleanValue())) {
        TeamInfo.toplefti.put(player, Integer.valueOf(x - this.diffu));
        TeamInfo.topleftj.put(player, Integer.valueOf(y - this.diffv));
      } else {
        TeamInfo.dragable.put(player, Boolean.valueOf(false));
      }
    }
    for (String player : TeamInfo.players.keySet()) {
      GL11.glTranslatef(
          ((Integer) TeamInfo.toplefti.get(player)).intValue(),
          ((Integer) TeamInfo.topleftj.get(player)).intValue(),
          0.0F);

      int color = 0x20ff0000;
      if (((Boolean) TeamInfo.showgui.get(player)).booleanValue()) {
        color = 0x2000ff00;
      } else {
        drawCenteredString(
            fontRendererObj,
            player,
            (int) (108.0F * Util.scale) / 2,
            (int) (20.0F * Util.scale) / 2,
            0xff00ff00);
      }
      drawRect(0, 0, (int) (108.0F * Util.scale), (int) (20.0F * Util.scale), color);
      GL11.glTranslatef(
          -((Integer) TeamInfo.toplefti.get(player)).intValue(),
          -((Integer) TeamInfo.topleftj.get(player)).intValue(),
          0.0F);
    }
    super.drawScreen(arg0, arg1, arg2);
  }
Пример #8
0
  @Override
  public void drawScreen(int i, int j, float f) {
    if (updatedRecently
        && ThreadClientUpdate.modulesBeingDownloaded == 0
        && !updateProgress.contains("Error")) {
      if (!notified) {
        onFinishedDownloading();
        notified = true;
      }
    } else if (ThreadClientUpdate.hasUpdated && !notified) {
      updateProgress = "You have already downloaded the update. Restart MC!";
    }

    drawDefaultBackground();
    drawCenteredString(
        fontRenderer,
        EnumColor.DARK_BLUE + "Mekanism" + EnumColor.GREY + " by aidancbrady",
        width / 2,
        (height / 4 - 60) + 20,
        0xffffff);
    writeText(
        EnumColor.INDIGO
            + "Mekanism "
            + (Mekanism.versionNumber.comparedState(Version.get(Mekanism.latestVersionNumber)) == -1
                ? EnumColor.DARK_RED
                : EnumColor.GREY)
            + Mekanism.versionNumber,
        36);

    int size = 36;

    for (IModule module : Mekanism.modulesLoaded) {
      size += 9;
      writeText(
          EnumColor.INDIGO
              + "Mekanism"
              + module.getName()
              + (module.getVersion().comparedState(Version.get(Mekanism.latestVersionNumber)) == -1
                  ? EnumColor.DARK_RED
                  : EnumColor.GREY)
              + " "
              + module.getVersion(),
          size);
    }

    writeText(EnumColor.GREY + "Newest version: " + Mekanism.latestVersionNumber, size + 9);
    writeText(EnumColor.GREY + "*Developed on Mac OS X 10.8 Mountain Lion", size + 18);
    writeText(EnumColor.GREY + "*Code, textures, and ideas by aidancbrady", size + 27);
    writeText(
        EnumColor.GREY
            + "Recent news: "
            + EnumColor.DARK_BLUE
            + (!Mekanism.recentNews.contains("null") ? Mekanism.recentNews : "couldn't access."),
        size + 36);
    writeText(EnumColor.GREY + updateProgress, size + 45);
    super.drawScreen(i, j, f);
  }
Пример #9
0
  @Override
  public void drawScreen(int x, int y, float partialTicks) {
    this.guiSchematicLoadSlot.drawScreen(x, y, partialTicks);

    drawCenteredString(this.fontRenderer, this.strTitle, this.width / 2, 4, 0x00FFFFFF);
    drawCenteredString(
        this.fontRenderer, this.strFolderInfo, this.width / 2 - 78, this.height - 12, 0x00808080);

    super.drawScreen(x, y, partialTicks);
  }
  public void drawScreen(int x, int y, float ticks) {
    drawDefaultBackground();
    int guiY = (height - guiheight);
    int guiX = (width - guiwidth);
    mc.renderEngine.bindTexture(
        new ResourceLocation(Reference.MODID, "textures/gui/freddymask.png"));
    drawTexturedModalRect(guiY, guiX, 0, 0, guiwidth, guiheight);
    super.drawScreen(y, x, ticks);

    // fontRendererObj.drawString("Welcome Dev! This is the Developer portal.", guiX + 40, guiY + 5,
    // 0xFFFFFF );
  }
Пример #11
0
  public void drawScreen(int par1, int par2, float par3, boolean draw) {
    if (draw) {
      this.drawDefaultBackground();

      if (firstTime) {
        this.drawCenteredString(
            this.fontRenderer,
            "Hey there! This seems like the first time you are starting TPPI. Welcome!",
            this.width / 2,
            this.height / 2 - 100,
            0xFFFFFF);
        this.drawCenteredString(
            this.fontRenderer,
            "This menu will not show again unless enabled in the TPPI Tweaks config.",
            this.width / 2,
            this.height / 2 - 10,
            0xFFFFFF);
        this.drawCenteredString(
            this.fontRenderer,
            "Alternatively, you may use the command \"/tppi download\" to show it in-game.",
            this.width / 2,
            this.height / 2,
            0xFFFFFF);
      }

      this.drawCenteredString(
          this.fontRenderer,
          "As it turns out, there are some mods we really wanted to include,",
          this.width / 2,
          this.height / 2 - 80,
          0xFFFFFF);
      this.drawCenteredString(
          this.fontRenderer,
          "but couldn't ship directly with the rest of the pack.",
          this.width / 2,
          this.height / 2 - 70,
          0xFFFFFF);
      this.drawCenteredString(
          this.fontRenderer,
          "Though we had to leave them out, we built this little utility to",
          this.width / 2,
          this.height / 2 - 50,
          0xFFFFFF);
      this.drawCenteredString(
          this.fontRenderer,
          "help you all add them manually, to gain what we feel is the full TPPI experience.",
          this.width / 2,
          this.height / 2 - 40,
          0xFFFFFF);
    }

    super.drawScreen(par1, par2, par3);
  }
Пример #12
0
  public void drawScreen(int mouseX, int mouseY, float partialTicks) {
    this.drawDefaultBackground();
    this.drawCenteredString(
        this.fontRendererObj,
        I18n.format("advMode.setCommand", new Object[0]),
        this.width / 2,
        20,
        16777215);
    this.drawString(
        this.fontRendererObj,
        I18n.format("advMode.command", new Object[0]),
        this.width / 2 - 150,
        37,
        10526880);
    this.commandTextField.drawTextBox();
    byte b0 = 75;
    String s = I18n.format("advMode.nearestPlayer", new Object[0]);
    int i1 = this.width / 2 - 150;
    int l = 0;
    this.drawString(
        this.fontRendererObj,
        I18n.format("advMode.nearestPlayer", new Object[0]),
        i1,
        b0 + l++ * this.fontRendererObj.FONT_HEIGHT,
        10526880);
    this.drawString(
        this.fontRendererObj,
        I18n.format("advMode.allPlayers", new Object[0]),
        i1,
        b0 + l++ * this.fontRendererObj.FONT_HEIGHT,
        10526880);
    this.drawString(
        this.fontRendererObj,
        I18n.format("advMode.allEntities", new Object[0]),
        i1,
        b0 + l++ * this.fontRendererObj.FONT_HEIGHT,
        10526880);
    this.drawString(
        this.fontRendererObj, "", i1, b0 + l++ * this.fontRendererObj.FONT_HEIGHT, 10526880);

    if (this.outputTextField.getText().length() > 0) {
      this.drawString(
          this.fontRendererObj,
          I18n.format("advMode.previousOutput", new Object[0]),
          i1,
          b0 + l * this.fontRendererObj.FONT_HEIGHT + 16,
          10526880);
      this.outputTextField.drawTextBox();
    }

    super.drawScreen(mouseX, mouseY, partialTicks);
  }
Пример #13
0
  /** Draws the screen and all the components in it. */
  public void drawScreen(int p_73863_1_, int p_73863_2_, float p_73863_3_) {
    this.drawDefaultBackground();
    this.drawCenteredString(
        this.fontRendererObj,
        I18n.format("sign.edit", new Object[0]),
        this.width / 2,
        40,
        16777215);
    GL11.glPushMatrix();
    GL11.glTranslatef((float) (this.width / 2), 0.0F, 50.0F);
    float f1 = 93.75F;
    GL11.glScalef(-f1, -f1, -f1);
    GL11.glRotatef(180.0F, 0.0F, 1.0F, 0.0F);
    Block block = this.tileSign.getBlockType();

    if (block == Blocks.standing_sign) {
      float f2 = (float) (this.tileSign.getBlockMetadata() * 360) / 16.0F;
      GL11.glRotatef(f2, 0.0F, 1.0F, 0.0F);
      GL11.glTranslatef(0.0F, -1.0625F, 0.0F);
    } else {
      int k = this.tileSign.getBlockMetadata();
      float f3 = 0.0F;

      if (k == 2) {
        f3 = 180.0F;
      }

      if (k == 4) {
        f3 = 90.0F;
      }

      if (k == 5) {
        f3 = -90.0F;
      }

      GL11.glRotatef(f3, 0.0F, 1.0F, 0.0F);
      GL11.glTranslatef(0.0F, -1.0625F, 0.0F);
    }

    if (this.updateCounter / 6 % 2 == 0) {
      this.tileSign.lineBeingEdited = this.editLine;
    }

    TileEntityRendererDispatcher.instance.renderTileEntityAt(
        this.tileSign, -0.5D, -0.75D, -0.5D, 0.0F);
    this.tileSign.lineBeingEdited = -1;
    GL11.glPopMatrix();
    super.drawScreen(p_73863_1_, p_73863_2_, p_73863_3_);
  }
  /** Draws the screen and all the components in it. Args : mouseX, mouseY, renderPartialTicks */
  public void drawScreen(int x, int y, float z) {
    this.drawDefaultBackground();
    this.drawCenteredString(
        this.fontRendererObj, this.screenTitle, this.width / 2, this.is64bit ? 20 : 5, 16777215);

    if (!this.is64bit && this.guiGameSettings.renderDistanceChunks > 8) {;
    }

    super.drawScreen(x, y, z);

    if (Math.abs(x - this.lastMouseX) <= 5 && Math.abs(y - this.lastMouseY) <= 5) {
      short activateDelay = 700;

      if (System.currentTimeMillis() >= this.mouseStillTime + (long) activateDelay) {
        int x1 = this.width / 2 - 150;
        int y1 = this.height / 6 - 5;

        if (y <= y1 + 98) {
          y1 += 105;
        }

        int x2 = x1 + 150 + 150;
        int y2 = y1 + 84 + 10;
        GuiButton btn = this.getSelectedButton(x, y);

        if (btn != null) {
          String s = this.getButtonName(btn.displayString);
          String[] lines = this.getTooltipLines(s);

          if (lines == null) {
            return;
          }

          this.drawGradientRect(x1, y1, x2, y2, -536870912, -536870912);

          for (int i = 0; i < lines.length; ++i) {
            String line = lines[i];
            this.fontRendererObj.func_175063_a(
                line, (float) (x1 + 5), (float) (y1 + 5 + i * 11), 14540253);
          }
        }
      }
    } else {
      this.lastMouseX = x;
      this.lastMouseY = y;
      this.mouseStillTime = System.currentTimeMillis();
    }
  }
Пример #15
0
  public void drawScreen(int par1, int par2, float par3) {
    this.drawDefaultBackground();
    final int var5 = (this.width - this.width / 4) / 2;
    final int var6 = (this.height - this.height / 4) / 2;

    if (this.initialized) {
      this.drawCenteredString(
          this.fontRendererObj,
          "Join Space Race",
          this.width / 2,
          this.height / 2 - this.height / 3 - 15,
          16777215);
      this.drawFlagButton(par1, par2);
      this.drawCenteredString(
          this.fontRendererObj,
          "Owner: " + this.spaceRaceData.getPlayerNames().get(0),
          this.width / 2,
          (int) (this.buttonFlag_yPosition + this.buttonFlag_height + 25),
          GCCoreUtil.to32BitColor(255, 150, 150, 150));
      this.drawCenteredString(
          this.fontRendererObj,
          this.spaceRaceData.getPlayerNames().size() + " members",
          this.width / 2,
          (int) (this.buttonFlag_yPosition + this.buttonFlag_height + 40),
          GCCoreUtil.to32BitColor(255, 150, 150, 150));
      GL11.glPushMatrix();
      GL11.glTranslatef(
          this.width / 2,
          (int) (this.buttonFlag_yPosition + this.buttonFlag_height + 5)
              + FMLClientHandler.instance().getClient().fontRenderer.FONT_HEIGHT / 2,
          0);
      GL11.glScalef(1.5F, 1.5F, 1.0F);
      GL11.glTranslatef(
          -this.width / 2,
          (int) -(this.buttonFlag_yPosition + this.buttonFlag_height + 5)
              - FMLClientHandler.instance().getClient().fontRenderer.FONT_HEIGHT / 2,
          0);
      this.drawCenteredString(
          this.fontRendererObj,
          this.spaceRaceData.getTeamName(),
          this.width / 2,
          (int) (this.buttonFlag_yPosition + this.buttonFlag_height + 5),
          GCCoreUtil.to32BitColor(255, 100, 150, 20));
      GL11.glPopMatrix();
    }

    super.drawScreen(par1, par2, par3);
  }
  @Override
  public void drawScreen(int par1, int par2, float par3) {
    final int var5 = (this.width - this.xSize) / 2;
    final int var6 = (this.height - this.ySize) / 2;

    this.mc.renderEngine.bindTexture(GuiAirLockController.airLockControllerGui);
    this.drawTexturedModalRect(var5, var6, 0, 0, this.xSize, this.ySize);

    this.drawTexturedModalRect(var5 + 15, var6 + 51, 176, 0, 7, 9);

    String displayString = this.controller.ownerName + "\'s " + "Air Lock Controller";
    this.fontRendererObj.drawString(
        displayString,
        this.width / 2 - this.fontRendererObj.getStringWidth(displayString) / 2,
        this.height / 2 - 65,
        4210752);

    if (this.cannotEditTimer > 0) {
      this.fontRendererObj.drawString(
          this.controller.ownerName,
          this.width / 2 - this.fontRendererObj.getStringWidth(displayString) / 2,
          this.height / 2 - 65,
          this.cannotEditTimer % 30 < 15 ? GCCoreUtil.to32BitColor(255, 255, 100, 100) : 4210752);
      this.cannotEditTimer--;
    }

    displayString = "Status:";
    this.fontRendererObj.drawString(
        displayString,
        this.width / 2 - this.fontRendererObj.getStringWidth(displayString) / 2,
        this.height / 2 + 45,
        4210752);
    displayString = "Air Lock Closed";

    if (this.controller.active) {
      displayString = "Air Lock Closed";
    } else {
      displayString = "Air Lock Open";
    }

    this.fontRendererObj.drawString(
        displayString,
        this.width / 2 - this.fontRendererObj.getStringWidth(displayString) / 2,
        this.height / 2 + 55,
        4210752);

    super.drawScreen(par1, par2, par3);
  }
Пример #17
0
 /** Draws the screen and all the components in it. */
 public void drawScreen(int p_73863_1_, int p_73863_2_, float p_73863_3_) {
   this.field_146450_f.func_148128_a(p_73863_1_, p_73863_2_, p_73863_3_);
   this.drawCenteredString(
       this.fontRendererObj,
       I18n.format("options.language", new Object[0]),
       this.width / 2,
       16,
       16777215);
   this.drawCenteredString(
       this.fontRendererObj,
       "(" + I18n.format("options.languageWarning", new Object[0]) + ")",
       this.width / 2,
       this.height - 56,
       8421504);
   super.drawScreen(p_73863_1_, p_73863_2_, p_73863_3_);
 }
Пример #18
0
  /** Draws the screen and all the components in it. */
  public void drawScreen(int par1, int par2, float par3) {
    this.drawDefaultBackground();
    this.snooperList.drawScreen(par1, par2, par3);
    this.drawCenteredString(this.fontRenderer, this.snooperTitle, this.width / 2, 8, 16777215);
    int k = 22;
    String[] astring = this.field_74101_n;
    int l = astring.length;

    for (int i1 = 0; i1 < l; ++i1) {
      String s = astring[i1];
      this.drawCenteredString(this.fontRenderer, s, this.width / 2, k, 8421504);
      k += this.fontRenderer.FONT_HEIGHT;
    }

    super.drawScreen(par1, par2, par3);
  }
Пример #19
0
 /** Draws the screen and all the components in it. */
 public void drawScreen(int par1, int par2, float par3) {
   this.drawDefaultBackground();
   this.drawCenteredString(
       this.fontRendererObj,
       I18n.format("lanServer.title", new Object[0]),
       this.width / 2,
       50,
       16777215);
   this.drawCenteredString(
       this.fontRendererObj,
       I18n.format("lanServer.otherPlayers", new Object[0]),
       this.width / 2,
       82,
       16777215);
   super.drawScreen(par1, par2, par3);
 }
Пример #20
0
 /** Draws the screen and all the components in it. */
 @Override
 public void drawScreen(int par1, int par2, float par3) {
   drawDefaultBackground();
   drawCenteredString(fontRendererObj, "Wurst Options", width / 2, 40, 0xffffff);
   drawCenteredString(
       fontRendererObj, "Settings", width / 2 - 104, height / 4 + 24 - 28, 0xcccccc);
   drawCenteredString(fontRendererObj, "Managers", width / 2, height / 4 + 24 - 28, 0xcccccc);
   drawCenteredString(fontRendererObj, "Online", width / 2 + 104, height / 4 + 24 - 28, 0xcccccc);
   super.drawScreen(par1, par2, par3);
   for (int i = 0; i < buttonList.size(); i++) {
     GuiButton button = (GuiButton) buttonList.get(i);
     if (button.isMouseOver() && !toolTips[button.id].isEmpty()) {
       ArrayList toolTip = Lists.newArrayList(toolTips[button.id].split("\n"));
       drawHoveringText(toolTip, par1, par2);
       break;
     }
   }
 }
Пример #21
0
  /** Draws the screen and all the components in it. */
  public void drawScreen(int p_73863_1_, int p_73863_2_, float p_73863_3_) {
    this.drawDefaultBackground();
    this.drawCenteredString(
        this.fontRendererObj, this.field_152319_i, this.width / 2, 20, 16777215);
    this.drawCenteredString(
        this.fontRendererObj, this.field_152313_r, this.width / 2, this.field_152314_s, 16777215);

    if (this.field_152315_t) {
      this.drawCenteredString(
          this.fontRendererObj,
          EnumChatFormatting.RED + I18n.format("options.stream.changes", new Object[0]),
          this.width / 2,
          20 + this.fontRendererObj.FONT_HEIGHT,
          16777215);
    }

    super.drawScreen(p_73863_1_, p_73863_2_, p_73863_3_);
  }
  @Override
  public void drawScreen(int mouseX, int mouseY, float partialTicks) {
    this.drawDefaultBackground();

    // Clamp bottomLocation.
    if (bottomLocation < TOP_HEIGHT + 32) {
      bottomLocation = TOP_HEIGHT + 32;
    }
    if (bottomLocation > height - MIDDLE_HEIGHT - BOTTOM_HEIGHT - 32) {
      bottomLocation = height - MIDDLE_HEIGHT - BOTTOM_HEIGHT - 32;
    }

    this.list.drawScreen(mouseX, mouseY, partialTicks);
    this.details.drawScreen(mouseX, mouseY, partialTicks);

    this.drawCenteredString(this.fontRendererObj, "WDL extensions", this.width / 2, 8, 0xFFFFFF);

    super.drawScreen(mouseX, mouseY, partialTicks);
  }
Пример #23
0
 /** Draws the screen and all the components in it. Args : mouseX, mouseY, renderPartialTicks */
 @Override
 public void drawScreen(int mouseX, int mouseY, float partialTicks) {
   this.drawDefaultBackground();
   int offset = Math.max(85 - 2 * 10, 10);
   this.drawCenteredString(
       this.fontRendererObj,
       "Forge Mod Loader could not connect to this server",
       this.width / 2,
       offset,
       0xFFFFFF);
   offset += 10;
   this.drawCenteredString(
       this.fontRendererObj,
       String.format("The server %s has forbidden modded access", data.serverName),
       this.width / 2,
       offset,
       0xFFFFFF);
   super.drawScreen(mouseX, mouseY, partialTicks);
 }
Пример #24
0
  @Override
  public void drawScreen(int par1, int par2, float par3) {
    drawDefaultBackground();

    nameBox.drawTextBox();

    super.drawScreen(par1, par2, par3);

    for (int a = 0; a < 8; a++) {
      this.drawRect(0 + a, 0 + a, width - a, topSectionHeight - a, 0x22aaaaaa);
    }

    for (int a = 0; a < buttonList.size(); a++) {
      if (buttonList.get(a) instanceof ButtonCloneOption) {
        if (((ButtonCloneOption) buttonList.get(a)).isHovering(par1, par2)) {
          CloneOption option = ((ButtonCloneOption) buttonList.get(a)).option;
          String info = option.getInfo();
          int sWidth = mc.fontRenderer.getStringWidth(info);
          String[] data;
          if (sWidth > width / 1.5) {
            data = splitString(info, (int) Math.ceil(sWidth / ((double) (width / 1.5))));
          } else {
            data = new String[] {info};
          }

          int middleY = topSectionHeight / 2 - 4;

          int txtHeight = 7;
          int spacing = 4;
          int totalHeight = data.length * (txtHeight + spacing) - spacing;
          int heightHalf = totalHeight / 2;

          for (int b = 0; b < data.length; b++) {
            int yPos = middleY - heightHalf + (b * (txtHeight + spacing));
            this.drawCenteredString(mc.fontRenderer, data[b], width / 2, yPos, 0xffffffff);
          }
          break;
        }
      }
    }
  }
Пример #25
0
 /** Draws the screen and all the components in it. Args : mouseX, mouseY, renderPartialTicks */
 public void drawScreen(int mouseX, int mouseY, float partialTicks) {
   this.drawDefaultBackground();
   int i = (this.width - 248) / 2 + 10;
   int j = (this.height - 166) / 2 + 8;
   this.fontRendererObj.drawString(I18n.format("demo.help.title", new Object[0]), i, j, 2039583);
   j = j + 12;
   GameSettings gamesettings = this.mc.gameSettings;
   this.fontRendererObj.drawString(
       I18n.format(
           "demo.help.movementShort",
           new Object[] {
             GameSettings.getKeyDisplayString(gamesettings.keyBindForward.getKeyCode()),
             GameSettings.getKeyDisplayString(gamesettings.keyBindLeft.getKeyCode()),
             GameSettings.getKeyDisplayString(gamesettings.keyBindBack.getKeyCode()),
             GameSettings.getKeyDisplayString(gamesettings.keyBindRight.getKeyCode())
           }),
       i,
       j,
       5197647);
   this.fontRendererObj.drawString(
       I18n.format("demo.help.movementMouse", new Object[0]), i, j + 12, 5197647);
   this.fontRendererObj.drawString(
       I18n.format(
           "demo.help.jump",
           new Object[] {GameSettings.getKeyDisplayString(gamesettings.keyBindJump.getKeyCode())}),
       i,
       j + 24,
       5197647);
   this.fontRendererObj.drawString(
       I18n.format(
           "demo.help.inventory",
           new Object[] {
             GameSettings.getKeyDisplayString(gamesettings.keyBindInventory.getKeyCode())
           }),
       i,
       j + 36,
       5197647);
   this.fontRendererObj.drawSplitString(
       I18n.format("demo.help.fullWrapped", new Object[0]), i, j + 68, 218, 2039583);
   super.drawScreen(mouseX, mouseY, partialTicks);
 }
Пример #26
0
 /** Draws the screen and all the components in it. Args : mouseX, mouseY, renderPartialTicks */
 public void drawScreen(int mouseX, int mouseY, float partialTicks) {
   if (this.doesGuiPauseGame) {
     this.drawDefaultBackground();
     this.drawCenteredString(
         this.fontRenderer,
         Translator.format("multiplayer.downloadingStats", new Object[0]),
         this.width / 2,
         this.height / 2,
         16777215);
     this.drawCenteredString(
         this.fontRenderer,
         lanSearchStates[(int) (Minecraft.getSystemTime() / 150L % (long) lanSearchStates.length)],
         this.width / 2,
         this.height / 2 + this.fontRenderer.FONT_HEIGHT * 2,
         16777215);
   } else {
     this.displaySlot.drawScreen(mouseX, mouseY, partialTicks);
     this.drawCenteredString(this.fontRenderer, this.screenTitle, this.width / 2, 20, 16777215);
     super.drawScreen(mouseX, mouseY, partialTicks);
   }
 }
  /** Draws the screen and all the components in it. */
  public void drawScreen(int par1, int par2, float par3) {
    this.drawDefaultBackground();
    this.drawCenteredString(
        this.fontRenderer, this.field_96212_d, this.width / 2, this.height / 2 - 50, 16777215);
    this.drawCenteredString(this.fontRenderer, "", this.width / 2, this.height / 2 - 10, 16777215);

    if (!this.field_96219_n) {
      this.drawCenteredString(
          this.fontRenderer,
          field_96217_a[this.field_96216_q % field_96217_a.length],
          this.width / 2,
          this.height / 2 + 15,
          8421504);
    }

    if (this.field_96219_n) {
      this.drawCenteredString(
          this.fontRenderer, this.field_96220_o, this.width / 2, this.height / 2 + 15, 16711680);
    }

    super.drawScreen(par1, par2, par3);
  }
Пример #28
0
  @Override
  public void drawScreen(int par1, int par2, float par3) {
    if (mc == null) {
      mc = Minecraft.getMinecraft();
      fontRendererObj = mc.fontRenderer;
    }
    drawDefaultBackground();

    GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
    this.mc.getTextureManager().bindTexture(texMaker);
    int k = this.guiLeft;
    int l = this.guiTop;
    this.drawTexturedModalRect(k, l, 0, 0, xSize, ySize);

    drawString(
        fontRendererObj,
        StatCollector.translateToLocal("hats.trade.selectTrader"),
        this.guiLeft + 1,
        this.guiTop - 9,
        0xffffff);

    super.drawScreen(par1, par2, par3);
  }
 /** Draws the screen and all the components in it. Args : mouseX, mouseY, renderPartialTicks */
 public void drawScreen(int mouseX, int mouseY, float partialTicks) {
   this.drawDefaultBackground();
   this.drawCenteredString(
       this.fontRendererObj,
       I18n.format("addServer.title", new Object[0]),
       this.width / 2,
       17,
       16777215);
   this.drawString(
       this.fontRendererObj,
       I18n.format("addServer.enterName", new Object[0]),
       this.width / 2 - 100,
       53,
       10526880);
   this.drawString(
       this.fontRendererObj,
       I18n.format("addServer.enterIp", new Object[0]),
       this.width / 2 - 100,
       94,
       10526880);
   this.serverNameField.drawTextBox();
   this.serverIPField.drawTextBox();
   super.drawScreen(mouseX, mouseY, partialTicks);
 }
Пример #30
0
  @Override
  public void drawScreen(int i, int j, float f) {
    // TODO : Draw the inventory BG and slots for the class menu
    GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
    mc.renderEngine.bindTexture(texture);
    drawTexturedModalRect(width / 2 - 128, height / 2 - guiHeight / 2, 0, 0, 256, 22);
    drawTexturedModalRect(width / 2 - 128, height / 2 + guiHeight / 2 - 6, 0, 73, 256, 7);
    if (classMenu) {
      for (int n = 0; n < classChoices.length; n++) {
        drawTexturedModalRect(
            width / 2 - 128, height / 2 - guiHeight / 2 + 22 + 24 * n, 0, 23, 256, 24);
      }
    } else {
      for (int n = 0; n < teamChoices.length; n++) {
        drawTexturedModalRect(
            width / 2 - 128, height / 2 - guiHeight / 2 + 22 + 24 * n, 0, 48, 256, 24);
      }
    }
    fontRendererObj.drawStringWithShadow(
        classMenu ? "Choose a Class" : "Choose a Team",
        width / 2 - 120,
        height / 2 - guiHeight / 2 + 8,
        0xffffff);

    super.drawScreen(i, j, f);
    if (classMenu) {
      for (int n = 0; n < classChoices.length; n++) {
        for (int m = 0; m < classChoices[n].startingItems.size(); m++) {
          drawSlotInventory(
              classChoices[n].startingItems.get(m),
              width / 2 - 128 + 85 + 18 * m,
              height / 2 - guiHeight / 2 + 26 + 24 * n);
        }
      }
    }
  }