Added screen text font scale config option.

This commit is contained in:
2024-05-15 18:55:01 +01:00
parent 28b82950bc
commit bc1db25756
2 changed files with 5 additions and 1 deletions

View File

@ -39,7 +39,7 @@ public class GuiRenderTickMixin {
// Render player state text
poseStack.pushPose();
poseStack.scale(3, 3, 3);
poseStack.scale(Config.Client.GUI_SCREEN_TEXT_SCALE.get(), Config.Client.GUI_SCREEN_TEXT_SCALE.get(), Config.Client.GUI_SCREEN_TEXT_SCALE.get());
// Check if we should draw the state
if (Proxy.Client.getPlayerState() != null && !Proxy.Client.getPlayerState().equals(ProtectedPlayer.State.ACTIVE)) {

View File

@ -34,12 +34,16 @@ public final class Config {
public static class Client {
public static ForgeConfigSpec.BooleanValue GUI_SCREEN_TEXT_ENABLED;
public static ForgeConfigSpec.IntValue GUI_SCREEN_TEXT_SCALE;
Client(ForgeConfigSpec.Builder builder) {
builder.comment("GUI settings.").push("GUI");
GUI_SCREEN_TEXT_ENABLED = builder
.comment("Whether current protection status is displayed as text on screen.")
.define("guiScreenTextEnabled", true);
GUI_SCREEN_TEXT_SCALE = builder
.comment("Controls the text font size.")
.defineInRange("guiScreenTextScale", 3, 1, 10);
builder.pop();
}
}