Add option for whether to draw a shadow of string to GuiRenderer

This commit is contained in:
johni0702
2015-07-13 13:56:03 +02:00
parent be3afc9e0e
commit dccbc99d86
5 changed files with 56 additions and 7 deletions

View File

@@ -64,7 +64,7 @@ public abstract class AbstractGuiTooltip<T extends AbstractGuiTooltip<T>> extend
FontRenderer fontRenderer = getMinecraft().fontRendererObj;
int y = LINE_SPACING + 1;
for (String line : text) {
renderer.drawString(LINE_SPACING + 1, y, color, line);
renderer.drawString(LINE_SPACING + 1, y, color, line, true);
y += fontRenderer.FONT_HEIGHT + LINE_SPACING;
}
}

View File

@@ -474,7 +474,7 @@ public abstract class AbstractGuiTextArea<T extends AbstractGuiTextArea<T>>
// Draw line
int posY = BORDER + i * lineHeight;
int lineEnd = renderer.drawString(BORDER, posY, textColor, line);
int lineEnd = renderer.drawString(BORDER, posY, textColor, line, true);
// Draw selection
int fromX = getSelectionFromX();
@@ -503,7 +503,7 @@ public abstract class AbstractGuiTextArea<T extends AbstractGuiTextArea<T>>
String beforeCursor = line.substring(0, cursorX - leftTrimmed);
int posX = BORDER + fontRenderer.getStringWidth(beforeCursor);
if (cursorX == text[lineY].length()) {
renderer.drawString(posX, posY, CURSOR_COLOR, "_");
renderer.drawString(posX, posY, CURSOR_COLOR, "_", true);
} else {
renderer.drawRect(posX, posY - 1, 1, 1 + fontRenderer.FONT_HEIGHT, CURSOR_COLOR);
}