aboutsummaryrefslogtreecommitdiff
path: root/src/main/kotlin/cc/woverflow/chatting/config/ChattingConfig.kt
diff options
context:
space:
mode:
authorWyvest <45589059+Wyvest@users.noreply.github.com>2022-03-12 15:43:15 +0700
committerWyvest <45589059+Wyvest@users.noreply.github.com>2022-03-12 15:43:15 +0700
commiteece3cb994280498d2a9c259030cc79a4be3fce3 (patch)
treee23c8d6a1c2553d2511630012f275ffa15ebf532 /src/main/kotlin/cc/woverflow/chatting/config/ChattingConfig.kt
parent380e0adb5ef1401dd8cbf70b2ef7bc121c371c42 (diff)
downloadChatting-eece3cb994280498d2a9c259030cc79a4be3fce3.tar.gz
Chatting-eece3cb994280498d2a9c259030cc79a4be3fce3.tar.bz2
Chatting-eece3cb994280498d2a9c259030cc79a4be3fce3.zip
color property
Diffstat (limited to 'src/main/kotlin/cc/woverflow/chatting/config/ChattingConfig.kt')
-rw-r--r--src/main/kotlin/cc/woverflow/chatting/config/ChattingConfig.kt45
1 files changed, 27 insertions, 18 deletions
diff --git a/src/main/kotlin/cc/woverflow/chatting/config/ChattingConfig.kt b/src/main/kotlin/cc/woverflow/chatting/config/ChattingConfig.kt
index 6c09731..223de76 100644
--- a/src/main/kotlin/cc/woverflow/chatting/config/ChattingConfig.kt
+++ b/src/main/kotlin/cc/woverflow/chatting/config/ChattingConfig.kt
@@ -5,6 +5,8 @@ import cc.woverflow.chatting.chat.ChatShortcuts
import cc.woverflow.chatting.chat.ChatTab
import cc.woverflow.chatting.chat.ChatTabs
import cc.woverflow.chatting.gui.ChatShortcutViewGui
+import cc.woverflow.chatting.gui.components.TabButton
+import cc.woverflow.onecore.utils.openScreen
import gg.essential.api.EssentialAPI
import gg.essential.vigilance.Vigilant
import gg.essential.vigilance.data.Category
@@ -14,7 +16,8 @@ import gg.essential.vigilance.data.SortingBehavior
import java.awt.Color
import java.io.File
-object ChattingConfig : Vigilant(File(Chatting.modDir, "${Chatting.ID}.toml"), Chatting.NAME, sortingBehavior = ConfigSorting) {
+object ChattingConfig :
+ Vigilant(File(Chatting.modDir, "${Chatting.ID}.toml"), Chatting.NAME, sortingBehavior = ConfigSorting) {
@Property(
type = PropertyType.SELECTOR,
@@ -106,11 +109,7 @@ object ChattingConfig : Vigilant(File(Chatting.modDir, "${Chatting.ID}.toml"), C
name = "Screenshot Mode",
description = "The mode in which screenshotting will work.",
category = "Screenshotting",
- options = [
- "Save To System",
- "Add To Clipboard",
- "Both"
- ]
+ options = ["Save To System", "Add To Clipboard", "Both"]
)
var copyMode = 0
@@ -123,10 +122,7 @@ object ChattingConfig : Vigilant(File(Chatting.modDir, "${Chatting.ID}.toml"), C
var chatSearch = true
@Property(
- type = PropertyType.SWITCH,
- name = "Chat Tabs",
- description = "Add chat tabs.",
- category = "Tabs"
+ type = PropertyType.SWITCH, name = "Chat Tabs", description = "Add chat tabs.", category = "Tabs"
)
var chatTabs = true
get() {
@@ -147,10 +143,7 @@ object ChattingConfig : Vigilant(File(Chatting.modDir, "${Chatting.ID}.toml"), C
var hypixelOnlyChatTabs = true
@Property(
- type = PropertyType.SWITCH,
- name = "Chat Shortcuts",
- description = "Add chat shortcuts.",
- category = "Shortcuts"
+ type = PropertyType.SWITCH, name = "Chat Shortcuts", description = "Add chat shortcuts.", category = "Shortcuts"
)
var chatShortcuts = false
get() {
@@ -176,9 +169,7 @@ object ChattingConfig : Vigilant(File(Chatting.modDir, "${Chatting.ID}.toml"), C
description = "Edit chat shortcuts.",
category = "Shortcuts"
)
- fun openChatShortcutsGUI() {
- EssentialAPI.getGuiUtil().openScreen(ChatShortcutViewGui())
- }
+ fun openChatShortcutsGUI() = ChatShortcutViewGui().openScreen()
init {
initialize()
@@ -186,7 +177,25 @@ object ChattingConfig : Vigilant(File(Chatting.modDir, "${Chatting.ID}.toml"), C
chatTabs = funny
ChatTabs.initialize()
if (!funny) {
- val dummy = ChatTab(true, "ALL", false, null, null, null, null, null, null, null, null, null, null, "")
+ val dummy = ChatTab(
+ true,
+ "ALL",
+ false,
+ null,
+ null,
+ null,
+ null,
+ null,
+ null,
+ null,
+ null,
+ null,
+ null,
+ TabButton.color,
+ TabButton.hoveredColor,
+ TabButton.selectedColor,
+ ""
+ )
dummy.initialize()
ChatTabs.currentTab = dummy
} else {