diff options
author | Wyvest <45589059+Wyvest@users.noreply.github.com> | 2022-12-11 17:06:21 -0500 |
---|---|---|
committer | Wyvest <45589059+Wyvest@users.noreply.github.com> | 2022-12-11 17:06:21 -0500 |
commit | 7ea5b9ab24c78f01bdbbd4357fc87b75bbe4d950 (patch) | |
tree | 14eb8e92f7afb0ac65c8cdfed7826d194f8460d0 /src/main/kotlin/cc | |
parent | fc0f54e31911ae375672f04686b072b46afd1419 (diff) | |
download | Chatting-7ea5b9ab24c78f01bdbbd4357fc87b75bbe4d950.tar.gz Chatting-7ea5b9ab24c78f01bdbbd4357fc87b75bbe4d950.tar.bz2 Chatting-7ea5b9ab24c78f01bdbbd4357fc87b75bbe4d950.zip |
new: chat heads
Diffstat (limited to 'src/main/kotlin/cc')
-rw-r--r-- | src/main/kotlin/cc/woverflow/chatting/config/ChattingConfig.kt | 27 |
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) { |