Add option to have the search widget under item panel

This commit is contained in:
Caedis committed 2023-03-28 20:57:08 -05:00
1 parent 23e16abae6
commit 7a8d71ce31
4 files changed
+40 -10

No files matched your search

@@ -126,9 +126,15 @@ public class LayoutStyleMinecraft extends LayoutStyle {
presetsPanel.y = 2;
presetsPanel.x = (gui.width - gui.xSize) / 2 + gui.xSize - presetsPanel.w;
searchField.h = 20;
searchField.w = 150;
searchField.x = (gui.width - searchField.w) / 2;
if (NEIClientConfig.isSearchWidgetCentered()) {
searchField.h = 20;
searchField.w = 150;
searchField.x = (gui.width - searchField.w) / 2;
} else {
searchField.h = itemPanel.quantity.h;
searchField.w = (int) (itemPanel.w * (NEIClientConfig.showItemQuantityWidget() ? 0.7 : 1));
searchField.x = itemPanel.x;
}
searchField.y = gui.height - searchField.h - 2;
if (!visiblity.showItemSection) {