Package net.minecraft.src

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


      float scale = label.getScale();
      float reset = 1 / scale;
      GL11.glScalef(scale, scale, scale);
      if (label.hasShadow()) {
        font.drawStringWithShadow(lines[i], (int) left, i * 10, label.getTextColor().toInt());
      } else {
        font.drawString(lines[i], (int) left, i * 10, label.getTextColor().toInt());
      }
      GL11.glScalef(reset, reset, reset);
    }
View Full Code Here


      while (iter.hasNext()) {
        line = iter.next();
        if (lineNum == cursor[0]) {
          cursorOffset = font.getStringWidth(line.substring(0, cursor[1]));
        }
        font.drawStringWithShadow(line, x, y + (GenericTextField.LINE_HEIGHT + GenericTextField.LINE_SPACING) * lineNum++, color);
      }
    } else if (!textField.isFocus()) {
      font.drawStringWithShadow(textField.getPlaceholder(), x, y, color);
    }
    boolean showCursor = textField.isEnabled() && textField.isFocus() && shouldRenderCursor;
View Full Code Here

          cursorOffset = font.getStringWidth(line.substring(0, cursor[1]));
        }
        font.drawStringWithShadow(line, x, y + (GenericTextField.LINE_HEIGHT + GenericTextField.LINE_SPACING) * lineNum++, color);
      }
    } else if (!textField.isFocus()) {
      font.drawStringWithShadow(textField.getPlaceholder(), x, y, color);
    }
    boolean showCursor = textField.isEnabled() && textField.isFocus() && shouldRenderCursor;
    if (showCursor) {
      font.drawStringWithShadow("_", x + cursorOffset, y + (GenericTextField.LINE_HEIGHT + GenericTextField.LINE_SPACING) * cursor[0] + 1, color);
    }
View Full Code Here

    } else if (!textField.isFocus()) {
      font.drawStringWithShadow(textField.getPlaceholder(), x, y, color);
    }
    boolean showCursor = textField.isEnabled() && textField.isFocus() && shouldRenderCursor;
    if (showCursor) {
      font.drawStringWithShadow("_", x + cursorOffset, y + (GenericTextField.LINE_HEIGHT + GenericTextField.LINE_SPACING) * cursor[0] + 1, color);
    }

  }

  public void render(GenericTexture texture) {
View Full Code Here

    return 11;
  }

  public void render(int x, int y, int width, int height) {
    FontRenderer font = SpoutClient.getHandle().fontRenderer;
    font.drawStringWithShadow("S", x + 2, y + 2, 0xffff0000);
    int w = font.getStringWidth("S");
    font.drawStringWithShadow(getName(), x + w + 4, y + 2, !isConflicting() ? 0xffffffff:0xffff0000);
    String keyString = parent.getEditingItem() == this ? "> <" : getDisplayKey();
    w = font.getStringWidth(keyString);
    font.drawStringWithShadow(keyString, width - w, y + 2, 0xffcccccc);
View Full Code Here

  public void render(int x, int y, int width, int height) {
    FontRenderer font = SpoutClient.getHandle().fontRenderer;
    font.drawStringWithShadow("S", x + 2, y + 2, 0xffff0000);
    int w = font.getStringWidth("S");
    font.drawStringWithShadow(getName(), x + w + 4, y + 2, !isConflicting() ? 0xffffffff:0xffff0000);
    String keyString = parent.getEditingItem() == this ? "> <" : getDisplayKey();
    w = font.getStringWidth(keyString);
    font.drawStringWithShadow(keyString, width - w, y + 2, 0xffcccccc);
  }
View Full Code Here

    font.drawStringWithShadow("S", x + 2, y + 2, 0xffff0000);
    int w = font.getStringWidth("S");
    font.drawStringWithShadow(getName(), x + w + 4, y + 2, !isConflicting() ? 0xffffffff:0xffff0000);
    String keyString = parent.getEditingItem() == this ? "> <" : getDisplayKey();
    w = font.getStringWidth(keyString);
    font.drawStringWithShadow(keyString, width - w, y + 2, 0xffcccccc);
  }

  public String getDisplayKey() {
    if (binding.keyCode == -128) {
      return "Unbound";
View Full Code Here

    return 11;
  }

  public void render(int x, int y, int width, int height) {
    FontRenderer font = SpoutClient.getHandle().fontRenderer;
    font.drawStringWithShadow("V", x + 2, y + 2, 0xffffff00);
    int w = font.getStringWidth("V");
    font.drawStringWithShadow(getName(), x + w + 4, y + 2, !isConflicting() ? 0xffffffff:0xffff0000);
    String keyString = parent.getEditingItem() == this ? "> <" : getDisplayKey();;
    w = font.getStringWidth(keyString);
    font.drawStringWithShadow(keyString, width - w, y + 2, 0xffcccccc);
View Full Code Here

  public void render(int x, int y, int width, int height) {
    FontRenderer font = SpoutClient.getHandle().fontRenderer;
    font.drawStringWithShadow("V", x + 2, y + 2, 0xffffff00);
    int w = font.getStringWidth("V");
    font.drawStringWithShadow(getName(), x + w + 4, y + 2, !isConflicting() ? 0xffffffff:0xffff0000);
    String keyString = parent.getEditingItem() == this ? "> <" : getDisplayKey();;
    w = font.getStringWidth(keyString);
    font.drawStringWithShadow(keyString, width - w, y + 2, 0xffcccccc);
  }
View Full Code Here

    font.drawStringWithShadow("V", x + 2, y + 2, 0xffffff00);
    int w = font.getStringWidth("V");
    font.drawStringWithShadow(getName(), x + w + 4, y + 2, !isConflicting() ? 0xffffffff:0xffff0000);
    String keyString = parent.getEditingItem() == this ? "> <" : getDisplayKey();;
    w = font.getStringWidth(keyString);
    font.drawStringWithShadow(keyString, width - w, y + 2, 0xffcccccc);
  }

  public String getDisplayKey() {
    if (binding.keyCode == -128) {
      return "Unbound";
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.