Package net.minecraft.src

Examples of net.minecraft.src.FontRenderer.drawStringWithShadow()


    if (getPing() > 0 && (!isPolling() || showPingWhilePolling)) {
      if (isShowPing()) {
        String sping = getPing() + " ms";
        int pingwidth = font.getStringWidth(sping);
        margin1 = pingwidth + 14;
        font.drawStringWithShadow(sping, x + width - pingwidth - 14, y + 2, 0xaaaaaa);
      }
      String sPlayers = getPlayers() + " / " + getMaxPlayers() + " players";
      int playerswidth = font.getStringWidth(sPlayers);
      margin2 = playerswidth;
      font.drawStringWithShadow(sPlayers, x + width - playerswidth - 2, y + 11, 0xaaaaaa);
View Full Code Here


        font.drawStringWithShadow(sping, x + width - pingwidth - 14, y + 2, 0xaaaaaa);
      }
      String sPlayers = getPlayers() + " / " + getMaxPlayers() + " players";
      int playerswidth = font.getStringWidth(sPlayers);
      margin2 = playerswidth;
      font.drawStringWithShadow(sPlayers, x + width - playerswidth - 2, y + 11, 0xaaaaaa);
    }

    font.drawStringWithShadow(r.getFittingText(title, width - margin1 - marginleft), x + marginleft, y + 2, 0xffffff);
    String sMotd = "";
    if ((getPing() == PollResult.PING_POLLING || isPolling()) && !showPingWhilePolling) {
View Full Code Here

      int playerswidth = font.getStringWidth(sPlayers);
      margin2 = playerswidth;
      font.drawStringWithShadow(sPlayers, x + width - playerswidth - 2, y + 11, 0xaaaaaa);
    }

    font.drawStringWithShadow(r.getFittingText(title, width - margin1 - marginleft), x + marginleft, y + 2, 0xffffff);
    String sMotd = "";
    if ((getPing() == PollResult.PING_POLLING || isPolling()) && !showPingWhilePolling) {
      sMotd = showPing ? "Polling ..." : "Retrieving MOTD";
    } else if (!showPingWhilePolling) {
      switch (getPing()) {
View Full Code Here

      darkness = Math.cos(t * 2 * Math.PI / 1000) * 0.2 + 0.2;
      c1.setBlue(1f - (float)darkness);
      color = c1.toInt();
    }

    font.drawStringWithShadow(r.getFittingText(sMotd, width - 10 - margin2 - marginleft), x + marginleft, y + 11, color);

    GL11.glColor4f(1f, 1f, 1f, 1f);

    // Fancy icons
    int xOffset = 0;
View Full Code Here

    if (isShowPing()) {
      Minecraft.getMinecraft().getTextureManager().bindTexture(new ResourceLocation("textures/gui/icons.png"));     
      RenderUtil.drawTexturedModalRectangle(x + width - 2 - 10, y + 2, 0 + xOffset * 10, 176 + yOffset * 8, 10, 8, 0f);
    }
    if (port != DEFAULT_PORT) {
      font.drawStringWithShadow(ip + ":" +port, x+marginleft, y+20, 0xaaaaaa);
    } else {
      font.drawStringWithShadow(ip, x+marginleft, y+20, 0xaaaaaa);
    }

    // Icon drawing
View Full Code Here

      RenderUtil.drawTexturedModalRectangle(x + width - 2 - 10, y + 2, 0 + xOffset * 10, 176 + yOffset * 8, 10, 8, 0f);
    }
    if (port != DEFAULT_PORT) {
      font.drawStringWithShadow(ip + ":" +port, x+marginleft, y+20, 0xaaaaaa);
    } else {
      font.drawStringWithShadow(ip, x+marginleft, y+20, 0xaaaaaa);
    }

    // Icon drawing
    int iconMargin = 2;

View Full Code Here

    if (pollResult.getVersion() != null) {
      GL11.glPushMatrix();
      versionWidth = font.getStringWidth("1.0.0");
        if (isCompatible(SpoutClient.spoutcraftVersion)) {
          font.drawStringWithShadow(pollResult.getVersion(), x + width - versionWidth - 20, y + 21, 0x00FF00);
        } else {
          font.drawStringWithShadow(pollResult.getVersion(), x + width - versionWidth - 20, y + 21, 0xF44607);
        }
      GL11.glPopMatrix();
    } else {
View Full Code Here

      GL11.glPushMatrix();
      versionWidth = font.getStringWidth("1.0.0");
        if (isCompatible(SpoutClient.spoutcraftVersion)) {
          font.drawStringWithShadow(pollResult.getVersion(), x + width - versionWidth - 20, y + 21, 0x00FF00);
        } else {
          font.drawStringWithShadow(pollResult.getVersion(), x + width - versionWidth - 20, y + 21, 0xF44607);
        }
      GL11.glPopMatrix();
    } else {
      GL11.glPushMatrix();
      versionWidth = font.getStringWidth("Unknown");
View Full Code Here

        }
      GL11.glPopMatrix();
    } else {
      GL11.glPushMatrix();
      versionWidth = font.getStringWidth("Unknown");
      font.drawStringWithShadow("Unknown", x + width - versionWidth - 20, y + 21, 0xFF0000);
      GL11.glPopMatrix();
    }
  }

  public void onClick(int x, int y, boolean doubleClick) {
View Full Code Here

      }

      GL11.glPushMatrix();
      float scale = button.getScale();
      GL11.glScalef(scale, scale, scale);
      font.drawStringWithShadow(text, left, 6, color.toInt());
      GL11.glPopMatrix();
    }
  }

  protected boolean isHovering(Widget widget) {
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.