浏览代码

Attempt a fix for names being too long

Jared 4 年之前
父节点
当前提交
e8c7860a0f
共有 1 个文件被更改,包括 2 次插入1 次删除
  1. 2 1
      src/main/java/com/blamejared/controlling/client/gui/GuiNewKeyBindingList.java

+ 2 - 1
src/main/java/com/blamejared/controlling/client/gui/GuiNewKeyBindingList.java

@@ -149,7 +149,8 @@ public class GuiNewKeyBindingList extends KeyBindingList {
             int i = y;
             int j = x;
             boolean flag = GuiNewKeyBindingList.this.controlsScreen.buttonId == this.keybinding;
-            GuiNewKeyBindingList.this.mc.fontRenderer.drawString(stack, this.keyDesc, (float) (j + 90 - GuiNewKeyBindingList.this.maxListLabelWidth), (float) (y + p_render_5_ / 2 - 9 / 2), 16777215);
+            int length = Math.max(0, j + 90 - GuiNewKeyBindingList.this.maxListLabelWidth);
+            GuiNewKeyBindingList.this.mc.fontRenderer.drawString(stack, this.keyDesc, (float) (length), (float) (y + p_render_5_ / 2 - 9 / 2), 16777215);
             this.btnResetKeyBinding.x = x + 190 + 20;
             this.btnResetKeyBinding.y = y;
             this.btnResetKeyBinding.active = !this.keybinding.isDefault();