make drawtext more useful

This commit is contained in:
Bella 2020-04-13 18:02:13 -04:00
parent 5de1250373
commit a981a1dc55
No known key found for this signature in database
GPG Key ID: DBD4A6030080C8B3
2 changed files with 3 additions and 3 deletions

View File

@ -151,10 +151,10 @@ public class RenderHelper {
glPopMatrix();
}
public static void drawText(int x, String text, int color) {
public static void drawText(int x, int y, int color, String text) {
glColor3f(1, 1, 1);
glEnable(GL_TEXTURE_2D);
KamiGUI.fontRenderer.drawString(x, KamiGUI.fontRenderer.getFontHeight() / 2, color, text);
KamiGUI.fontRenderer.drawString(x, y, color, text);
glDisable(GL_TEXTURE_2D);
}
}

View File

@ -48,7 +48,7 @@ public class RootCheckButtonUI<T extends CheckButton> extends AbstractComponentU
KamiGUI.fontRenderer.getStringWidth(component.getDescription() + 2), KamiGUI.fontRenderer.getFontHeight() + 6,
1.5f, 0.17F, 0.17F, 0.18F, 0.9F,
toF(GuiC.windowOutline.color.getRed()), toF(GuiC.windowOutline.color.getGreen()), toF(GuiC.windowOutline.color.getBlue()));
RenderHelper.drawText(component.getWidth() + 17, component.getDescription(), rgbToInt(255, 255, 255));
RenderHelper.drawText(component.getWidth() + 17, KamiGUI.fontRenderer.getFontHeight() / 2, rgbToInt(255, 255, 255), component.getDescription());
glEnable(GL_SCISSOR_TEST); // stop drawing outside of the container
glDepthRange(0, 1.0); // set the render priority back to normal