diff options
-rw-r--r-- | src/main/java/cc/woverflow/chatting/mixin/GuiChatMixin.java | 7 | ||||
-rw-r--r-- | src/main/kotlin/cc/woverflow/chatting/config/ChattingConfig.kt | 6 |
2 files changed, 12 insertions, 1 deletions
diff --git a/src/main/java/cc/woverflow/chatting/mixin/GuiChatMixin.java b/src/main/java/cc/woverflow/chatting/mixin/GuiChatMixin.java index cc015ab..a12aea1 100644 --- a/src/main/java/cc/woverflow/chatting/mixin/GuiChatMixin.java +++ b/src/main/java/cc/woverflow/chatting/mixin/GuiChatMixin.java @@ -92,7 +92,12 @@ public abstract class GuiChatMixin extends GuiScreen { @ModifyArg(method = "drawScreen", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/gui/GuiChat;drawRect(IIIII)V"), index = 2) private int modifyRight(int right) { - return ChattingConfig.INSTANCE.getCompactInputBox() ? (MathHelper.ceiling_float_int((float)mc.ingameGUI.getChatGUI().getChatWidth() / mc.ingameGUI.getChatGUI().getChatScale()) + 6) : right; + return ChattingConfig.INSTANCE.getCompactInputBox() ? (MathHelper.ceiling_float_int((float) mc.ingameGUI.getChatGUI().getChatWidth() / mc.ingameGUI.getChatGUI().getChatScale()) + 6) : right; + } + + @ModifyArg(method = "drawScreen", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/gui/GuiChat;drawRect(IIIII)V"), index = 4) + private int modifyInputBoxColor(int color) { + return ChattingConfig.INSTANCE.getInputBoxBackgroundColor().getRGB(); } @Inject(method = "mouseClicked", at = @At("HEAD")) diff --git a/src/main/kotlin/cc/woverflow/chatting/config/ChattingConfig.kt b/src/main/kotlin/cc/woverflow/chatting/config/ChattingConfig.kt index 71f7f02..e17eb0c 100644 --- a/src/main/kotlin/cc/woverflow/chatting/config/ChattingConfig.kt +++ b/src/main/kotlin/cc/woverflow/chatting/config/ChattingConfig.kt @@ -56,6 +56,12 @@ object ChattingConfig : Config( ) var compactInputBox = false + @Color( + name = "Input Box Background Color", category = "General", + description = "The color of the chat input box background." + ) + var inputBoxBackgroundColor = OneColor(0, 0, 0, 128) + @Switch( name = "Inform Outdated Mods", category = "General", description = "Inform the user when a mod can be replaced by Chatting." |