Make side buttons be left instead of right, fix some JEI stuff
This commit is contained in:
@@ -24,6 +24,7 @@ public abstract class GuiBase extends GuiContainer {
|
||||
|
||||
private int lastButtonId = 0;
|
||||
private int lastSideButtonY = 6;
|
||||
private String sideButtonTooltip;
|
||||
|
||||
protected int width;
|
||||
protected int height;
|
||||
@@ -78,17 +79,21 @@ public abstract class GuiBase extends GuiContainer {
|
||||
mouseX -= guiLeft;
|
||||
mouseY -= guiTop;
|
||||
|
||||
sideButtonTooltip = null;
|
||||
|
||||
for (SideButton sideButton : sideButtons) {
|
||||
GL11.glDisable(GL11.GL_LIGHTING);
|
||||
sideButton.draw(this, sideButton.getX() + 2, sideButton.getY() + 1);
|
||||
GL11.glEnable(GL11.GL_LIGHTING);
|
||||
|
||||
if (inBounds(sideButton.getX(), sideButton.getY(), SIDE_BUTTON_WIDTH, SIDE_BUTTON_HEIGHT, mouseX, mouseY)) {
|
||||
drawTooltip(mouseX, mouseY, sideButton.getTooltip(this));
|
||||
sideButtonTooltip = sideButton.getTooltip(this);
|
||||
}
|
||||
}
|
||||
|
||||
drawForeground(mouseX, mouseY);
|
||||
|
||||
if (sideButtonTooltip != null) {
|
||||
drawTooltip(mouseX, mouseY, sideButtonTooltip);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -115,7 +120,7 @@ public abstract class GuiBase extends GuiContainer {
|
||||
}
|
||||
|
||||
public void addSideButton(SideButton button) {
|
||||
button.setX(xSize - 1);
|
||||
button.setX(-SIDE_BUTTON_WIDTH + 1);
|
||||
button.setY(lastSideButtonY);
|
||||
button.setId(addButton(guiLeft + button.getX(), guiTop + button.getY(), SIDE_BUTTON_WIDTH, SIDE_BUTTON_HEIGHT).id);
|
||||
|
||||
|
||||
@@ -293,7 +293,7 @@ public class GuiGrid extends GuiBase {
|
||||
@Override
|
||||
protected void keyTyped(char character, int keyCode) throws IOException {
|
||||
if (!checkHotbarKeys(keyCode) && searchField.textboxKeyTyped(character, keyCode)) {
|
||||
if (PluginRefinedStorage.isJeiLoaded()) {
|
||||
if (PluginRefinedStorage.isJeiLoaded() && grid.getSearchBoxMode() == TileGrid.SEARCH_BOX_MODE_JEI_SYNCHRONIZED) {
|
||||
PluginRefinedStorage.INSTANCE.getRuntime().getItemListOverlay().setFilterText(searchField.getText());
|
||||
}
|
||||
} else {
|
||||
|
||||
@@ -26,7 +26,7 @@ public class SideButtonGridSearchBoxMode extends SideButton {
|
||||
@Override
|
||||
public void draw(GuiBase gui, int x, int y) {
|
||||
gui.bindTexture("icons.png");
|
||||
gui.drawTexture(x - 1, y + 2 - 1, 0, 96, 16, 16);
|
||||
gui.drawTexture(x, y + 2 - 1, 0, 96, 16, 16);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -55,7 +55,7 @@ sidebutton.refinedstorage:grid.sorting.type.0=Quantity
|
||||
sidebutton.refinedstorage:grid.sorting.type.1=Name
|
||||
sidebutton.refinedstorage:grid.search_box_mode=Search Box Mode
|
||||
sidebutton.refinedstorage:grid.search_box_mode.0=Normal
|
||||
sidebutton.refinedstorage:grid.search_box_mode.1=JEI Synchronized
|
||||
sidebutton.refinedstorage:grid.search_box_mode.1=JEI synchronized
|
||||
|
||||
sidebutton.refinedstorage:mode=Mode
|
||||
sidebutton.refinedstorage:mode.whitelist=Whitelist
|
||||
|
||||
@@ -55,7 +55,7 @@ sidebutton.refinedstorage:grid.sorting.type.0=Hoeveelheid
|
||||
sidebutton.refinedstorage:grid.sorting.type.1=Naam
|
||||
sidebutton.refinedstorage:grid.search_box_mode=Zoekbalk Mode
|
||||
sidebutton.refinedstorage:grid.search_box_mode.0=Normaal
|
||||
sidebutton.refinedstorage:grid.search_box_mode.1=JEI Gesynchronizeerd
|
||||
sidebutton.refinedstorage:grid.search_box_mode.1=JEI gesynchroniseerd
|
||||
|
||||
sidebutton.refinedstorage:mode=Mode
|
||||
sidebutton.refinedstorage:mode.whitelist=Whitelist
|
||||
|
||||
Reference in New Issue
Block a user