aboutsummaryrefslogtreecommitdiff
path: root/src/main/kotlin
diff options
context:
space:
mode:
authorWyvest <45589059+Wyvest@users.noreply.github.com>2022-12-11 17:06:21 -0500
committerWyvest <45589059+Wyvest@users.noreply.github.com>2022-12-11 17:06:21 -0500
commit7ea5b9ab24c78f01bdbbd4357fc87b75bbe4d950 (patch)
tree14eb8e92f7afb0ac65c8cdfed7826d194f8460d0 /src/main/kotlin
parentfc0f54e31911ae375672f04686b072b46afd1419 (diff)
downloadChatting-7ea5b9ab24c78f01bdbbd4357fc87b75bbe4d950.tar.gz
Chatting-7ea5b9ab24c78f01bdbbd4357fc87b75bbe4d950.tar.bz2
Chatting-7ea5b9ab24c78f01bdbbd4357fc87b75bbe4d950.zip
new: chat heads
Diffstat (limited to 'src/main/kotlin')
-rw-r--r--src/main/kotlin/cc/woverflow/chatting/config/ChattingConfig.kt27
1 files changed, 27 insertions, 0 deletions
diff --git a/src/main/kotlin/cc/woverflow/chatting/config/ChattingConfig.kt b/src/main/kotlin/cc/woverflow/chatting/config/ChattingConfig.kt
index 40ebd9a..a7f6ffe 100644
--- a/src/main/kotlin/cc/woverflow/chatting/config/ChattingConfig.kt
+++ b/src/main/kotlin/cc/woverflow/chatting/config/ChattingConfig.kt
@@ -13,6 +13,7 @@ import cc.woverflow.chatting.chat.ChatShortcuts
import cc.woverflow.chatting.chat.ChatTab
import cc.woverflow.chatting.chat.ChatTabs
import cc.woverflow.chatting.gui.components.TabButton
+import cc.woverflow.chatting.hook.ChatLineHook
import java.io.File
object ChattingConfig :
@@ -66,6 +67,27 @@ object ChattingConfig :
)
var informForAlternatives = true
+ @Switch(
+ name = "Show Chat Heads",
+ description = "Show the chat heads of players in chat",
+ category = "Chat Heads"
+ )
+ var showChatHeads = true
+
+ @Switch(
+ name = "Offset Non-Player Messages",
+ description = "Offset all messages, even if a player has not been detected.",
+ category = "Chat Heads"
+ )
+ var offsetNonPlayerMessages = false
+
+ @Switch(
+ name = "Hide Chat Head on Consecutive Messages",
+ description = "Hide the chat head if the previous message was from the same player.",
+ category = "Chat Heads"
+ )
+ var hideChatHeadOnConsecutiveMessages = true
+
/*/
@Property(
type = PropertyType.SWITCH,
@@ -191,6 +213,11 @@ object ChattingConfig :
init {
initialize()
+ addDependency("offsetNonPlayerMessages", "showChatHeads")
+ addDependency("hideChatHeadOnConsecutiveMessages", "showChatHeads")
+ addListener("hideChatHeadOnConsecutiveMessages") {
+ ChatLineHook.chatLines.map { it.get() as ChatLineHook? }.forEach { it?.updatePlayerInfo() }
+ }
addListener("chatTabs") {
ChatTabs.initialize()
if (!chatTabs) {