Add option to have the search widget under item panel (#364)

* Add option to have the search widget under item panel

* update bs+sa

* Make heights consistent

---------

Co-authored-by: Martin Robertz <[email protected]>
This commit is contained in:
CaedisandMartin Robertz authored and GitHub committed 2023-04-01 23:16:18 +02:00
1 parent 9218e233aa
commit a12fadb10d
4 files changed
+37 -11

No files matched your search

@@ -127,8 +127,13 @@ public class LayoutStyleMinecraft extends LayoutStyle {
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.w = 150;
searchField.x = (gui.width - searchField.w) / 2;
} else {
searchField.w = (int) (itemPanel.w * (NEIClientConfig.showItemQuantityWidget() ? 0.7 : 1));
searchField.x = itemPanel.x;
}
searchField.y = gui.height - searchField.h - 2;
if (!visiblity.showItemSection) {