diff options
author | Wyvest <45589059+Wyvest@users.noreply.github.com> | 2023-01-14 12:13:13 -0500 |
---|---|---|
committer | Wyvest <45589059+Wyvest@users.noreply.github.com> | 2023-01-14 12:13:13 -0500 |
commit | 1b3670de60500c491e5c61b0d304bcde7e30080f (patch) | |
tree | 9657ad419ac41545ea73e11cfea63ff90463f114 /src/main/kotlin/cc/woverflow/chatting | |
parent | f80dad6f297a60f23ca3066742c2df78e3b6fc83 (diff) | |
download | Chatting-1b3670de60500c491e5c61b0d304bcde7e30080f.tar.gz Chatting-1b3670de60500c491e5c61b0d304bcde7e30080f.tar.bz2 Chatting-1b3670de60500c491e5c61b0d304bcde7e30080f.zip |
various new features
- right click to copy chat message
- tooltip text render type
- delete button for individual chat lines
- copying chat messages now always shows a notification output
Diffstat (limited to 'src/main/kotlin/cc/woverflow/chatting')
-rw-r--r-- | src/main/kotlin/cc/woverflow/chatting/config/ChattingConfig.kt | 149 |
1 files changed, 64 insertions, 85 deletions
diff --git a/src/main/kotlin/cc/woverflow/chatting/config/ChattingConfig.kt b/src/main/kotlin/cc/woverflow/chatting/config/ChattingConfig.kt index a7f6ffe..55195ce 100644 --- a/src/main/kotlin/cc/woverflow/chatting/config/ChattingConfig.kt +++ b/src/main/kotlin/cc/woverflow/chatting/config/ChattingConfig.kt @@ -16,61 +16,51 @@ import cc.woverflow.chatting.gui.components.TabButton import cc.woverflow.chatting.hook.ChatLineHook import java.io.File -object ChattingConfig : - Config( - Mod(Chatting.NAME, ModType.UTIL_QOL, VigilanceMigrator(File(Chatting.modDir, Chatting.ID + ".toml").toPath().toString())), - "chatting.json" - ) { +object ChattingConfig : Config( + Mod( + Chatting.NAME, + ModType.UTIL_QOL, + VigilanceMigrator(File(Chatting.modDir, Chatting.ID + ".toml").toPath().toString()) + ), "chatting.json" +) { @Dropdown( - name = "Text Render Type", - category = "General", - options = ["No Shadow", "Shadow", "Full Shadow"] + name = "Text Render Type", category = "General", options = ["No Shadow", "Shadow", "Full Shadow"] ) var textRenderType = 1 @Switch( - name = "Remove Tooltip Background", - category = "General" - ) - var removeTooltipBackground = false - - @Switch( - name = "Remove Scroll Bar", - category = "General" + name = "Remove Scroll Bar", category = "General" ) var removeScrollBar = false @Color( - name = "Chat Background Color", - category = "General", - allowAlpha = false + name = "Chat Background Color", category = "General", allowAlpha = false ) var chatBackgroundColor = OneColor(0, 0, 0, 128) @Color( - name = "Copy Chat Message Background Color", - category = "General", - allowAlpha = false + name = "Copy Chat Message Background Color", category = "General", allowAlpha = false ) var hoveredChatBackgroundColor = OneColor(80, 80, 80, 128) @Switch( - name = "Compact Input Box", - category = "General" + name = "Right Click to Copy Chat Message", category = "General" + ) + var rightClickCopy = false + + @Switch( + name = "Compact Input Box", category = "General" ) var compactInputBox = false @Switch( - name = "Inform Outdated Mods", - category = "General" + name = "Inform Outdated Mods", category = "General" ) var informForAlternatives = true @Switch( - name = "Show Chat Heads", - description = "Show the chat heads of players in chat", - category = "Chat Heads" + name = "Show Chat Heads", description = "Show the chat heads of players in chat", category = "Chat Heads" ) var showChatHeads = true @@ -108,72 +98,55 @@ object ChattingConfig : */ @Info( - text = "If Chatting detects a public chat message that seems like spam, and the probability is higher than this, it will hide it.\n" + - "Made for Hypixel Skyblock. Set to 100% to disable. 95% is a reasonable threshold to use it at.\n" + - "Note that this is not and never will be 100% accurate; however, it's pretty much guaranteed to block most spam.", - size = 2, category = "Player Chats", + text = "If Chatting detects a public chat message that seems like spam, and the probability is higher than this, it will hide it.\n" + "Made for Hypixel Skyblock. Set to 100% to disable. 95% is a reasonable threshold to use it at.\n" + "Note that this is not and never will be 100% accurate; however, it's pretty much guaranteed to block most spam.", + size = 2, + category = "Player Chats", type = InfoType.INFO ) var ignored = false @Slider( - min = 80F, - max = 100F, - name = "Spam Blocker Threshold", - category = "Player Chats" + min = 80F, max = 100F, name = "Spam Blocker Threshold", category = "Player Chats" ) var spamThreshold = 100 @Switch( - name = "Custom SkyBlock Chat Formatting (remove ranks)", - category = "Player Chats" + name = "Custom SkyBlock Chat Formatting (remove ranks)", category = "Player Chats" ) var customChatFormatting = false @Switch( - name = "Completely Hide Spam", - category = "Player Chats" + name = "Completely Hide Spam", category = "Player Chats" ) var hideSpam = false @Switch( - name = "Custom Chat Height", - category = "Chat Window" + name = "Custom Chat Height", category = "Chat Window" ) var customChatHeight = true @Slider( - min = 180F, - max = 2160F, - name = "Focused Height (px)", - category = "Chat Window" + min = 180F, max = 2160F, name = "Focused Height (px)", category = "Chat Window" ) var focusedHeight = 180 @Slider( - min = 180F, - max = 2160F, - name = "Unfocused Height (px)", - category = "Chat Window" + min = 180F, max = 2160F, name = "Unfocused Height (px)", category = "Chat Window" ) var unfocusedHeight = 180 @Dropdown( - name = "Screenshot Mode", - category = "Screenshotting", - options = ["Save To System", "Add To Clipboard", "Both"] + name = "Screenshot Mode", category = "Screenshotting", options = ["Save To System", "Add To Clipboard", "Both"] ) var copyMode = 0 @Checkbox( - name = "Chat Searching", - category = "Searching" + name = "Chat Searching", category = "Searching" ) var chatSearch = true @Switch( - name = "Chat Tabs", - category = "Tabs" + name = "Chat Tabs", category = "Tabs" ) var chatTabs = true get() { @@ -186,14 +159,12 @@ object ChattingConfig : } @Checkbox( - name = "Enable Tabs Only on Hypixel", - category = "Tabs" + name = "Enable Tabs Only on Hypixel", category = "Tabs" ) var hypixelOnlyChatTabs = true @Switch( - name = "Chat Shortcuts", - category = "Shortcuts" + name = "Chat Shortcuts", category = "Shortcuts" ) var chatShortcuts = false get() { @@ -206,11 +177,20 @@ object ChattingConfig : } @Checkbox( - name = "Enable Shortcuts Only on Hypixel", - category = "Shortcuts" + name = "Enable Shortcuts Only on Hypixel", category = "Shortcuts" ) var hypixelOnlyChatShortcuts = true + @Switch( + name = "Remove Tooltip Background", category = "Tooltips" + ) + var removeTooltipBackground = false + + @Dropdown( + name = "Tooltip Text Render Type", category = "Tooltips", options = ["No Shadow", "Shadow", "Full Shadow"] + ) + var tooltipTextRenderType = 1 + init { initialize() addDependency("offsetNonPlayerMessages", "showChatHeads") @@ -221,27 +201,26 @@ object ChattingConfig : addListener("chatTabs") { ChatTabs.initialize() if (!chatTabs) { - val dummy = - ChatTab( - true, - "ALL", - unformatted = false, - lowercase = false, - startsWith = null, - contains = null, - endsWith = null, - equals = null, - uncompiledRegex = null, - ignoreStartsWith = null, - ignoreContains = null, - ignoreEndsWith = null, - ignoreEquals = null, - uncompiledIgnoreRegex = null, - color = TabButton.color, - hoveredColor = TabButton.hoveredColor, - selectedColor = TabButton.selectedColor, - prefix = "" - ) + val dummy = ChatTab( + true, + "ALL", + unformatted = false, + lowercase = false, + startsWith = null, + contains = null, + endsWith = null, + equals = null, + uncompiledRegex = null, + ignoreStartsWith = null, + ignoreContains = null, + ignoreEndsWith = null, + ignoreEquals = null, + uncompiledIgnoreRegex = null, + color = TabButton.color, + hoveredColor = TabButton.hoveredColor, + selectedColor = TabButton.selectedColor, + prefix = "" + ) dummy.initialize() ChatTabs.currentTab = dummy } else { |