Skip to content

Commit

Permalink
revert to vanilla and chatting window
Browse files Browse the repository at this point in the history
  • Loading branch information
Wyvest committed Jun 24, 2024
1 parent 6e15c79 commit 0bd0c04
Showing 1 changed file with 32 additions and 1 deletion.
33 changes: 32 additions & 1 deletion src/main/kotlin/org/polyfrost/chatting/chat/ChatWindow.kt
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package org.polyfrost.chatting.chat

import cc.polyfrost.oneconfig.config.annotations.Button
import cc.polyfrost.oneconfig.config.annotations.Exclude
import cc.polyfrost.oneconfig.config.annotations.Slider
import cc.polyfrost.oneconfig.config.annotations.Switch
Expand All @@ -26,7 +27,7 @@ import org.polyfrost.chatting.config.ChattingConfig
import org.polyfrost.chatting.utils.EaseOutQuart
import org.polyfrost.chatting.utils.ModCompatHooks

class ChatWindow : BasicHud(true, 0f, 1080 - 27f - 45f - 12f,
class ChatWindow : BasicHud(true, 2f, 1080 - 27f - 45f - 12f,
1f, true, true, 6f, 5f, 5f, OneColor(0, 0, 0, 120), false, 2f, OneColor(0, 0, 0)) {

@Exclude
Expand Down Expand Up @@ -121,6 +122,36 @@ class ChatWindow : BasicHud(true, 0f, 1080 - 27f - 45f - 12f,
var openBorderOpacity = 255
get() = field.coerceIn(0, 255)

@Button(
name = "Revert to Vanilla Chat Window",
description = "Revert the chat window to the vanilla chat window, instead of the Chattings custom chat window.",
text = "Revert"
)
var revertToVanilla: Runnable = Runnable {
rounded = false
paddingX = 0f
paddingY = 0f
ChattingConfig.smoothBG = false

ChattingConfig.save()
ChattingConfig.openGui()
}

@Button(
name = "Revert to Chatting Chat Window",
description = "Revert the chat window to the Chatting custom chat window, instead of the vanilla chat window.",
text = "Revert"
)
var revertToChatting: Runnable = Runnable {
rounded = true
paddingX = 5f
paddingY = 5f
ChattingConfig.smoothBG = true

ChattingConfig.save()
ChattingConfig.openGui()
}

init {
showInDebug = true
ignoreCaching = true
Expand Down

0 comments on commit 0bd0c04

Please sign in to comment.