/** 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 draw(int mouseX, int mouseY, float partialTickTime) {
   if (!visible) {
     return;
   }
   drawGradientRect(this.x, this.y, this.x + this.width, this.y + height, 0xC0101010, 0xD0101010);
   super.draw(mouseX, mouseY, partialTickTime);
   fontRenderer.drawString("Username:"******"Password:", this.x + 5, this.y + 35, 0xEEEEEE);
   textboxUsername.drawTextBox();
   textboxPassword.drawTextBox();
 }
  @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);
    }
  }
Exemple #4
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();
    }
  }
  @Override
  protected void drawGuiContainerBackgroundLayer(float par1, int par2, int par3) {
    super.drawGuiContainerBackgroundLayer(par1, par2, par3);

    int j = (width - xSize) / 2;
    int k = (height - ySize) / 2;
    input.drawTextBox();
    int color = 4210752;
    if (range > ((RangedEffect) pwr).getMaxRange()) color = 0xff0000;
    api.drawCenteredStringNoShadow(
        fontRendererObj,
        String.format("(%d)", ((RangedEffect) pwr).getRange()),
        j + xSize / 2 + 58,
        k + 25,
        color);
  }
  public void drawSearchBar() {
    if (searchBar.getVisible()) {
      searchBar.drawTextBox();
      GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
      GlStateManager.enableBlend();
      GlStateManager.blendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);

      this.mc
          .getTextureManager()
          .bindTexture(us.ichun.mods.hats.client.gui.GuiHatSelection.texIcons);

      drawTexturedModalRect(this.width / 2 - 85, height - 22, 128, 0, 16, 16);

      GlStateManager.disableBlend();
    }
  }
  @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;
        }
      }
    }
  }
  @Override
  public void drawScreen(int sizeX, int sizeY, float offset) {
    drawDefaultBackground();

    if (isMale) {
      drawCenteredString(
          fontRendererObj,
          MCA.getInstance().getLanguageLoader().getString("gui.title.namebaby.male"),
          width / 2,
          (height / 2) - 90,
          0xffffff);
    } else {
      drawCenteredString(
          fontRendererObj,
          MCA.getInstance().getLanguageLoader().getString("gui.title.namebaby.female"),
          width / 2,
          (height / 2) - 90,
          0xffffff);
    }

    drawString(
        fontRendererObj,
        MCA.getInstance().getLanguageLoader().getString("gui.title.namebaby"),
        width / 2 - 100,
        height / 2 - 70,
        0xa0a0a0);

    if (containsInvalidCharacters) {
      drawCenteredString(
          fontRendererObj,
          MCA.getInstance().getLanguageLoader().getString("gui.info.namebaby.invalidcharacters"),
          width / 2,
          (height / 2) + 20,
          0xCC0000);
    }

    babyNameTextField.drawTextBox();
    super.drawScreen(sizeX, sizeY, offset);
  }
 @Override
 protected void drawGuiContainerForegroundLayer(int par1, int par2) {
   fontRendererObj.drawString(
       name, (xSize - fontRendererObj.getStringWidth(name)) / 2, 6, 0x404040);
   if (textboxHeat != null) textboxHeat.drawTextBox();
 }
  @Override
  protected void drawGuiContainerForegroundLayer(int param1, int param2) {
    FontRenderer fontRenderer = Minecraft.getMinecraft().fontRenderer;
    fontRenderer.drawString("Targeting options:", 10, 8, 0);
    fontRenderer.drawString("Add Trusted Player:", 10, 87, 0);

    if (this.base.getTrustedPlayers().size() == 0) {
      fontRenderer.drawString("\u00A7f<No trusted players to edit>", 10, 124, 0);
    } else {
      fontRenderer.drawString(
          base.getTrustedPlayers().get(base.trustedPlayerIndex).getName() + "'s Permissions:",
          10,
          124,
          0);
    }

    textFieldAddTrustedPlayer.drawTextBox();

    int k = (this.width - this.xSize) / 2;
    int l = (this.height - this.ySize) / 2;

    // x + 114, y + 98, 51, 20
    if (mouseX > k + 114 && mouseX < k + 114 + 51) {
      if (mouseY > l + 98 && mouseY < l + 98 + 20) {
        ArrayList list = new ArrayList();
        list.add("Adds the given player to the turret's trusted list.");
        this.drawHoveringText(list, mouseX - k, mouseY - l, fontRenderer);
      }
    }

    if (mouseX > k + 35 && mouseX < k + 35 + 30) {
      if (mouseY > l + 135 && mouseY < l + 135 + 20) {
        ArrayList list = new ArrayList();
        list.add("Removes the viewed trusted player from the turret's trusted player list.");
        this.drawHoveringText(list, mouseX - k, mouseY - l, fontRenderer);
      }
    }

    if (mouseX > k + 10 && mouseX < k + 10 + 20) {
      if (mouseY > l + 135 && mouseY < l + 135 + 20) {
        ArrayList list = new ArrayList();
        list.add("View previous trusted player.");
        this.drawHoveringText(list, mouseX - k, mouseY - l, fontRenderer);
      }
    }

    if (mouseX > k + 145 && mouseX < k + 145 + 20) {
      if (mouseY > l + 135 && mouseY < l + 135 + 20) {
        ArrayList list = new ArrayList();
        list.add("View next trusted player.");
        this.drawHoveringText(list, mouseX - k, mouseY - l, fontRenderer);
      }
    }

    // x + 70,y + 135,23,20,
    if (mouseX > k + 70 && mouseX < k + 70 + 23) {
      if (mouseY > l + 135 && mouseY < l + 135 + 20) {
        ArrayList list = new ArrayList();
        list.add("If the viewed trusted player can open this turret base's gui.");
        this.drawHoveringText(list, mouseX - k, mouseY - l, fontRenderer);
      }
    }

    // x + 93,y + 135,23,20,
    if (mouseX > k + 93 && mouseX < k + 93 + 23) {
      if (mouseY > l + 135 && mouseY < l + 135 + 20) {
        ArrayList list = new ArrayList();
        list.add("If the viewed trusted player can change the base's targeting parameters.");
        this.drawHoveringText(list, mouseX - k, mouseY - l, fontRenderer);
      }
    }

    // x + 116,y + 135,23,20,
    if (mouseX > k + 116 && mouseX < k + 116 + 23) {
      if (mouseY > l + 135 && mouseY < l + 135 + 20) {
        ArrayList list = new ArrayList();
        list.add(
            "If the viewed trusted player can administer this turret (trusted players and dropping it).");
        this.drawHoveringText(list, mouseX - k, mouseY - l, fontRenderer);
      }
    }
  }