removed manual computations of guiLeft / guiTop

This commit is contained in:
SpaceToad 2014-08-29 00:33:15 +02:00
parent c37a8a2985
commit 77e68d2528
19 changed files with 70 additions and 135 deletions

View file

@ -55,21 +55,19 @@ public class GuiArchitect extends GuiBuildCraft {
@Override
public void initGui() {
super.initGui();
int x = (width - xSize) / 2;
int y = (height - ySize) / 2;
Keyboard.enableRepeatEvents(true);
optionRotate = new GuiButton(0, x + 5, y + 30, 77, 20, "");
optionRotate = new GuiButton(0, guiLeft + 5, guiTop + 30, 77, 20, "");
buttonList.add(optionRotate);
optionReadBlocks = new GuiButton(1, x + 5, y + 55, 77, 20, "");
optionReadBlocks = new GuiButton(1, guiLeft + 5, guiTop + 55, 77, 20, "");
buttonList.add(optionReadBlocks);
optionExcavate = new GuiButton(2, x + 5, y + 80, 77, 20, "");
optionExcavate = new GuiButton(2, guiLeft + 5, guiTop + 80, 77, 20, "");
buttonList.add(optionExcavate);
optionExplicit = new GuiButton(3, x + 5, y + 105, 77, 20, "");
optionExplicit = new GuiButton(3, guiLeft + 5, guiTop + 105, 77, 20, "");
buttonList.add(optionExplicit);
textField = new GuiTextField(this.fontRendererObj, TEXT_X, TEXT_Y, TEXT_WIDTH, TEXT_HEIGHT);
@ -151,28 +149,16 @@ public class GuiArchitect extends GuiBuildCraft {
protected void drawGuiContainerBackgroundLayer(float f, int x, int y) {
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
mc.renderEngine.bindTexture(TEXTURE);
int j = (width - xSize) / 2;
int k = (height - ySize) / 2;
drawTexturedModalRect(j, k, 0, 0, xSize, ySize);
drawTexturedModalRect(guiLeft, guiTop, 0, 0, xSize, ySize);
int i1 = architect.getComputingProgressScaled(24);
drawTexturedModalRect(j + 159, k + 34, 0, 166, i1 + 1, 16);
drawTexturedModalRect(guiLeft + 159, guiTop + 34, 0, 166, i1 + 1, 16);
}
@Override
protected void mouseClicked(int i, int j, int k) {
super.mouseClicked(i, j, k);
int xMin = (width - xSize) / 2;
int yMin = (height - ySize) / 2;
int x = i - xMin;
int y = j - yMin;
if (x >= TEXT_X && y >= TEXT_Y
&& x <= TEXT_X + TEXT_WIDTH && y <= TEXT_Y + TEXT_HEIGHT) {
textField.setFocused(true);
} else {
textField.setFocused(false);
}
textField.mouseClicked(i - guiLeft, j - guiTop, k);
}
@Override

View file

@ -43,15 +43,13 @@ public class GuiBlueprintLibrary extends GuiBuildCraft {
public void initGui() {
super.initGui();
int j = (width - xSize) / 2;
int k = (height - ySize) / 2;
prevPageButton = new GuiButton(0, j + 158, k + 23, 20, 20, "<");
nextPageButton = new GuiButton(1, j + 180, k + 23, 20, 20, ">");
prevPageButton = new GuiButton(0, guiLeft + 158, guiTop + 23, 20, 20, "<");
nextPageButton = new GuiButton(1, guiLeft + 180, guiTop + 23, 20, 20, ">");
buttonList.add(prevPageButton);
buttonList.add(nextPageButton);
deleteButton = new GuiButton(2, j + 158, k + 114, 25, 20, StringUtils.localize("gui.del"));
deleteButton = new GuiButton(2, guiLeft + 158, guiTop + 114, 25, 20, StringUtils.localize("gui.del"));
buttonList.add(deleteButton);
checkDelete();
@ -97,15 +95,13 @@ public class GuiBlueprintLibrary extends GuiBuildCraft {
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
mc.renderEngine.bindTexture(TEXTURE);
int j = (width - xSize) / 2;
int k = (height - ySize) / 2;
drawTexturedModalRect(j, k, 0, 0, xSize, ySize);
drawTexturedModalRect(guiLeft, guiTop, 0, 0, xSize, ySize);
int inP = (int) (library.progressIn / 100.0 * 22.0);
int outP = (int) (library.progressOut / 100.0 * 22.0);
drawTexturedModalRect(j + 186 + 22 - inP, k + 61, 234 + 22 - inP, 16, inP, 16);
drawTexturedModalRect(j + 186, k + 78, 234, 0, outP, 16);
drawTexturedModalRect(guiLeft + 186 + 22 - inP, guiTop + 61, 234 + 22 - inP, 16, inP, 16);
drawTexturedModalRect(guiLeft + 186, guiTop + 78, 234, 0, outP, 16);
}
@Override
@ -123,11 +119,8 @@ public class GuiBlueprintLibrary extends GuiBuildCraft {
protected void mouseClicked(int i, int j, int k) {
super.mouseClicked(i, j, k);
int xMin = (width - xSize) / 2;
int yMin = (height - ySize) / 2;
int x = i - xMin;
int y = j - yMin;
int x = i - guiLeft;
int y = j - guiTop;
if (x >= 8 && x <= 88) {
int ySlot = (y - 24) / 9;

View file

@ -11,6 +11,7 @@ package buildcraft.builders.gui;
import net.minecraft.client.gui.GuiButton;
import net.minecraft.inventory.IInventory;
import net.minecraft.util.ResourceLocation;
import buildcraft.api.filler.FillerManager;
import buildcraft.builders.TileFiller;
import buildcraft.builders.filler.pattern.FillerPattern;
@ -39,11 +40,11 @@ public class GuiFiller extends GuiBuildCraft {
public void initGui() {
super.initGui();
buttonList.clear();
int w = (width - xSize) / 2;
int h = (height - ySize) / 2;
buttonList.add(new GuiBetterButton(0, w + 80 - 18, h + 30, 10, StandardButtonTextureSets.LEFT_BUTTON, ""));
buttonList.add(new GuiBetterButton(1, w + 80 + 16 + 8, h + 30, 10, StandardButtonTextureSets.RIGHT_BUTTON, ""));
buttonList.add(new GuiBetterButton(0, guiLeft + 80 - 18, guiTop + 30, 10,
StandardButtonTextureSets.LEFT_BUTTON, ""));
buttonList.add(new GuiBetterButton(1, guiLeft + 80 + 16 + 8, guiTop + 30, 10,
StandardButtonTextureSets.RIGHT_BUTTON, ""));
}
@Override

View file

@ -129,10 +129,8 @@ public class GuiZonePlan extends GuiAdvancedInterface {
@Override
public void initGui() {
super.initGui();
int x = (width - xSize) / 2;
int y = (height - ySize) / 2;
tool = new GuiButton(0, x + 5, y + 20, 20, 20, "+");
tool = new GuiButton(0, guiLeft + 5, guiTop + 20, 20, 20, "+");
buttonList.add(tool);
savedButtonList = buttonList;
@ -148,13 +146,10 @@ public class GuiZonePlan extends GuiAdvancedInterface {
protected void drawGuiContainerBackgroundLayer(float f, int x, int y) {
super.drawGuiContainerBackgroundLayer(f, x, y);
int cornerX = (width - xSize) / 2;
int cornerY = (height - ySize) / 2;
mapXMin = (width - getContainer().mapTexture.width) / 2;
if (getContainer().mapTexture.height <= 200) {
mapYMin = cornerY + 20;
mapYMin = guiTop + 20;
} else {
mapYMin = (height - getContainer().mapTexture.height) / 2;
}
@ -187,8 +182,8 @@ public class GuiZonePlan extends GuiAdvancedInterface {
drawBackgroundSlots();
bindTexture(texture);
drawTexturedModalRect(cornerX + colorSelected.x, cornerY + colorSelected.y, 0, 220, 16, 16);
drawTexturedModalRect(cornerX + 236, cornerY + 38, 16, 220, 8,
drawTexturedModalRect(guiLeft + colorSelected.x, guiTop + colorSelected.y, 0, 220, 16, 16);
drawTexturedModalRect(guiLeft + 236, guiTop + 38, 16, 220, 8,
(int) ((zonePlan.progress / (float) TileZonePlan.CRAFT_TIME) * 27));
}
}

View file

@ -29,8 +29,8 @@ public abstract class GuiAdvancedInterface extends GuiBuildCraft {
}
public int getSlotIndexAtLocation(int i, int j) {
int x = i - (width - xSize) / 2;
int y = j - (height - ySize) / 2;
int x = i - guiLeft;
int y = j - guiTop;
for (int position = 0; position < slots.size(); ++position) {
AdvancedSlot s = slots.get(position);
@ -53,9 +53,6 @@ public abstract class GuiAdvancedInterface extends GuiBuildCraft {
}
protected void drawBackgroundSlots() {
int cornerX = (width - xSize) / 2;
int cornerY = (height - ySize) / 2;
RenderHelper.enableGUIStandardItemLighting();
GL11.glPushMatrix();
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
@ -68,7 +65,7 @@ public abstract class GuiAdvancedInterface extends GuiBuildCraft {
if (slots != null) {
for (AdvancedSlot slot : slots) {
if (slot != null) {
slot.drawSprite(cornerX, cornerY);
slot.drawSprite(guiLeft, guiTop);
}
}
}
@ -85,12 +82,9 @@ public abstract class GuiAdvancedInterface extends GuiBuildCraft {
}
public void drawTooltip(String caption, int mouseX, int mouseY) {
int cornerX = (width - xSize) / 2;
int cornerY = (height - ySize) / 2;
if (caption.length() > 0) {
int i2 = mouseX - cornerX;
int k2 = mouseY - cornerY;
int i2 = mouseX - guiLeft;
int k2 = mouseY - guiTop;
drawCreativeTabHoveringText(caption, i2, k2);
RenderHelper.enableGUIStandardItemLighting();
}

View file

@ -165,9 +165,7 @@ public abstract class GuiBuildCraft extends GuiContainer {
protected void drawGuiContainerBackgroundLayer(float f, int mouseX, int mouseY) {
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
bindTexture(texture);
int x = (width - xSize) / 2;
int y = (height - ySize) / 2;
drawTexturedModalRect(x, y, 0, 0, xSize, ySize);
drawTexturedModalRect(guiLeft, guiTop, 0, 0, xSize, ySize);
int mX = mouseX - guiLeft;
int mY = mouseY - guiTop;
@ -177,7 +175,7 @@ public abstract class GuiBuildCraft extends GuiContainer {
continue;
}
bindTexture(texture);
widget.draw(this, x, y, mX, mY);
widget.draw(this, guiLeft, guiTop, mX, mY);
}
}

View file

@ -172,31 +172,26 @@ public class GuiScienceBook extends GuiAdvancedInterface {
public void initGui() {
super.initGui();
int j = (width - xSize) / 2;
int k = (height - ySize) / 2;
startResearch = new GuiButton(0, j + 10, k + 145, 70, 20, "Start");
wiki = new GuiButton(0, j + 115, k + 145, 70, 20, "Wiki");
startResearch = new GuiButton(0, guiLeft + 10, guiTop + 145, 70, 20, "Start");
wiki = new GuiButton(0, guiLeft + 115, guiTop + 145, 70, 20, "Wiki");
}
@Override
protected void drawGuiContainerBackgroundLayer(float f, int mouseX, int mouseY) {
int cornerX = (width - xSize) / 2;
int cornerY = (height - ySize) / 2;
bindTexture(TEXTURE_ICONS);
for (int i = 0; i < 7; ++i) {
if (inFocus != null || currentTier.ordinal() != i) {
drawTexturedModalRect(cornerX + 28 * i, cornerY - 28, 28 * i, 1, 29, 32);
drawTexturedModalRect(guiLeft + 28 * i, guiTop - 28, 28 * i, 1, 29, 32);
}
if (inFocus != null || currentTier.ordinal() != i + 7) {
drawTexturedModalRect(cornerX + 28 * i, cornerY + ySize - 4, 28 * i, 62, 29, 32);
drawTexturedModalRect(guiLeft + 28 * i, guiTop + ySize - 4, 28 * i, 62, 29, 32);
}
}
bindTexture(TEXTURE_TAB);
drawTexturedModalRect(cornerX, cornerY, 0, 0, xSize, ySize);
drawTexturedModalRect(guiLeft, guiTop, 0, 0, xSize, ySize);
super.drawGuiContainerBackgroundLayer(f, mouseX, mouseY);
@ -204,27 +199,27 @@ public class GuiScienceBook extends GuiAdvancedInterface {
for (int i = 0; i < 7; ++i) {
if (inFocus == null && currentTier.ordinal() == i) {
drawTexturedModalRect(cornerX + 28 * i, cornerY - 28, 28 * i, 32, 29, 32);
drawTexturedModalRect(guiLeft + 28 * i, guiTop - 28, 28 * i, 32, 29, 32);
}
if (inFocus == null && currentTier.ordinal() == i + 7) {
drawTexturedModalRect(cornerX + 28 * i, cornerY + ySize - 4, 28 * i, 96, 29, 32);
drawTexturedModalRect(guiLeft + 28 * i, guiTop + ySize - 4, 28 * i, 96, 29, 32);
}
}
int arrowHeight = (int) (22 * getContainer().progress);
drawTexturedModalRect(
cornerX + 215,
cornerY + 73 + (22 - arrowHeight),
guiLeft + 215,
guiTop + 73 + (22 - arrowHeight),
0,
128 + (22 - arrowHeight),
16,
arrowHeight);
for (int i = 0; i < 7; ++i) {
drawStack(Tier.values()[i].getStackToDisplay(), cornerX + 28 * i + 6, cornerY - 28 + 9);
drawStack(Tier.values()[i].getStackToDisplay(), guiLeft + 28 * i + 6, guiTop - 28 + 9);
drawStack(Tier.values()[i + 7].getStackToDisplay(), cornerX + 28 * i + 6, cornerY + ySize - 4 + 7);
drawStack(Tier.values()[i + 7].getStackToDisplay(), guiLeft + 28 * i + 6, guiTop + ySize - 4 + 7);
}
drawBackgroundSlots();
@ -261,13 +256,10 @@ public class GuiScienceBook extends GuiAdvancedInterface {
protected void mouseClicked(int mouseX, int mouseY, int mouseButton) {
super.mouseClicked(mouseX, mouseY, mouseButton);
int cornerX = (width - xSize) / 2;
int cornerY = (height - ySize) / 2;
for (int i = 0; i < 7; ++i) {
int x1 = cornerX + 28 * i;
int x1 = guiLeft + 28 * i;
int x2 = x1 + 29;
int y1 = cornerY - 30;
int y1 = guiTop - 30;
int y2 = y1 + 32;
if (mouseX >= x1 && mouseX <= x2 && mouseY >= y1 && mouseY <= y2) {
@ -275,7 +267,7 @@ public class GuiScienceBook extends GuiAdvancedInterface {
return;
}
y1 = cornerY + ySize - 2;
y1 = guiTop + ySize - 2;
y2 = y1 + 32;
if (mouseX >= x1 && mouseX <= x2 && mouseY >= y1 && mouseY <= y2) {

View file

@ -34,13 +34,11 @@ public class GuiCombustionEngine extends GuiEngine {
@Override
protected void drawGuiContainerBackgroundLayer(float f, int x, int y) {
super.drawGuiContainerBackgroundLayer(f, x, y);
int j = (width - xSize) / 2;
int k = (height - ySize) / 2;
TileEngineIron engine = (TileEngineIron) tile;
drawFluid(engine.getFuel(), j + 104, k + 19, 16, 58, TileEngineIron.MAX_LIQUID);
drawFluid(engine.getCoolant(), j + 122, k + 19, 16, 58, TileEngineIron.MAX_LIQUID);
drawFluid(engine.getFuel(), guiLeft + 104, guiTop + 19, 16, 58, TileEngineIron.MAX_LIQUID);
drawFluid(engine.getCoolant(), guiLeft + 122, guiTop + 19, 16, 58, TileEngineIron.MAX_LIQUID);
mc.renderEngine.bindTexture(TEXTURE);
drawTexturedModalRect(j + 104, k + 19, 176, 0, 16, 60);
drawTexturedModalRect(j + 122, k + 19, 176, 0, 16, 60);
drawTexturedModalRect(guiLeft + 104, guiTop + 19, 176, 0, 16, 60);
drawTexturedModalRect(guiLeft + 122, guiTop + 19, 176, 0, 16, 60);
}
}

View file

@ -37,15 +37,13 @@ public class GuiStoneEngine extends GuiEngine {
protected void drawGuiContainerBackgroundLayer(float f, int x, int y) {
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
mc.renderEngine.bindTexture(TEXTURE);
int j = (width - xSize) / 2;
int k = (height - ySize) / 2;
drawTexturedModalRect(j, k, 0, 0, xSize, ySize);
drawTexturedModalRect(guiLeft, guiTop, 0, 0, xSize, ySize);
TileEngineStone engine = (TileEngineStone) tile;
if (engine.getScaledBurnTime(12) > 0) {
int l = engine.getScaledBurnTime(12);
drawTexturedModalRect(j + 80, (k + 24 + 12) - l, 176, 12 - l, 14, l + 2);
drawTexturedModalRect(guiLeft + 80, (guiTop + 24 + 12) - l, 176, 12 - l, 14, l + 2);
}
}
}

View file

@ -48,12 +48,10 @@ public class GuiAutoCrafting extends GuiBuildCraft {
protected void drawGuiContainerBackgroundLayer(float f, int mouseX, int mouseY) {
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
mc.renderEngine.bindTexture(TEXTURE);
int x = (width - xSize) / 2;
int y = (height - ySize) / 2;
drawTexturedModalRect(x, y, 0, 0, xSize, ySize);
drawTexturedModalRect(guiLeft, guiTop, 0, 0, xSize, ySize);
if (bench.progress > 0) {
int progress = bench.getProgressScaled(23);
drawTexturedModalRect(x + 89, y + 45, 176, 0, progress + 1, 12);
drawTexturedModalRect(guiLeft + 89, guiTop + 45, 176, 0, progress + 1, 12);
}
}
}

View file

@ -30,9 +30,7 @@ public class GuiHopper extends GuiContainer {
protected void drawGuiContainerBackgroundLayer(float f, int x, int y) {
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
mc.renderEngine.bindTexture(TEXTURE);
int j = (width - xSize) / 2;
int k = (height - ySize) / 2;
drawTexturedModalRect(j, k, 0, 0, xSize, ySize);
drawTexturedModalRect(guiLeft, guiTop, 0, 0, xSize, ySize);
}
@Override

View file

@ -57,9 +57,7 @@ public class GuiRefinery extends GuiAdvancedInterface {
protected void drawGuiContainerBackgroundLayer(float f, int x, int y) {
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
mc.renderEngine.bindTexture(TEXTURE);
int j = (width - xSize) / 2;
int k = (height - ySize) / 2;
drawTexturedModalRect(j, k, 0, 0, xSize, ySize);
drawTexturedModalRect(guiLeft, guiTop, 0, 0, xSize, ySize);
updateSlots();
drawBackgroundSlots();

View file

@ -33,11 +33,9 @@ public class GuiAdvancedCraftingTable extends GuiLaserTable {
super.drawGuiContainerBackgroundLayer(f, mouseX, mouseY);
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
mc.renderEngine.bindTexture(TEXTURE);
int cornerX = (width - xSize) / 2;
int cornerY = (height - ySize) / 2;
if (workbench.getEnergy() > 0) {
int progress = workbench.getProgressScaled(24);
drawTexturedModalRect(cornerX + 93, cornerY + 32, 176, 0, progress + 1, 18);
drawTexturedModalRect(guiLeft + 93, guiTop + 32, 176, 0, progress + 1, 18);
}
}
}

View file

@ -133,9 +133,7 @@ public class GuiAssemblyTable extends GuiAdvancedInterface {
protected void drawGuiContainerBackgroundLayer(float f, int x, int y) {
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
mc.renderEngine.bindTexture(TEXTURE);
int cornerX = (width - xSize) / 2;
int cornerY = (height - ySize) / 2;
drawTexturedModalRect(cornerX, cornerY, 0, 0, xSize, ySize);
drawTexturedModalRect(guiLeft, guiTop, 0, 0, xSize, ySize);
updateRecipes();
@ -144,16 +142,16 @@ public class GuiAssemblyTable extends GuiAdvancedInterface {
if (slot.crafting != null) {
if (table.isAssembling(slot.crafting.recipe)) {
drawTexturedModalRect(cornerX + slot.x, cornerY + slot.y, 196, 1, 16, 16);
drawTexturedModalRect(guiLeft + slot.x, guiTop + slot.y, 196, 1, 16, 16);
} else if (table.isPlanned(slot.crafting.recipe)) {
drawTexturedModalRect(cornerX + slot.x, cornerY + slot.y, 177, 1, 16, 16);
drawTexturedModalRect(guiLeft + slot.x, guiTop + slot.y, 177, 1, 16, 16);
}
}
}
int h = table.getProgressScaled(70);
drawTexturedModalRect(cornerX + 95, cornerY + 36 + 70 - h, 176, 18, 4, h);
drawTexturedModalRect(guiLeft + 95, guiTop + 36 + 70 - h, 176, 18, 4, h);
drawBackgroundSlots();
}

View file

@ -57,11 +57,9 @@ public class GuiIntegrationTable extends GuiLaserTable {
super.drawGuiContainerBackgroundLayer(f, mouseX, mouseY);
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
mc.renderEngine.bindTexture(TEXTURE);
int cornerX = (width - xSize) / 2;
int cornerY = (height - ySize) / 2;
if (integrationTable.getEnergy() > 0) {
int progress = integrationTable.getProgressScaled(98);
drawTexturedModalRect(cornerX + 13, cornerY + 40, 0, flash ? 197 : 221, progress, 24);
drawTexturedModalRect(guiLeft + 13, guiTop + 40, 0, flash ? 197 : 221, progress, 24);
}
}
}

View file

@ -51,8 +51,6 @@ public class GuiDiamondPipe extends GuiBuildCraft {
protected void drawGuiContainerBackgroundLayer(float f, int x, int y) {
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
mc.renderEngine.bindTexture(TEXTURE);
int j = (width - xSize) / 2;
int k = (height - ySize) / 2;
drawTexturedModalRect(j, k, 0, 0, xSize, ySize);
drawTexturedModalRect(guiLeft, guiTop, 0, 0, xSize, ySize);
}
}

View file

@ -131,8 +131,6 @@ public class GuiEmeraldPipe extends GuiBuildCraft implements IButtonClickEventLi
protected void drawGuiContainerBackgroundLayer(float f, int x, int y) {
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
mc.renderEngine.bindTexture(TEXTURE);
int j = (width - xSize) / 2;
int k = (height - ySize) / 2;
drawTexturedModalRect(j, k, 0, 0, xSize, ySize);
drawTexturedModalRect(guiLeft, guiTop, 0, 0, xSize, ySize);
}
}

View file

@ -39,16 +39,14 @@ public class GuiFilteredBuffer extends GuiContainer {
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
mc.renderEngine.bindTexture(TEXTURE);
int cornerX = (width - xSize) / 2;
int cornerY = (height - ySize) / 2;
drawTexturedModalRect(cornerX, cornerY, 0, 0, xSize, ySize);
drawTexturedModalRect(guiLeft, guiTop, 0, 0, xSize, ySize);
IInventory filters = filteredBuffer.getFilters();
for (int col = 0; col < filters.getSizeInventory(); col++) {
if (filters.getStackInSlot(col) == null) {
drawTexturedModalRect(cornerX + 7 + col * 18, cornerY + 60, 176, 0, 18, 18);
drawTexturedModalRect(guiLeft + 7 + col * 18, guiTop + 60, 176, 0, 18, 18);
}
}
}

View file

@ -325,9 +325,7 @@ public class GuiGateInterface extends GuiAdvancedInterface {
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
mc.renderEngine.bindTexture(texture);
int cornerX = (width - xSize) / 2;
int cornerY = (height - ySize) / 2;
drawTexturedModalRect(cornerX, cornerY, 0, 0, xSize, ySize);
drawTexturedModalRect(guiLeft, guiTop, 0, 0, xSize, ySize);
int actionTracker = 0;
@ -339,7 +337,7 @@ public class GuiGateInterface extends GuiAdvancedInterface {
if (container.actionsState[actionTracker] != ActionActiveState.Deactivated) {
mc.renderEngine.bindTexture(texture);
drawTexturedModalRect(cornerX + slot.x + 17 + 18 * gate.material.numTriggerParameters, cornerY
drawTexturedModalRect(guiLeft + slot.x + 17 + 18 * gate.material.numTriggerParameters, guiTop
+ slot.y + 6, 176, 18, halfWidth ? 9 : 18, 4);
}
@ -352,12 +350,12 @@ public class GuiGateInterface extends GuiAdvancedInterface {
if (statement.isDefined()) {
if (!paramSlot.isAllowed()) {
drawTexturedModalRect(cornerX + slot.x - 1, cornerY + slot.y - 1, 176, 0, 18, 18);
drawTexturedModalRect(guiLeft + slot.x - 1, guiTop + slot.y - 1, 176, 0, 18, 18);
} else if (paramSlot.isRequired() && paramSlot.getItemStack() == null) {
drawTexturedModalRect(cornerX + slot.x - 1, cornerY + slot.y - 1, 176, 22, 18, 18);
drawTexturedModalRect(guiLeft + slot.x - 1, guiTop + slot.y - 1, 176, 22, 18, 18);
}
} else {
drawTexturedModalRect(cornerX + slot.x - 1, cornerY + slot.y - 1, 176, 0, 18, 18);
drawTexturedModalRect(guiLeft + slot.x - 1, guiTop + slot.y - 1, 176, 0, 18, 18);
}
}
}