mirror of
https://github.com/lukasabbe/bookshelf-inspector.git
synced 2026-04-30 10:40:53 +00:00
1.21.1
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
package com.lukasabbe.bookshelfinspector.renderer;
|
||||
|
||||
import com.lukasabbe.bookshelfinspector.BookshelfInspectorClient;
|
||||
import com.lukasabbe.bookshelfinspector.Constants;
|
||||
import com.lukasabbe.bookshelfinspector.data.BookData;
|
||||
import com.lukasabbe.bookshelfinspector.util.RomanNumerals;
|
||||
import com.mojang.blaze3d.vertex.PoseStack;
|
||||
@@ -79,13 +78,13 @@ public class HudRenderer {
|
||||
}
|
||||
}
|
||||
private static void drawScaledText(GuiGraphics context, Component text, int centerX, int y, int color, Font textRenderer){
|
||||
Matrix3x2fStack stack = context.pose();
|
||||
stack.pushMatrix();
|
||||
stack.translate(centerX, y);
|
||||
PoseStack stack = context.pose();
|
||||
stack.pushPose();
|
||||
stack.translate(centerX, y, 0);
|
||||
final float scale = (float) BookshelfInspectorClient.config.scale / 10;
|
||||
stack.scale(scale, scale);
|
||||
stack.translate(-centerX, -y);
|
||||
stack.scale(scale, scale, scale);
|
||||
stack.translate(-centerX, -y, 0);
|
||||
context.drawCenteredString(textRenderer,text,centerX,y,color);
|
||||
stack.popMatrix();
|
||||
stack.popPose();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user