diff options
Diffstat (limited to 'src/main')
5 files changed, 8 insertions, 5 deletions
diff --git a/src/main/java/me/shedaniel/Core.java b/src/main/java/me/shedaniel/Core.java index f6012dc80..08a72554f 100755 --- a/src/main/java/me/shedaniel/Core.java +++ b/src/main/java/me/shedaniel/Core.java @@ -46,6 +46,7 @@ public class Core implements PacketAdder, ClientModInitializer { public static final File configFile = new File(FabricLoader.INSTANCE.getConfigDirectory(), "rei.json"); public static REIConfig config; public static ClientListener clientListener; + public static boolean centreSearchBox; @Override public void onInitializeClient() { @@ -53,6 +54,7 @@ public class Core implements PacketAdder, ClientModInitializer { registerEvents(); try { loadConfig(); + centreSearchBox = config.centreSearchBox; } catch (IOException e) { e.printStackTrace(); } diff --git a/src/main/java/me/shedaniel/gui/GuiItemList.java b/src/main/java/me/shedaniel/gui/GuiItemList.java index accd02f61..f0c8ce3aa 100755 --- a/src/main/java/me/shedaniel/gui/GuiItemList.java +++ b/src/main/java/me/shedaniel/gui/GuiItemList.java @@ -29,7 +29,7 @@ import java.util.stream.Stream; public class GuiItemList extends Drawable { - public static final int FOOTERSIZE = 44; + public final int FOOTERSIZE; private ContainerGui overlayedGui; private static int page = 0; private ArrayList<REISlot> displaySlots; @@ -48,6 +48,7 @@ public class GuiItemList extends Drawable { public GuiItemList(ContainerGui overlayedGui) { super(calculateRect(overlayedGui)); + FOOTERSIZE = Core.centreSearchBox ? 18 : 44; displaySlots = new ArrayList<>(); controls = new ArrayList<>(); this.overlayedGui = overlayedGui; @@ -119,7 +120,7 @@ public class GuiItemList extends Drawable { private Rectangle getSearchBoxArea() { int ch = ((IMixinContainerGui) overlayedGui).getContainerHeight(), cw = ((IMixinContainerGui) overlayedGui).getContainerWidth(); - if (Core.config.centreSearchBox) { + if (Core.centreSearchBox) { if (ch + 4 + 18 > rect.height) //Will be out of bounds return new Rectangle(overlayedGui.width / 2 - cw / 2, rect.height + 100, cw, 18); return new Rectangle(overlayedGui.width / 2 - cw / 2, rect.height - 31, cw, 18); diff --git a/src/main/resources/assets/roughlyenoughitems/lang/en_us.json b/src/main/resources/assets/roughlyenoughitems/lang/en_us.json index b602723de..b751c348c 100755 --- a/src/main/resources/assets/roughlyenoughitems/lang/en_us.json +++ b/src/main/resources/assets/roughlyenoughitems/lang/en_us.json @@ -18,5 +18,5 @@ "text.rei.config": "Config", "text.rei.listeningkey": "Listening Key", "text.rei.centre_searchbox": "Center Search Box: %s%b", - "text.rei.centre_searchbox.tooltip": "Please resize the window after editing\nthis config to apply the changes" + "text.rei.centre_searchbox.tooltip": "Please restart Minecraft after editing\nthis config to apply the changes" }
\ No newline at end of file diff --git a/src/main/resources/assets/roughlyenoughitems/lang/zh_cn.json b/src/main/resources/assets/roughlyenoughitems/lang/zh_cn.json index 95747894f..8952425f4 100644 --- a/src/main/resources/assets/roughlyenoughitems/lang/zh_cn.json +++ b/src/main/resources/assets/roughlyenoughitems/lang/zh_cn.json @@ -18,5 +18,5 @@ "text.rei.config": "设置", "text.rei.listeningkey": "正聆听按键", "text.rei.centre_searchbox": "置中搜索栏: %s%b", - "text.rei.centre_searchbox.tooltip": "更改此设置后请调整窗口大小以完成更改" + "text.rei.centre_searchbox.tooltip": "更改此设置后请重启游戏以完成更改" }
\ No newline at end of file diff --git a/src/main/resources/assets/roughlyenoughitems/lang/zh_tw.json b/src/main/resources/assets/roughlyenoughitems/lang/zh_tw.json index ed02f5f3f..bea1f7bae 100644 --- a/src/main/resources/assets/roughlyenoughitems/lang/zh_tw.json +++ b/src/main/resources/assets/roughlyenoughitems/lang/zh_tw.json @@ -18,5 +18,5 @@ "text.rei.config": "設置", "text.rei.listeningkey": "正聆聽按鍵", "text.rei.centre_searchbox": "置中搜索欄: %s%b", - "text.rei.centre_searchbox.tooltip": "更改此設置後請調整窗口大小以完成更改" + "text.rei.centre_searchbox.tooltip": "更改此設置後請重啟遊戲以完成更改" }
\ No newline at end of file |
