aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/main/kotlin/cc/woverflow/chatting/config/ChattingConfig.kt12
-rw-r--r--src/main/kotlin/cc/woverflow/chatting/gui/components/CleanButton.kt6
2 files changed, 14 insertions, 4 deletions
diff --git a/src/main/kotlin/cc/woverflow/chatting/config/ChattingConfig.kt b/src/main/kotlin/cc/woverflow/chatting/config/ChattingConfig.kt
index e17eb0c..711250f 100644
--- a/src/main/kotlin/cc/woverflow/chatting/config/ChattingConfig.kt
+++ b/src/main/kotlin/cc/woverflow/chatting/config/ChattingConfig.kt
@@ -62,6 +62,18 @@ object ChattingConfig : Config(
)
var inputBoxBackgroundColor = OneColor(0, 0, 0, 128)
+ @Color(
+ name = "Chat Button Background Color", category = "General",
+ description = "The color of the chat button background."
+ )
+ var chatButtonBackgroundColor = OneColor(0, 0, 0, 128)
+
+ @Color(
+ name = "Chat Button Hovered Background Color", category = "General",
+ description = "The color of the chat button background when hovered."
+ )
+ var chatButtonHoveredBackgroundColor = OneColor(255, 255, 255, 128)
+
@Switch(
name = "Inform Outdated Mods", category = "General",
description = "Inform the user when a mod can be replaced by Chatting."
diff --git a/src/main/kotlin/cc/woverflow/chatting/gui/components/CleanButton.kt b/src/main/kotlin/cc/woverflow/chatting/gui/components/CleanButton.kt
index 8bc05bb..2fe2e9f 100644
--- a/src/main/kotlin/cc/woverflow/chatting/gui/components/CleanButton.kt
+++ b/src/main/kotlin/cc/woverflow/chatting/gui/components/CleanButton.kt
@@ -2,12 +2,12 @@ package cc.woverflow.chatting.gui.components
import cc.polyfrost.oneconfig.renderer.TextRenderer
import cc.woverflow.chatting.Chatting
+import cc.woverflow.chatting.config.ChattingConfig
import cc.woverflow.chatting.hook.GuiNewChatHook
import club.sk1er.patcher.config.PatcherConfig
import net.minecraft.client.Minecraft
import net.minecraft.client.gui.GuiButton
import net.minecraft.client.renderer.GlStateManager
-import java.awt.Color
/**
* Taken from ChatShortcuts under MIT License
@@ -68,7 +68,7 @@ open class CleanButton(
yPosition,
xPosition + width,
yPosition + height,
- if (hovered) hoveredColor else color
+ (if (hovered) ChattingConfig.chatButtonHoveredBackgroundColor else ChattingConfig.chatButtonBackgroundColor).rgb
)
}
mouseDragged(mc, mouseX, mouseY)
@@ -98,7 +98,5 @@ open class CleanButton(
}
companion object {
- val hoveredColor = Color(255, 255, 255, 128).rgb
- val color = Color(0, 0, 0, 128).rgb
}
} \ No newline at end of file