aboutsummaryrefslogtreecommitdiff
path: root/src/main/kotlin/cc/woverflow/chatting/Chatting.kt
diff options
context:
space:
mode:
authorWyvest <45589059+Wyvest@users.noreply.github.com>2022-01-16 16:27:15 +0700
committerWyvest <45589059+Wyvest@users.noreply.github.com>2022-01-16 16:27:15 +0700
commit4e587bc97c3aee3c3458a6ac60a43122f7c7971e (patch)
treeab9df90c3b5763d60ea702fd13f15461bbb56421 /src/main/kotlin/cc/woverflow/chatting/Chatting.kt
parent42f8aa3024772e708143d49355130ef2a7999243 (diff)
downloadChatting-4e587bc97c3aee3c3458a6ac60a43122f7c7971e.tar.gz
Chatting-4e587bc97c3aee3c3458a6ac60a43122f7c7971e.tar.bz2
Chatting-4e587bc97c3aee3c3458a6ac60a43122f7c7971e.zip
new: remove scroll bar
new: chat background color fix: fix chat tab buttons not having bordered text
Diffstat (limited to 'src/main/kotlin/cc/woverflow/chatting/Chatting.kt')
-rw-r--r--src/main/kotlin/cc/woverflow/chatting/Chatting.kt12
1 files changed, 6 insertions, 6 deletions
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()