This commit is contained in:
2026-03-06 01:10:51 +01:00
parent 9dbf431a55
commit e70c1423a4
5 changed files with 63 additions and 3 deletions
@@ -1,4 +1,4 @@
package org.saturnclient.ui.resources;
package org.saturnclient.saturnclient.impl;
import org.saturnclient.saturnclient.SaturnClient;
import net.minecraft.text.Style;
@@ -20,10 +20,10 @@ public class Fonts {
return INTER_BOLD;
}
}
public static Text setFont(String text, Identifier font) {
return Text.literal(text).setStyle(
Style.EMPTY.withFont(font));
Style.EMPTY.withFont(font));
}
public static int getWidth(String text, int font) {
@@ -24,4 +24,9 @@ public class SaturnClientProvider extends MinecraftProvider {
return GLFW.glfwGetKey(SaturnClient.client.getWindow().getHandle(), key) == GLFW.GLFW_PRESS
&& SaturnClient.client.currentScreen == null;
}
@Override
public int getWidth(String text, int font) {
return Fonts.getWidth(text, font);
}
}