aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/main/java/cc/woverflow/chatting/mixin/GuiChatMixin.java5
-rw-r--r--src/main/kotlin/cc/woverflow/chatting/config/ChattingConfig.kt8
2 files changed, 13 insertions, 0 deletions
diff --git a/src/main/java/cc/woverflow/chatting/mixin/GuiChatMixin.java b/src/main/java/cc/woverflow/chatting/mixin/GuiChatMixin.java
index b39950b..e3edf95 100644
--- a/src/main/java/cc/woverflow/chatting/mixin/GuiChatMixin.java
+++ b/src/main/java/cc/woverflow/chatting/mixin/GuiChatMixin.java
@@ -89,6 +89,11 @@ 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;
+ }
+
@Inject(method = "mouseClicked", at = @At("HEAD"))
private void mouseClicked(int mouseX, int mouseY, int mouseButton, CallbackInfo ci) {
GuiNewChatHook hook = ((GuiNewChatHook) Minecraft.getMinecraft().ingameGUI.getChatGUI());
diff --git a/src/main/kotlin/cc/woverflow/chatting/config/ChattingConfig.kt b/src/main/kotlin/cc/woverflow/chatting/config/ChattingConfig.kt
index ec27a4e..67db660 100644
--- a/src/main/kotlin/cc/woverflow/chatting/config/ChattingConfig.kt
+++ b/src/main/kotlin/cc/woverflow/chatting/config/ChattingConfig.kt
@@ -52,6 +52,14 @@ object ChattingConfig : Vigilant(File(Chatting.modDir, "${Chatting.ID}.toml"), C
@Property(
type = PropertyType.SWITCH,
+ name = "Compact Input Box",
+ description = "Make the width of the input box the same size as the chat box.",
+ category = "General"
+ )
+ var compactInputBox = false
+
+ @Property(
+ type = PropertyType.SWITCH,
name = "Inform for Alternatives",
description = "Inform the user if a mod they are using can be replaced by a feature in Chatting.",
category = "General"