From 4e587bc97c3aee3c3458a6ac60a43122f7c7971e Mon Sep 17 00:00:00 2001 From: Wyvest <45589059+Wyvest@users.noreply.github.com> Date: Sun, 16 Jan 2022 16:27:15 +0700 Subject: new: remove scroll bar new: chat background color fix: fix chat tab buttons not having bordered text --- src/main/kotlin/cc/woverflow/chatting/Chatting.kt | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/main/kotlin/cc/woverflow/chatting/Chatting.kt') diff --git a/src/main/kotlin/cc/woverflow/chatting/Chatting.kt b/src/main/kotlin/cc/woverflow/chatting/Chatting.kt index 4588847..a72fcbb 100644 --- a/src/main/kotlin/cc/woverflow/chatting/Chatting.kt +++ b/src/main/kotlin/cc/woverflow/chatting/Chatting.kt @@ -9,7 +9,9 @@ import cc.woverflow.chatting.hook.GuiNewChatHook import cc.woverflow.chatting.mixin.GuiNewChatAccessor import cc.woverflow.chatting.updater.Updater import cc.woverflow.chatting.utils.ModCompatHooks -import cc.woverflow.chatting.utils.RenderHelper +import cc.woverflow.chatting.utils.copyToClipboard +import cc.woverflow.chatting.utils.createBindFramebuffer +import cc.woverflow.chatting.utils.screenshot import com.google.gson.JsonParser import gg.essential.api.EssentialAPI import gg.essential.api.gui.buildConfirmationModal @@ -213,9 +215,7 @@ object Chatting { chatLines.add(drawnLines[i].chatComponent.formattedText) } - screenshot(chatLines, chat.chatWidth)?.let { - RenderHelper.copyBufferedImageToClipboard(it) - } + screenshot(chatLines, chat.chatWidth)?.copyToClipboard() } } @@ -230,7 +230,7 @@ object Chatting { } val fr: FontRenderer = ModCompatHooks.fontRenderer - val fb: Framebuffer = RenderHelper.createBindFramebuffer(width * 3, (messages.size * 9) * 3) + val fb: Framebuffer = createBindFramebuffer(width * 3, (messages.size * 9) * 3) val file = File(Minecraft.getMinecraft().mcDataDir, "screenshots/chat/" + fileFormatter.format(Date())) GlStateManager.scale(3f, 3f, 1f) @@ -240,7 +240,7 @@ object Chatting { fr.drawStringWithShadow(messages[i], 0f, (messages.size - 1 - i) * 9f, 0xffffff) } - val image = RenderHelper.screenshotFramebuffer(fb, file) + val image = fb.screenshot(file) Minecraft.getMinecraft().entityRenderer.setupOverlayRendering() Minecraft.getMinecraft().framebuffer.bindFramebuffer(true) EssentialAPI.getNotifications() -- cgit