aboutsummaryrefslogtreecommitdiff
path: root/src/main/kotlin/cc/woverflow/chatting/gui/components/ClearButton.kt
diff options
context:
space:
mode:
authorWyvest <wyvestbusiness@gmail.com>2023-11-22 08:18:19 +0900
committerWyvest <wyvestbusiness@gmail.com>2023-11-22 08:18:19 +0900
commit8b373f577d9c6dde26357ef3fc86691f1efef9b4 (patch)
treea5328e995d8f4df21a9fe94ac8e384be08833c70 /src/main/kotlin/cc/woverflow/chatting/gui/components/ClearButton.kt
parent64230799777473246b5f98efbc596206c5bbf42d (diff)
downloadChatting-8b373f577d9c6dde26357ef3fc86691f1efef9b4.tar.gz
Chatting-8b373f577d9c6dde26357ef3fc86691f1efef9b4.tar.bz2
Chatting-8b373f577d9c6dde26357ef3fc86691f1efef9b4.zip
update PGT and relocate to org.polyfrost
Diffstat (limited to 'src/main/kotlin/cc/woverflow/chatting/gui/components/ClearButton.kt')
-rw-r--r--src/main/kotlin/cc/woverflow/chatting/gui/components/ClearButton.kt42
1 files changed, 0 insertions, 42 deletions
diff --git a/src/main/kotlin/cc/woverflow/chatting/gui/components/ClearButton.kt b/src/main/kotlin/cc/woverflow/chatting/gui/components/ClearButton.kt
deleted file mode 100644
index 6ac3d34..0000000
--- a/src/main/kotlin/cc/woverflow/chatting/gui/components/ClearButton.kt
+++ /dev/null
@@ -1,42 +0,0 @@
-package cc.woverflow.chatting.gui.components
-
-import cc.polyfrost.oneconfig.libs.universal.ChatColor
-import cc.polyfrost.oneconfig.libs.universal.UChat
-import cc.polyfrost.oneconfig.libs.universal.UResolution
-import cc.polyfrost.oneconfig.utils.Multithreading
-import cc.woverflow.chatting.Chatting
-import net.minecraft.client.Minecraft
-import net.minecraft.client.gui.Gui
-import net.minecraft.client.renderer.GlStateManager
-import net.minecraft.util.ResourceLocation
-
-class ClearButton :
- CleanButton(13379014, { UResolution.scaledWidth - 28 }, { UResolution.scaledHeight - 27 }, 12, 12, "",
- { RenderType.NONE }) {
-
- var times = 0
-
- override fun onMousePress() {
- ++times
- if (times > 1) {
- times = 0
- Minecraft.getMinecraft().ingameGUI.chatGUI.clearChatMessages()
- } else {
- UChat.chat(ChatColor.RED + ChatColor.BOLD.toString() + "Click again to clear the chat!")
- Multithreading.runAsync {
- Thread.sleep(3000)
- times = 0
- }
- }
- }
-
- override fun drawButton(mc: Minecraft, mouseX: Int, mouseY: Int) {
- super.drawButton(mc, mouseX, mouseY)
- if (visible) {
- if (hovered) GlStateManager.color(1f, 1f, 160f / 255f)
- else GlStateManager.color(1f, 1f, 1f)
- mc.textureManager.bindTexture(ResourceLocation(Chatting.ID, "delete.png"))
- Gui.drawModalRectWithCustomSizedTexture(xPosition + 1, yPosition + 1, 0f, 0f, 10, 10, 10f, 10f)
- }
- }
-} \ No newline at end of file