Skip to content

Commit

Permalink
without nanovg
Browse files Browse the repository at this point in the history
  • Loading branch information
ImToggle committed Jul 25, 2024
1 parent 1f014d5 commit 81abdd7
Showing 1 changed file with 7 additions and 12 deletions.
19 changes: 7 additions & 12 deletions src/main/kotlin/org/polyfrost/chatting/chat/ChatWindow.kt
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,8 @@ import cc.polyfrost.oneconfig.libs.universal.UGraphics.GL
import cc.polyfrost.oneconfig.libs.universal.UMatrixStack
import cc.polyfrost.oneconfig.libs.universal.UResolution
import cc.polyfrost.oneconfig.platform.Platform
import cc.polyfrost.oneconfig.renderer.NanoVGHelper
import cc.polyfrost.oneconfig.utils.dsl.mc
import cc.polyfrost.oneconfig.utils.dsl.nanoVG
import cc.polyfrost.oneconfig.utils.dsl.setAlpha
import club.sk1er.patcher.config.PatcherConfig
import net.minecraft.client.gui.ChatLine
import net.minecraft.client.gui.GuiChat
Expand Down Expand Up @@ -158,17 +156,14 @@ class ChatWindow : BasicHud(true, 2f, 1080 - 27f - 45f - 12f,

override fun draw(matrices: UMatrixStack?, x: Float, y: Float, scale: Float, example: Boolean) {
if (!example) return
nanoVG(true){
GL.pushMatrix()
GL.translate(x, y + scale, 0f)
GL.scale(scale, scale, 1f)
for (chat in exampleList) {
ModCompatHooks.redirectDrawString(chat.chatComponent.formattedText, 0f, 0f, -1, chat, false)
GL.translate(0f, 9f, 0f)
}
GL.popMatrix()
GL.pushMatrix()
GL.translate(x, y + scale, 0f)
GL.scale(scale, scale, 1f)
for (chat in exampleList) {
ModCompatHooks.redirectDrawString(chat.chatComponent.formattedText, 0f, 0f, -1, chat, false)
GL.translate(0f, 9f, 0f)
}

GL.popMatrix()
}

override fun drawBackground(x: Float, y: Float, width: Float, height: Float, scale: Float) {
Expand Down

0 comments on commit 81abdd7

Please sign in to comment.