From 135a36eceded2d264e2a2ca634f490e056cd7ce4 Mon Sep 17 00:00:00 2001 From: Wyvest <45589059+Wyvest@users.noreply.github.com> Date: Sun, 11 Dec 2022 19:02:52 -0500 Subject: move chat heads to `redirectDrawString` --- .../kotlin/cc/woverflow/chatting/gui/components/CleanButton.kt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/main/kotlin/cc/woverflow/chatting/gui/components') diff --git a/src/main/kotlin/cc/woverflow/chatting/gui/components/CleanButton.kt b/src/main/kotlin/cc/woverflow/chatting/gui/components/CleanButton.kt index de69bab..8bc05bb 100644 --- a/src/main/kotlin/cc/woverflow/chatting/gui/components/CleanButton.kt +++ b/src/main/kotlin/cc/woverflow/chatting/gui/components/CleanButton.kt @@ -1,8 +1,8 @@ package cc.woverflow.chatting.gui.components +import cc.polyfrost.oneconfig.renderer.TextRenderer import cc.woverflow.chatting.Chatting import cc.woverflow.chatting.hook.GuiNewChatHook -import cc.woverflow.chatting.utils.ModCompatHooks.drawBorderedString import club.sk1er.patcher.config.PatcherConfig import net.minecraft.client.Minecraft import net.minecraft.client.gui.GuiButton @@ -85,10 +85,10 @@ open class CleanButton( } RenderType.FULL -> { - fontrenderer.drawBorderedString( + TextRenderer.drawBorderedText( displayString, - (xPosition + width / 2) - (fontrenderer.getStringWidth(displayString) / 2), - yPosition + (height - 8) / 2, + ((xPosition + width / 2) - (fontrenderer.getStringWidth(displayString) / 2)).toFloat(), + (yPosition + (height - 8) / 2).toFloat(), j, (Minecraft.getMinecraft().ingameGUI.chatGUI as GuiNewChatHook).textOpacity ) -- cgit