mirror of
https://github.com/Eaglercraft-Archive/Eaglercraftx-1.8.8-src.git
synced 2025-07-06 06:18:15 -05:00
Update #18 - Final release, added PBR shaders
This commit is contained in:
@ -11,4 +11,26 @@
|
||||
|
||||
> DELETE 3 @ 3 : 6
|
||||
|
||||
> INSERT 13 : 14 @ 13
|
||||
|
||||
+ public float fontScale = 1.0f;
|
||||
|
||||
> CHANGE 51 : 66 @ 51 : 53
|
||||
|
||||
~ if (fontScale == 1.0f) {
|
||||
~ this.drawCenteredString(fontrenderer, this.displayString, this.xPosition + this.width / 2,
|
||||
~ this.yPosition + (this.height - 8) / 2, j);
|
||||
~ } else {
|
||||
~ float xScale = fontScale;
|
||||
~ float yScale = 1.0f + (fontScale - 1.0f) * 0.7f;
|
||||
~ float strWidth = fontrenderer.getStringWidth(displayString) / xScale;
|
||||
~ GlStateManager.pushMatrix();
|
||||
~ GlStateManager.translate(this.xPosition + this.width / 2,
|
||||
~ this.yPosition + (this.height - 8 * yScale) / 2, 1.0f);
|
||||
~ GlStateManager.scale(xScale, yScale, 1.0f);
|
||||
~ GlStateManager.translate(-strWidth * 0.5f * xScale, 0.0f, 0.0f);
|
||||
~ fontrenderer.drawStringWithShadow(displayString, 0, 0, j);
|
||||
~ GlStateManager.popMatrix();
|
||||
~ }
|
||||
|
||||
> EOF
|
||||
|
Reference in New Issue
Block a user