mirror of
https://github.com/GTNewHorizons/EnderIO.git
synced 2026-11-20 20:22:12 +00:00
time to cry?
This commit is contained in:
1 parent
fa1e27774b
commit
9a9cda5849
8 files changed
+125
-117
No files matched your search
@@ -50,7 +50,7 @@ public class BaseSettingsPanel implements ISettingsPanel {
|
||||
|
||||
FontRenderer fr = Minecraft.getMinecraft().fontRenderer;
|
||||
int x = gap * 3 + fr.getStringWidth(modeLabel);
|
||||
int y = gap * 3 + fr.FONT_HEIGHT;
|
||||
int y = 8;// + fr.FONT_HEIGHT;
|
||||
|
||||
leftArrow = new IconButtonEIO(gui, PREV_MODE_B, x, y, IconEIO.LEFT_ARROW);
|
||||
leftArrow.setSize(8, 16);
|
||||
@@ -60,6 +60,8 @@ public class BaseSettingsPanel implements ISettingsPanel {
|
||||
rightArrow.setSize(8, 16);
|
||||
|
||||
customTop = top + gap * 5 + fr.FONT_HEIGHT * 2;
|
||||
customTop -= 16;
|
||||
//customTop = top;
|
||||
|
||||
}
|
||||
|
||||
@@ -115,10 +117,10 @@ public class BaseSettingsPanel implements ISettingsPanel {
|
||||
int rgb = ColorUtil.getRGB(Color.darkGray);
|
||||
int x = left + (width - fr.getStringWidth(getTypeName())) / 2;
|
||||
|
||||
fr.drawString(getTypeName(), x, top, rgb);
|
||||
//fr.drawString(getTypeName(), x, top, rgb);
|
||||
|
||||
x = left;
|
||||
int y = top + gap + fr.FONT_HEIGHT + gap;
|
||||
int y = customTop + 8;//gap + fr.FONT_HEIGHT + gap;
|
||||
gui.getFontRenderer().drawString(modeLabel, x, y, rgb);
|
||||
|
||||
String modeString = con.getConectionMode(gui.dir).getLocalisedName();
|
||||
@@ -134,6 +136,7 @@ public class BaseSettingsPanel implements ISettingsPanel {
|
||||
gui.getFontRenderer().drawString(modeString, x, y, rgb);
|
||||
|
||||
renderCustomOptions(y + gap + fr.FONT_HEIGHT + gap, par1, par2, par3);
|
||||
//renderCustomOptions(y + gap, par1, par2, par3);
|
||||
}
|
||||
|
||||
protected void renderCustomOptions(int top, float par1, int par2, int par3) {
|
||||
|
||||
@@ -24,8 +24,7 @@ public class BasicItemFilterGui {
|
||||
private static final int ID_NBT = 18;
|
||||
private static final int ID_META = 19;
|
||||
private static final int ID_ORE_DICT = 20;
|
||||
private static final int ID_STICKY = 21;
|
||||
private static final int ID_CHANNEL = 23;
|
||||
private static final int ID_STICKY = 21;
|
||||
|
||||
private IItemConduit itemConduit;
|
||||
private GuiExternalConnection gui;
|
||||
@@ -35,7 +34,7 @@ public class BasicItemFilterGui {
|
||||
private IconButtonEIO whiteListB;
|
||||
private ToggleButtonEIO useOreDictB;
|
||||
private ToggleButtonEIO stickyB;
|
||||
private ColorButton channelB;
|
||||
|
||||
|
||||
boolean isAdvanced;
|
||||
boolean isInput;
|
||||
@@ -56,7 +55,7 @@ public class BasicItemFilterGui {
|
||||
|
||||
int butLeft = 124;
|
||||
int x = butLeft ;
|
||||
int y = 66;
|
||||
int y = 68;
|
||||
whiteListB = new IconButtonEIO(gui, ID_WHITELIST, x, y, IconEIO.FILTER_WHITELIST);
|
||||
whiteListB.setToolTip(Lang.localize("gui.conduit.item.whitelist"));
|
||||
|
||||
@@ -76,17 +75,13 @@ public class BasicItemFilterGui {
|
||||
y += 20;
|
||||
x = butLeft;
|
||||
|
||||
channelB = new ColorButton(gui, ID_CHANNEL, x, y);
|
||||
channelB.setColorIndex(0);
|
||||
channelB.setToolTipHeading(Lang.localize("gui.conduit.item.channel"));
|
||||
|
||||
x += 20;
|
||||
useNbtB = new ToggleButtonEIO(gui, ID_NBT, x, y, IconEIO.FILTER_NBT_OFF, IconEIO.FILTER_NBT);
|
||||
useNbtB.setSelectedToolTip(Lang.localize("gui.conduit.item.matchNBT"));
|
||||
useNbtB.setUnselectedToolTip(Lang.localize("gui.conduit.item.ignoreNBT"));
|
||||
useNbtB.setPaintSelectedBorder(false);
|
||||
|
||||
x += 20;
|
||||
x = butLeft;
|
||||
useOreDictB = new ToggleButtonEIO(gui, ID_ORE_DICT, x, y, IconEIO.FILTER_ORE_DICT_OFF, IconEIO.FILTER_ORE_DICT);
|
||||
useOreDictB.setSelectedToolTip(Lang.localize("gui.conduit.item.oreDicEnabled"));
|
||||
useOreDictB.setUnselectedToolTip(Lang.localize("gui.conduit.item.oreDicDisabled"));
|
||||
@@ -95,17 +90,6 @@ public class BasicItemFilterGui {
|
||||
|
||||
public void updateButtons() {
|
||||
|
||||
int chanCol;
|
||||
if(isInput) {
|
||||
chanCol = itemConduit.getInputColor(gui.dir).ordinal();
|
||||
} else {
|
||||
stickyB.onGuiInit();
|
||||
stickyB.setSelected(filter.isSticky());
|
||||
chanCol = itemConduit.getOutputColor(gui.dir).ordinal();
|
||||
}
|
||||
channelB.onGuiInit();
|
||||
channelB.setColorIndex(chanCol);
|
||||
|
||||
ItemFilter activeFilter = (ItemFilter)filter;
|
||||
|
||||
if(isAdvanced) {
|
||||
@@ -114,6 +98,11 @@ public class BasicItemFilterGui {
|
||||
|
||||
useOreDictB.onGuiInit();
|
||||
useOreDictB.setSelected(activeFilter.isUseOreDict());
|
||||
|
||||
if(!isInput) {
|
||||
stickyB.onGuiInit();
|
||||
stickyB.setSelected(activeFilter.isSticky());
|
||||
}
|
||||
}
|
||||
|
||||
useMetaB.onGuiInit();
|
||||
@@ -147,20 +136,7 @@ public class BasicItemFilterGui {
|
||||
} else if(guiButton.id == ID_WHITELIST) {
|
||||
filter.setBlacklist(!filter.isBlacklist());
|
||||
sendFilterChange();
|
||||
} else if(guiButton.id == ID_CHANNEL) {
|
||||
|
||||
DyeColor col = DyeColor.values()[channelB.getColorIndex()];
|
||||
boolean input;
|
||||
if(isInput) {
|
||||
col = DyeColor.values()[channelB.getColorIndex()];
|
||||
itemConduit.setInputColor(gui.dir, col);
|
||||
input = true;
|
||||
} else {
|
||||
itemConduit.setOutputColor(gui.dir, DyeColor.values()[channelB.getColorIndex()]);
|
||||
input = false;
|
||||
}
|
||||
EnderIO.packetPipeline.sendToServer(new PacketItemConduitFilter(itemConduit, gui.dir));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void sendFilterChange() {
|
||||
@@ -168,8 +144,7 @@ public class BasicItemFilterGui {
|
||||
EnderIO.packetPipeline.sendToServer(new PacketItemConduitFilter(itemConduit, gui.dir));
|
||||
}
|
||||
|
||||
public void deactivate() {
|
||||
channelB.detach();
|
||||
public void deactivate() {
|
||||
useNbtB.detach();
|
||||
useMetaB.detach();
|
||||
useOreDictB.detach();
|
||||
@@ -180,9 +155,9 @@ public class BasicItemFilterGui {
|
||||
public void renderCustomOptions(int top, float par1, int par2, int par3) {
|
||||
GL11.glColor3f(1, 1, 1);
|
||||
RenderUtil.bindTexture("enderio:textures/gui/itemFilter.png");
|
||||
gui.drawTexturedModalRect(gui.getGuiLeft() + 32, gui.getGuiTop() + 66, 0, 238, 18 * 5, 18);
|
||||
gui.drawTexturedModalRect(gui.getGuiLeft() + 32, gui.getGuiTop() + 68, 0, 238, 18 * 5, 18);
|
||||
if(filter.isAdvanced()) {
|
||||
gui.drawTexturedModalRect(gui.getGuiLeft() + 32, gui.getGuiTop() + 84, 0, 238, 18 * 5, 18);
|
||||
gui.drawTexturedModalRect(gui.getGuiLeft() + 32, gui.getGuiTop() + 86, 0, 238, 18 * 5, 18);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -68,19 +68,19 @@ public class ExternalConnectionContainer extends Container {
|
||||
if(itemConduit != null) {
|
||||
|
||||
x = 10;
|
||||
y = 67;
|
||||
y = 47;
|
||||
FilterUpgradeInventory fi = new FilterUpgradeInventory(itemConduit, dir, false);
|
||||
addSlotToContainer(new FilterSlot(fi, 0, x, y, false));
|
||||
slotLocations.add(new Point(x, y));
|
||||
|
||||
x = 10;
|
||||
y = 67;
|
||||
y = 47;
|
||||
fi = new FilterUpgradeInventory(itemConduit, dir, true);
|
||||
addSlotToContainer(new FilterSlot(fi, 0, x, y, true));
|
||||
slotLocations.add(new Point(x, y));
|
||||
|
||||
x = 10;
|
||||
y = 85;
|
||||
x = 28;
|
||||
y = 47;
|
||||
SpeedUpgradesInventory si = new SpeedUpgradesInventory(itemConduit, dir);
|
||||
addSlotToContainer(new Slot(si, 0, x, y));
|
||||
slotLocations.add(new Point(x, y));
|
||||
@@ -179,14 +179,7 @@ public class ExternalConnectionContainer extends Container {
|
||||
if(par1 >= startFilterSlot && itemConduit != null) {
|
||||
itemConduit.setInputFilter(dir, inputFilter);
|
||||
itemConduit.setOutputFilter(dir, outputFilter);
|
||||
}
|
||||
// if(itemConduit != null) {
|
||||
// itemConduit.setInputFilter(dir, inputFilter);
|
||||
// itemConduit.setOutputFilter(dir, outputFilter);
|
||||
// if(par4EntityPlayer.worldObj.isRemote) {
|
||||
// par4EntityPlayer.worldObj.markBlockForUpdate(bundle.getEntity().xCoord, bundle.getEntity().xCoord, bundle.getEntity().xCoord);
|
||||
// }
|
||||
// }
|
||||
}
|
||||
}
|
||||
try {
|
||||
return super.slotClick(par1, par2, par3, par4EntityPlayer);
|
||||
|
||||
@@ -64,7 +64,7 @@ public class GuiExternalConnection extends GuiContainerBase {
|
||||
buttonList.clear();
|
||||
for (int i = 0; i < tabs.size(); i++) {
|
||||
if(i == activeTab) {
|
||||
tabs.get(i).onGuiInit(guiLeft + 10, guiTop + 10, xSize - 20, ySize - 20);
|
||||
tabs.get(i).onGuiInit(guiLeft + 10, guiTop, xSize - 20, ySize - 20);
|
||||
} else {
|
||||
tabs.get(i).deactivate();
|
||||
}
|
||||
|
||||
@@ -40,6 +40,7 @@ public class ItemSettings extends BaseSettingsPanel {
|
||||
private static final int ID_ROUND_ROBIN = 24;
|
||||
private static final int ID_PRIORITY_UP = 25;
|
||||
private static final int ID_PRIORITY_DOWN = 26;
|
||||
private static final int ID_CHANNEL = 23;
|
||||
|
||||
private IItemConduit itemConduit;
|
||||
|
||||
@@ -56,12 +57,14 @@ public class ItemSettings extends BaseSettingsPanel {
|
||||
|
||||
private RedstoneModeButton rsB;
|
||||
private ColorButton colorB;
|
||||
|
||||
private ColorButton channelB;
|
||||
|
||||
boolean inOutShowIn = false;
|
||||
|
||||
private IItemFilter activeFilter;
|
||||
|
||||
private int priLeft = 120;
|
||||
private int priLeft;
|
||||
private int priWidth = 32;
|
||||
|
||||
private GuiToolTip priorityTooltip;
|
||||
@@ -75,13 +78,20 @@ public class ItemSettings extends BaseSettingsPanel {
|
||||
inputHeading = Lang.localize("gui.conduit.item.extractionFilter");
|
||||
outputHeading = Lang.localize("gui.conduit.item.insertionFilter");
|
||||
|
||||
int x = 98;
|
||||
int x = 52;
|
||||
int y = customTop;
|
||||
|
||||
nextFilterB = new IconButtonEIO(gui, NEXT_FILTER_ID, x, y, IconEIO.RIGHT_ARROW);
|
||||
nextFilterB.setSize(8, 16);
|
||||
|
||||
x = 115;
|
||||
x = 66;
|
||||
channelB = new ColorButton(gui, ID_CHANNEL, x, y);
|
||||
channelB.setColorIndex(0);
|
||||
channelB.setToolTipHeading(Lang.localize("gui.conduit.item.channel"));
|
||||
|
||||
x += channelB.getWidth() + 4;
|
||||
priLeft = x - 8;
|
||||
|
||||
rsB = new RedstoneModeButton(gui, ID_REDSTONE_BUTTON, x, y, new IRedstoneModeControlable() {
|
||||
|
||||
@Override
|
||||
@@ -117,13 +127,13 @@ public class ItemSettings extends BaseSettingsPanel {
|
||||
loopB.setUnselectedToolTip(Lang.localize("gui.conduit.item.selfFeedDisabled"));
|
||||
loopB.setPaintSelectedBorder(false);
|
||||
|
||||
x = priLeft + priWidth + 9;
|
||||
x = priLeft + priWidth + 9;
|
||||
priUpB = new IconButtonEIO(gui, ID_PRIORITY_UP, x, y, IconEIO.ADD_BUT);
|
||||
priUpB.setSize(10, 10);
|
||||
priUpB.setSize(8, 8);
|
||||
|
||||
y += 10;
|
||||
y += 8;
|
||||
priDownB = new IconButtonEIO(gui, ID_PRIORITY_DOWN, x, y, IconEIO.MINUS_BUT);
|
||||
priDownB.setSize(10, 10);
|
||||
priDownB.setSize(8, 8);
|
||||
|
||||
priorityTooltip = new GuiToolTip(new Rectangle(priLeft + 9, y, priWidth, 20), Lang.localize("gui.conduit.item.priority"));
|
||||
|
||||
@@ -166,15 +176,10 @@ public class ItemSettings extends BaseSettingsPanel {
|
||||
|
||||
ConnectionMode mode = con.getConectionMode(gui.dir);
|
||||
if(mode == ConnectionMode.INPUT) {
|
||||
showInput = true;
|
||||
// gui.container.setInputSlotsVisible(true);
|
||||
// gui.container.setOutputSlotsVisible(false);
|
||||
// gui.container.setInventorySlotsVisible(true);
|
||||
showInput = true;
|
||||
} else if(mode == ConnectionMode.OUTPUT) {
|
||||
showOutput = true;
|
||||
// gui.container.setInputSlotsVisible(false);
|
||||
// gui.container.setOutputSlotsVisible(true);
|
||||
// gui.container.setInventorySlotsVisible(true);
|
||||
|
||||
} else if(mode == ConnectionMode.IN_OUT) {
|
||||
|
||||
if(nextFilterB != null) {
|
||||
@@ -194,8 +199,8 @@ public class ItemSettings extends BaseSettingsPanel {
|
||||
gui.container.setInputSlotsVisible(true);
|
||||
gui.container.setOutputSlotsVisible(false);
|
||||
if(activeFilter != null) {
|
||||
filterGui = new BasicItemFilterGui(gui, itemConduit, true);
|
||||
|
||||
filterGui = new BasicItemFilterGui(gui, itemConduit, true);
|
||||
|
||||
}
|
||||
} else if(showOutput) {
|
||||
activeFilter = itemConduit.getOutputFilter(gui.dir);
|
||||
@@ -203,7 +208,7 @@ public class ItemSettings extends BaseSettingsPanel {
|
||||
gui.container.setOutputSlotsVisible(true);
|
||||
gui.container.setInventorySlotsVisible(true);
|
||||
if(activeFilter != null) {
|
||||
filterGui = new BasicItemFilterGui(gui, itemConduit, false);
|
||||
filterGui = new BasicItemFilterGui(gui, itemConduit, false);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -224,26 +229,26 @@ public class ItemSettings extends BaseSettingsPanel {
|
||||
|
||||
boolean showInput = mode == ConnectionMode.INPUT || (mode == ConnectionMode.IN_OUT && inOutShowIn);
|
||||
if(showInput) {
|
||||
gui.container.setInventorySlotsVisible(true);
|
||||
gui.container.setInventorySlotsVisible(true);
|
||||
gui.container.setInputSlotsVisible(true);
|
||||
gui.container.setOutputSlotsVisible(false);
|
||||
|
||||
|
||||
activeFilter = itemConduit.getInputFilter(gui.dir);
|
||||
if(activeFilter != null) {
|
||||
filterGui = new BasicItemFilterGui(gui, itemConduit, true);
|
||||
filterGui = new BasicItemFilterGui(gui, itemConduit, true);
|
||||
}
|
||||
} else {
|
||||
gui.container.setInventorySlotsVisible(true);
|
||||
gui.container.setInventorySlotsVisible(true);
|
||||
gui.container.setInputSlotsVisible(false);
|
||||
gui.container.setOutputSlotsVisible(true);
|
||||
|
||||
|
||||
activeFilter = itemConduit.getOutputFilter(gui.dir);
|
||||
if(activeFilter != null) {
|
||||
filterGui = new BasicItemFilterGui(gui, itemConduit, false);
|
||||
filterGui = new BasicItemFilterGui(gui, itemConduit, false);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
if(filterGui != null) {
|
||||
if(filterGui != null) {
|
||||
filterGui.updateButtons();
|
||||
}
|
||||
|
||||
@@ -256,7 +261,7 @@ public class ItemSettings extends BaseSettingsPanel {
|
||||
return;
|
||||
}
|
||||
boolean outputActive = (mode == ConnectionMode.IN_OUT && !inOutShowIn) || (mode == ConnectionMode.OUTPUT);
|
||||
int chanCol;
|
||||
|
||||
if(!outputActive) {
|
||||
|
||||
rsB.onGuiInit();
|
||||
@@ -281,6 +286,15 @@ public class ItemSettings extends BaseSettingsPanel {
|
||||
priDownB.onGuiInit();
|
||||
gui.addToolTip(priorityTooltip);
|
||||
}
|
||||
|
||||
int chanCol;
|
||||
if(!outputActive) {
|
||||
chanCol = itemConduit.getInputColor(gui.dir).ordinal();
|
||||
} else {
|
||||
chanCol = itemConduit.getOutputColor(gui.dir).ordinal();
|
||||
}
|
||||
channelB.onGuiInit();
|
||||
channelB.setColorIndex(chanCol);
|
||||
|
||||
if(filterGui != null) {
|
||||
filterGui.updateButtons();
|
||||
@@ -309,6 +323,19 @@ public class ItemSettings extends BaseSettingsPanel {
|
||||
} else if(guiButton.id == ID_PRIORITY_DOWN) {
|
||||
itemConduit.setOutputPriority(gui.dir, itemConduit.getOutputPriority(gui.dir) - 1);
|
||||
EnderIO.packetPipeline.sendToServer(new PacketItemConduitFilter(itemConduit, gui.dir));
|
||||
} else if(guiButton.id == ID_CHANNEL) {
|
||||
|
||||
DyeColor col = DyeColor.values()[channelB.getColorIndex()];
|
||||
boolean input;
|
||||
if(isInputVisible()) {
|
||||
col = DyeColor.values()[channelB.getColorIndex()];
|
||||
itemConduit.setInputColor(gui.dir, col);
|
||||
input = true;
|
||||
} else {
|
||||
itemConduit.setOutputColor(gui.dir, DyeColor.values()[channelB.getColorIndex()]);
|
||||
input = false;
|
||||
}
|
||||
EnderIO.packetPipeline.sendToServer(new PacketItemConduitFilter(itemConduit, gui.dir));
|
||||
}
|
||||
|
||||
if(filterGui != null) {
|
||||
@@ -316,6 +343,11 @@ public class ItemSettings extends BaseSettingsPanel {
|
||||
}
|
||||
}
|
||||
|
||||
private boolean isInputVisible() {
|
||||
ConnectionMode mode = con.getConectionMode(gui.dir);
|
||||
return (mode == ConnectionMode.IN_OUT && inOutShowIn) || (mode == ConnectionMode.INPUT);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void connectionModeChanged(ConnectionMode conectionMode) {
|
||||
super.connectionModeChanged(conectionMode);
|
||||
@@ -325,40 +357,44 @@ public class ItemSettings extends BaseSettingsPanel {
|
||||
@Override
|
||||
protected void renderCustomOptions(int top, float par1, int par2, int par3) {
|
||||
ConnectionMode mode = con.getConectionMode(gui.dir);
|
||||
if(mode != ConnectionMode.DISABLED) {
|
||||
|
||||
RenderUtil.bindTexture("enderio:textures/gui/itemFilter.png");
|
||||
gui.drawTexturedModalRect(gui.getGuiLeft(), gui.getGuiTop() + 55, 0, 55, gui.getXSize(), 145);
|
||||
|
||||
FontRenderer fr = gui.getFontRenderer();
|
||||
String heading = getHeading();
|
||||
int headingWidth = fr.getStringWidth(heading);
|
||||
int x = 0;
|
||||
int rgb = ColorUtil.getRGB(Color.darkGray);
|
||||
fr.drawString(heading, left + x, top, rgb);
|
||||
|
||||
boolean outputActive = (mode == ConnectionMode.IN_OUT && !inOutShowIn) || (mode == ConnectionMode.OUTPUT);
|
||||
if(outputActive) {
|
||||
GL11.glColor3f(1, 1, 1);
|
||||
IconEIO.BUTTON_DOWN.renderIcon(left + priLeft, top - 5, priWidth, 20, 0, true);
|
||||
String str = itemConduit.getOutputPriority(gui.dir) + "";
|
||||
int sw = fr.getStringWidth(str);
|
||||
fr.drawString(str, left + priLeft + priWidth - sw - gap, top, ColorUtil.getRGB(Color.black));
|
||||
|
||||
GL11.glColor3f(1, 1, 1);
|
||||
RenderUtil.bindTexture("enderio:textures/gui/itemFilter.png");
|
||||
gui.drawTexturedModalRect(gui.getGuiLeft() + 9, gui.getGuiTop() + 66, 94, 220, 18, 18);
|
||||
|
||||
} else {
|
||||
//draw speed upgrade slot
|
||||
GL11.glColor3f(1, 1, 1);
|
||||
RenderUtil.bindTexture("enderio:textures/gui/itemFilter.png");
|
||||
gui.drawTexturedModalRect(gui.getGuiLeft() + 9, gui.getGuiTop() + 66, 94, 220, 18, 36);
|
||||
}
|
||||
if(filterGui != null) {
|
||||
filterGui.renderCustomOptions(top, par1, par2, par3);
|
||||
}
|
||||
if(mode == ConnectionMode.DISABLED) {
|
||||
return;
|
||||
}
|
||||
|
||||
RenderUtil.bindTexture("enderio:textures/gui/itemFilter.png");
|
||||
gui.drawTexturedModalRect(gui.getGuiLeft(), gui.getGuiTop() + 55, 0, 55, gui.getXSize(), 145);
|
||||
|
||||
FontRenderer fr = gui.getFontRenderer();
|
||||
String heading = getHeading();
|
||||
int headingWidth = fr.getStringWidth(heading);
|
||||
int x = 0;
|
||||
int rgb = ColorUtil.getRGB(Color.darkGray);
|
||||
fr.drawString(heading, left + x, top, rgb);
|
||||
|
||||
boolean outputActive = (mode == ConnectionMode.IN_OUT && !inOutShowIn) || (mode == ConnectionMode.OUTPUT);
|
||||
if(outputActive) {
|
||||
GL11.glColor3f(1, 1, 1);
|
||||
IconEIO.BUTTON_DOWN.renderIcon(left + priLeft, top - 5, priWidth, 16, 0, true);
|
||||
String str = itemConduit.getOutputPriority(gui.dir) + "";
|
||||
int sw = fr.getStringWidth(str);
|
||||
fr.drawString(str, left + priLeft + priWidth - sw - gap, top, ColorUtil.getRGB(Color.black));
|
||||
|
||||
} else {
|
||||
//draw speed upgrade slot
|
||||
GL11.glColor3f(1, 1, 1);
|
||||
RenderUtil.bindTexture("enderio:textures/gui/itemFilter.png");
|
||||
gui.drawTexturedModalRect(gui.getGuiLeft() + 9 + 18, gui.getGuiTop() + 46, 94, 238, 18, 18);
|
||||
}
|
||||
|
||||
//filter upgrade slot
|
||||
GL11.glColor3f(1, 1, 1);
|
||||
RenderUtil.bindTexture("enderio:textures/gui/itemFilter.png");
|
||||
gui.drawTexturedModalRect(gui.getGuiLeft() + 9, gui.getGuiTop() + 46, 94, 220, 18, 18);
|
||||
|
||||
if(filterGui != null) {
|
||||
filterGui.renderCustomOptions(top, par1, par2, par3);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -374,6 +410,7 @@ public class ItemSettings extends BaseSettingsPanel {
|
||||
priUpB.detach();
|
||||
priDownB.detach();
|
||||
gui.removeToolTip(priorityTooltip);
|
||||
channelB.detach();
|
||||
|
||||
if(filterGui != null) {
|
||||
filterGui.deactivate();
|
||||
|
||||
@@ -292,7 +292,7 @@ public class ItemFilter implements IInventory, IItemFilter {
|
||||
public List<Slot> getSlots() {
|
||||
List<Slot> result = new ArrayList<Slot>();
|
||||
|
||||
int topY = 67;
|
||||
int topY = 69;
|
||||
int leftX = 33;
|
||||
int index = 0;
|
||||
int numRows = isAdvanced ? 2 : 1;
|
||||
|
||||
@@ -39,7 +39,7 @@ public class IconButtonEIO extends GuiButton {
|
||||
public void setToolTip(String... tooltipText) {
|
||||
if(toolTip == null) {
|
||||
toolTip = new GuiToolTip(new Rectangle(xOrigin, yOrigin, width, height), tooltipText);
|
||||
gui.addToolTip(toolTip);
|
||||
//gui.addToolTip(toolTip);
|
||||
toolTip.setBounds(new Rectangle(xPosition, yPosition, width, height));
|
||||
} else {
|
||||
toolTip.setToolTipText(tooltipText);
|
||||
|
||||
Reference in new issue
Block a user