mirror of
https://github.com/Thorfusion/Mekanism-Community-Edition.git
synced 2026-11-20 12:09:45 +00:00
Finished the separation of transporter and side configs
This commit is contained in:
1 parent
c84e13124a
commit
78c3fe50ca
15 files changed
+139
-117
No files matched your search
@@ -16,7 +16,7 @@ import mekanism.client.gui.GuiChemicalInjectionChamber;
|
||||
import mekanism.client.gui.GuiChemicalOxidizer;
|
||||
import mekanism.client.gui.GuiChemicalWasher;
|
||||
import mekanism.client.gui.GuiCombiner;
|
||||
import mekanism.client.gui.GuiConfiguration;
|
||||
import mekanism.client.gui.GuiSideConfiguration;
|
||||
import mekanism.client.gui.GuiCredits;
|
||||
import mekanism.client.gui.GuiCrusher;
|
||||
import mekanism.client.gui.GuiDictionary;
|
||||
@@ -405,7 +405,7 @@ public class ClientProxy extends CommonProxy
|
||||
case 8:
|
||||
return new GuiEnergyCube(player.inventory, (TileEntityEnergyCube)tileEntity);
|
||||
case 9:
|
||||
return new GuiConfiguration(player, (ISideConfiguration)tileEntity);
|
||||
return new GuiSideConfiguration(player, (ISideConfiguration)tileEntity);
|
||||
case 10:
|
||||
return new GuiGasTank(player.inventory, (TileEntityGasTank)tileEntity);
|
||||
case 11:
|
||||
|
||||
@@ -4,27 +4,29 @@ import java.util.List;
|
||||
|
||||
import mekanism.api.gas.GasStack;
|
||||
import mekanism.api.util.ListUtils;
|
||||
import mekanism.client.gui.element.GuiConfigurationTab;
|
||||
import mekanism.client.gui.element.GuiEnergyInfo;
|
||||
import mekanism.client.gui.element.GuiEnergyInfo.IInfoHandler;
|
||||
import mekanism.client.gui.element.GuiPowerBar;
|
||||
import mekanism.client.gui.element.GuiProgress;
|
||||
import mekanism.client.gui.element.GuiSlot;
|
||||
import mekanism.client.gui.element.GuiUpgradeTab;
|
||||
import mekanism.client.gui.element.GuiEnergyInfo.IInfoHandler;
|
||||
import mekanism.client.gui.element.GuiProgress.IProgressInfoHandler;
|
||||
import mekanism.client.gui.element.GuiProgress.ProgressBar;
|
||||
import mekanism.client.gui.element.GuiSideConfigurationTab;
|
||||
import mekanism.client.gui.element.GuiSlot;
|
||||
import mekanism.client.gui.element.GuiSlot.SlotOverlay;
|
||||
import mekanism.client.gui.element.GuiSlot.SlotType;
|
||||
import mekanism.client.gui.element.GuiTransporterConfigTab;
|
||||
import mekanism.client.gui.element.GuiUpgradeTab;
|
||||
import mekanism.client.render.MekanismRenderer;
|
||||
import mekanism.common.inventory.container.ContainerAdvancedElectricMachine;
|
||||
import mekanism.common.tile.TileEntityAdvancedElectricMachine;
|
||||
import mekanism.common.util.MekanismUtils;
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public class GuiAdvancedElectricMachine extends GuiMekanism
|
||||
{
|
||||
@@ -37,7 +39,8 @@ public class GuiAdvancedElectricMachine extends GuiMekanism
|
||||
|
||||
guiElements.add(new GuiRedstoneControl(this, tileEntity, tileEntity.guiLocation));
|
||||
guiElements.add(new GuiUpgradeTab(this, tileEntity, tileEntity.guiLocation));
|
||||
guiElements.add(new GuiConfigurationTab(this, tileEntity, tileEntity.guiLocation));
|
||||
guiElements.add(new GuiSideConfigurationTab(this, tileEntity, tileEntity.guiLocation));
|
||||
guiElements.add(new GuiTransporterConfigTab(this, 34, tileEntity, tileEntity.guiLocation));
|
||||
guiElements.add(new GuiPowerBar(this, tileEntity, tileEntity.guiLocation, 164, 15));
|
||||
guiElements.add(new GuiEnergyInfo(new IInfoHandler() {
|
||||
@Override
|
||||
|
||||
@@ -3,26 +3,28 @@ package mekanism.client.gui;
|
||||
import java.util.List;
|
||||
|
||||
import mekanism.api.util.ListUtils;
|
||||
import mekanism.client.gui.element.GuiConfigurationTab;
|
||||
import mekanism.client.gui.element.GuiEnergyInfo;
|
||||
import mekanism.client.gui.element.GuiEnergyInfo.IInfoHandler;
|
||||
import mekanism.client.gui.element.GuiPowerBar;
|
||||
import mekanism.client.gui.element.GuiProgress;
|
||||
import mekanism.client.gui.element.GuiSlot;
|
||||
import mekanism.client.gui.element.GuiUpgradeTab;
|
||||
import mekanism.client.gui.element.GuiEnergyInfo.IInfoHandler;
|
||||
import mekanism.client.gui.element.GuiProgress.IProgressInfoHandler;
|
||||
import mekanism.client.gui.element.GuiProgress.ProgressBar;
|
||||
import mekanism.client.gui.element.GuiSideConfigurationTab;
|
||||
import mekanism.client.gui.element.GuiSlot;
|
||||
import mekanism.client.gui.element.GuiSlot.SlotOverlay;
|
||||
import mekanism.client.gui.element.GuiSlot.SlotType;
|
||||
import mekanism.client.gui.element.GuiTransporterConfigTab;
|
||||
import mekanism.client.gui.element.GuiUpgradeTab;
|
||||
import mekanism.common.inventory.container.ContainerChanceMachine;
|
||||
import mekanism.common.tile.TileEntityChanceMachine;
|
||||
import mekanism.common.util.MekanismUtils;
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public class GuiChanceMachine extends GuiMekanism
|
||||
{
|
||||
@@ -35,7 +37,8 @@ public class GuiChanceMachine extends GuiMekanism
|
||||
|
||||
guiElements.add(new GuiRedstoneControl(this, tileEntity, tileEntity.guiLocation));
|
||||
guiElements.add(new GuiUpgradeTab(this, tileEntity, tileEntity.guiLocation));
|
||||
guiElements.add(new GuiConfigurationTab(this, tileEntity, tileEntity.guiLocation));
|
||||
guiElements.add(new GuiSideConfigurationTab(this, tileEntity, tileEntity.guiLocation));
|
||||
guiElements.add(new GuiTransporterConfigTab(this, 34, tileEntity, tileEntity.guiLocation));
|
||||
guiElements.add(new GuiPowerBar(this, tileEntity, tileEntity.guiLocation, 164, 15));
|
||||
guiElements.add(new GuiEnergyInfo(new IInfoHandler() {
|
||||
@Override
|
||||
|
||||
@@ -8,20 +8,21 @@ import mekanism.api.gas.Gas;
|
||||
import mekanism.api.gas.GasTank;
|
||||
import mekanism.api.gas.OreGas;
|
||||
import mekanism.api.util.ListUtils;
|
||||
import mekanism.client.gui.element.GuiConfigurationTab;
|
||||
import mekanism.client.gui.element.GuiEnergyInfo;
|
||||
import mekanism.client.gui.element.GuiEnergyInfo.IInfoHandler;
|
||||
import mekanism.client.gui.element.GuiGasGauge;
|
||||
import mekanism.client.gui.element.GuiGasGauge.IGasInfoHandler;
|
||||
import mekanism.client.gui.element.GuiGauge;
|
||||
import mekanism.client.gui.element.GuiPowerBar;
|
||||
import mekanism.client.gui.element.GuiProgress;
|
||||
import mekanism.client.gui.element.GuiSlot;
|
||||
import mekanism.client.gui.element.GuiUpgradeTab;
|
||||
import mekanism.client.gui.element.GuiEnergyInfo.IInfoHandler;
|
||||
import mekanism.client.gui.element.GuiGasGauge.IGasInfoHandler;
|
||||
import mekanism.client.gui.element.GuiProgress.IProgressInfoHandler;
|
||||
import mekanism.client.gui.element.GuiProgress.ProgressBar;
|
||||
import mekanism.client.gui.element.GuiSideConfigurationTab;
|
||||
import mekanism.client.gui.element.GuiSlot;
|
||||
import mekanism.client.gui.element.GuiSlot.SlotOverlay;
|
||||
import mekanism.client.gui.element.GuiSlot.SlotType;
|
||||
import mekanism.client.gui.element.GuiTransporterConfigTab;
|
||||
import mekanism.client.gui.element.GuiUpgradeTab;
|
||||
import mekanism.client.sound.SoundHandler;
|
||||
import mekanism.common.Mekanism;
|
||||
import mekanism.common.inventory.container.ContainerChemicalCrystallizer;
|
||||
@@ -63,7 +64,8 @@ public class GuiChemicalCrystallizer extends GuiMekanism
|
||||
guiElements.add(new GuiRedstoneControl(this, tileEntity, MekanismUtils.getResource(ResourceType.GUI, "GuiChemicalCrystallizer.png")));
|
||||
guiElements.add(new GuiUpgradeTab(this, tileEntity, MekanismUtils.getResource(ResourceType.GUI, "GuiChemicalCrystallizer.png")));
|
||||
guiElements.add(new GuiPowerBar(this, tileEntity, MekanismUtils.getResource(ResourceType.GUI, "GuiChemicalCrystallizer.png"), 160, 23));
|
||||
guiElements.add(new GuiConfigurationTab(this, tileEntity, MekanismUtils.getResource(ResourceType.GUI, "GuiChemicalCrystallizer.png")));
|
||||
guiElements.add(new GuiSideConfigurationTab(this, tileEntity, MekanismUtils.getResource(ResourceType.GUI, "GuiChemicalCrystallizer.png")));
|
||||
guiElements.add(new GuiTransporterConfigTab(this, 34, tileEntity, MekanismUtils.getResource(ResourceType.GUI, "GuiChemicalCrystallizer.png")));
|
||||
guiElements.add(new GuiEnergyInfo(new IInfoHandler() {
|
||||
@Override
|
||||
public List<String> getInfo()
|
||||
|
||||
@@ -3,7 +3,7 @@ package mekanism.client.gui;
|
||||
import java.util.List;
|
||||
|
||||
import mekanism.api.util.ListUtils;
|
||||
import mekanism.client.gui.element.GuiConfigurationTab;
|
||||
import mekanism.client.gui.element.GuiSideConfigurationTab;
|
||||
import mekanism.client.gui.element.GuiEnergyInfo;
|
||||
import mekanism.client.gui.element.GuiEnergyInfo.IInfoHandler;
|
||||
import mekanism.client.gui.element.GuiPowerBar;
|
||||
@@ -37,8 +37,8 @@ public class GuiElectricMachine extends GuiMekanism
|
||||
|
||||
guiElements.add(new GuiRedstoneControl(this, tileEntity, tileEntity.guiLocation));
|
||||
guiElements.add(new GuiUpgradeTab(this, tileEntity, tileEntity.guiLocation));
|
||||
guiElements.add(new GuiConfigurationTab(this, tileEntity, tileEntity.guiLocation));
|
||||
guiElements.add(new GuiTransporterConfigTab(this, 30, tileEntity, tileEntity.guiLocation));
|
||||
guiElements.add(new GuiSideConfigurationTab(this, tileEntity, tileEntity.guiLocation));
|
||||
guiElements.add(new GuiTransporterConfigTab(this, 34, tileEntity, tileEntity.guiLocation));
|
||||
guiElements.add(new GuiPowerBar(this, tileEntity, tileEntity.guiLocation, 164, 15));
|
||||
guiElements.add(new GuiEnergyInfo(new IInfoHandler() {
|
||||
@Override
|
||||
|
||||
@@ -4,10 +4,11 @@ import java.util.List;
|
||||
|
||||
import mekanism.api.gas.GasStack;
|
||||
import mekanism.api.util.ListUtils;
|
||||
import mekanism.client.gui.element.GuiConfigurationTab;
|
||||
import mekanism.client.gui.element.GuiSideConfigurationTab;
|
||||
import mekanism.client.gui.element.GuiEnergyInfo;
|
||||
import mekanism.client.gui.element.GuiRecipeType;
|
||||
import mekanism.client.gui.element.GuiSortingTab;
|
||||
import mekanism.client.gui.element.GuiTransporterConfigTab;
|
||||
import mekanism.client.gui.element.GuiUpgradeTab;
|
||||
import mekanism.client.gui.element.GuiEnergyInfo.IInfoHandler;
|
||||
import mekanism.client.render.MekanismRenderer;
|
||||
@@ -36,7 +37,8 @@ public class GuiFactory extends GuiMekanism
|
||||
guiElements.add(new GuiRedstoneControl(this, tileEntity, tileEntity.tier.guiLocation));
|
||||
guiElements.add(new GuiUpgradeTab(this, tileEntity, tileEntity.tier.guiLocation));
|
||||
guiElements.add(new GuiRecipeType(this, tileEntity, tileEntity.tier.guiLocation));
|
||||
guiElements.add(new GuiConfigurationTab(this, tileEntity, tileEntity.tier.guiLocation));
|
||||
guiElements.add(new GuiSideConfigurationTab(this, tileEntity, tileEntity.tier.guiLocation));
|
||||
guiElements.add(new GuiTransporterConfigTab(this, 34, tileEntity, tileEntity.tier.guiLocation));
|
||||
guiElements.add(new GuiSortingTab(this, tileEntity, tileEntity.tier.guiLocation));
|
||||
guiElements.add(new GuiEnergyInfo(new IInfoHandler() {
|
||||
@Override
|
||||
|
||||
@@ -5,17 +5,18 @@ import java.util.List;
|
||||
|
||||
import mekanism.api.Coord4D;
|
||||
import mekanism.api.util.ListUtils;
|
||||
import mekanism.client.gui.element.GuiConfigurationTab;
|
||||
import mekanism.client.gui.element.GuiEnergyInfo;
|
||||
import mekanism.client.gui.element.GuiEnergyInfo.IInfoHandler;
|
||||
import mekanism.client.gui.element.GuiPowerBar;
|
||||
import mekanism.client.gui.element.GuiProgress;
|
||||
import mekanism.client.gui.element.GuiSlot;
|
||||
import mekanism.client.gui.element.GuiUpgradeTab;
|
||||
import mekanism.client.gui.element.GuiEnergyInfo.IInfoHandler;
|
||||
import mekanism.client.gui.element.GuiProgress.IProgressInfoHandler;
|
||||
import mekanism.client.gui.element.GuiProgress.ProgressBar;
|
||||
import mekanism.client.gui.element.GuiSideConfigurationTab;
|
||||
import mekanism.client.gui.element.GuiSlot;
|
||||
import mekanism.client.gui.element.GuiSlot.SlotOverlay;
|
||||
import mekanism.client.gui.element.GuiSlot.SlotType;
|
||||
import mekanism.client.gui.element.GuiTransporterConfigTab;
|
||||
import mekanism.client.gui.element.GuiUpgradeTab;
|
||||
import mekanism.client.sound.SoundHandler;
|
||||
import mekanism.common.Mekanism;
|
||||
import mekanism.common.inventory.container.ContainerMetallurgicInfuser;
|
||||
@@ -24,11 +25,12 @@ import mekanism.common.tile.TileEntityMetallurgicInfuser;
|
||||
import mekanism.common.util.MekanismUtils;
|
||||
import mekanism.common.util.MekanismUtils.ResourceType;
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public class GuiMetallurgicInfuser extends GuiMekanism
|
||||
{
|
||||
@@ -41,7 +43,8 @@ public class GuiMetallurgicInfuser extends GuiMekanism
|
||||
|
||||
guiElements.add(new GuiRedstoneControl(this, tileEntity, MekanismUtils.getResource(ResourceType.GUI, "GuiMetallurgicInfuser.png")));
|
||||
guiElements.add(new GuiUpgradeTab(this, tileEntity, MekanismUtils.getResource(ResourceType.GUI, "GuiMetallurgicInfuser.png")));
|
||||
guiElements.add(new GuiConfigurationTab(this, tileEntity, MekanismUtils.getResource(ResourceType.GUI, "GuiMetallurgicInfuser.png")));
|
||||
guiElements.add(new GuiSideConfigurationTab(this, tileEntity, MekanismUtils.getResource(ResourceType.GUI, "GuiMetallurgicInfuser.png")));
|
||||
guiElements.add(new GuiTransporterConfigTab(this, 34, tileEntity, MekanismUtils.getResource(ResourceType.GUI, "GuiMetallurgicInfuser.png")));
|
||||
guiElements.add(new GuiPowerBar(this, tileEntity, MekanismUtils.getResource(ResourceType.GUI, "GuiMetallurgicInfuser.png"), 164, 15));
|
||||
guiElements.add(new GuiEnergyInfo(new IInfoHandler() {
|
||||
@Override
|
||||
|
||||
@@ -4,22 +4,23 @@ import java.util.List;
|
||||
|
||||
import mekanism.api.gas.GasTank;
|
||||
import mekanism.api.util.ListUtils;
|
||||
import mekanism.client.gui.element.GuiConfigurationTab;
|
||||
import mekanism.client.gui.element.GuiEnergyInfo;
|
||||
import mekanism.client.gui.element.GuiEnergyInfo.IInfoHandler;
|
||||
import mekanism.client.gui.element.GuiFluidGauge;
|
||||
import mekanism.client.gui.element.GuiFluidGauge.IFluidInfoHandler;
|
||||
import mekanism.client.gui.element.GuiGasGauge;
|
||||
import mekanism.client.gui.element.GuiGasGauge.IGasInfoHandler;
|
||||
import mekanism.client.gui.element.GuiGauge;
|
||||
import mekanism.client.gui.element.GuiPowerBar;
|
||||
import mekanism.client.gui.element.GuiProgress;
|
||||
import mekanism.client.gui.element.GuiSlot;
|
||||
import mekanism.client.gui.element.GuiUpgradeTab;
|
||||
import mekanism.client.gui.element.GuiEnergyInfo.IInfoHandler;
|
||||
import mekanism.client.gui.element.GuiFluidGauge.IFluidInfoHandler;
|
||||
import mekanism.client.gui.element.GuiGasGauge.IGasInfoHandler;
|
||||
import mekanism.client.gui.element.GuiProgress.IProgressInfoHandler;
|
||||
import mekanism.client.gui.element.GuiProgress.ProgressBar;
|
||||
import mekanism.client.gui.element.GuiSideConfigurationTab;
|
||||
import mekanism.client.gui.element.GuiSlot;
|
||||
import mekanism.client.gui.element.GuiSlot.SlotOverlay;
|
||||
import mekanism.client.gui.element.GuiSlot.SlotType;
|
||||
import mekanism.client.gui.element.GuiTransporterConfigTab;
|
||||
import mekanism.client.gui.element.GuiUpgradeTab;
|
||||
import mekanism.common.inventory.container.ContainerPRC;
|
||||
import mekanism.common.tile.TileEntityPRC;
|
||||
import mekanism.common.util.MekanismUtils;
|
||||
@@ -43,7 +44,8 @@ public class GuiPRC extends GuiMekanism
|
||||
tileEntity = tentity;
|
||||
|
||||
guiElements.add(new GuiRedstoneControl(this, tileEntity, MekanismUtils.getResource(ResourceType.GUI, "GuiBlank.png")));
|
||||
guiElements.add(new GuiConfigurationTab(this, tileEntity, MekanismUtils.getResource(ResourceType.GUI, "GuiBlank.png")));
|
||||
guiElements.add(new GuiSideConfigurationTab(this, tileEntity, MekanismUtils.getResource(ResourceType.GUI, "GuiBlank.png")));
|
||||
guiElements.add(new GuiTransporterConfigTab(this, 34, tileEntity, MekanismUtils.getResource(ResourceType.GUI, "GuiBlank.png")));
|
||||
guiElements.add(new GuiUpgradeTab(this, tileEntity, MekanismUtils.getResource(ResourceType.GUI, "GuiBlank.png")));
|
||||
guiElements.add(new GuiEnergyInfo(new IInfoHandler() {
|
||||
@Override
|
||||
|
||||
+12
-46
@@ -30,13 +30,13 @@ import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public class GuiConfiguration extends GuiMekanism
|
||||
public class GuiSideConfiguration extends GuiMekanism
|
||||
{
|
||||
public Map<Integer, GuiPos> slotPosMap = new HashMap<Integer, GuiPos>();
|
||||
|
||||
public ISideConfiguration configurable;
|
||||
|
||||
public GuiConfiguration(EntityPlayer player, ISideConfiguration tile)
|
||||
public GuiSideConfiguration(EntityPlayer player, ISideConfiguration tile)
|
||||
{
|
||||
super(new ContainerNull(player, (TileEntityContainerBlock)tile));
|
||||
|
||||
@@ -67,6 +67,14 @@ public class GuiConfiguration extends GuiMekanism
|
||||
|
||||
int xAxis = (mouseX - (width - xSize) / 2);
|
||||
int yAxis = (mouseY - (height - ySize) / 2);
|
||||
|
||||
if(xAxis >= 6 && xAxis <= 20 && yAxis >= 6 && yAxis <= 20)
|
||||
{
|
||||
drawTexturedModalRect(guiWidth + 6, guiHeight + 6, 176 + 28, 0, 14, 14);
|
||||
}
|
||||
else {
|
||||
drawTexturedModalRect(guiWidth + 6, guiHeight + 6, 176 + 28, 14, 14, 14);
|
||||
}
|
||||
|
||||
if(xAxis >= 156 && xAxis <= 170 && yAxis >= 6 && yAxis <= 20)
|
||||
{
|
||||
@@ -76,14 +84,6 @@ public class GuiConfiguration extends GuiMekanism
|
||||
drawTexturedModalRect(guiWidth + 156, guiHeight + 6, 176 + 14, 14, 14, 14);
|
||||
}
|
||||
|
||||
if(xAxis >= 6 && xAxis <= 20 && yAxis >= 6 && yAxis <= 20)
|
||||
{
|
||||
drawTexturedModalRect(guiWidth + 6, guiHeight + 6, 176 + 28, 0, 14, 14);
|
||||
}
|
||||
else {
|
||||
drawTexturedModalRect(guiWidth + 6, guiHeight + 6, 176 + 28, 14, 14, 14);
|
||||
}
|
||||
|
||||
for(int i = 0; i < slotPosMap.size(); i++)
|
||||
{
|
||||
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
@@ -117,26 +117,9 @@ public class GuiConfiguration extends GuiMekanism
|
||||
int yAxis = (mouseY - (height - ySize) / 2);
|
||||
|
||||
String title = MekanismUtils.localize("gui.configuration.side");
|
||||
fontRendererObj.drawString(title, fontRendererObj.getStringWidth(title)/2, 5, 0x404040);
|
||||
fontRendererObj.drawString(title, (xSize/2)-(fontRendererObj.getStringWidth(title)/2), 5, 0x404040);
|
||||
fontRendererObj.drawString(MekanismUtils.localize("gui.eject") + ": " + (configurable.getConfig().isEjecting(TransmissionType.ITEM) ? "On" : "Off"), 53, 17, 0x00CD00);
|
||||
|
||||
fontRendererObj.drawString(MekanismUtils.localize("gui.input") + " (" + (configurable.getEjector().hasStrictInput() ? "On" : "Off") + ")", 18, 81, 0x787878);
|
||||
fontRendererObj.drawString(MekanismUtils.localize("gui.output"), 72, 68, 0x787878);
|
||||
fontRendererObj.drawString(MekanismUtils.localize("gui.slots"), 122, 81, 0x787878);
|
||||
|
||||
if(configurable.getEjector().getOutputColor() != null)
|
||||
{
|
||||
GL11.glPushMatrix();
|
||||
GL11.glColor4f(1, 1, 1, 1);
|
||||
GL11.glEnable(GL11.GL_LIGHTING);
|
||||
GL11.glEnable(GL12.GL_RESCALE_NORMAL);
|
||||
|
||||
mc.getTextureManager().bindTexture(MekanismRenderer.getBlocksTexture());
|
||||
itemRender.renderIcon(80, 49, MekanismRenderer.getColorIcon(configurable.getEjector().getOutputColor()), 16, 16);
|
||||
|
||||
GL11.glDisable(GL11.GL_LIGHTING);
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
fontRendererObj.drawString(MekanismUtils.localize("gui.slots"), 77, 81, 0x787878);
|
||||
|
||||
for(int i = 0; i < slotPosMap.size(); i++)
|
||||
{
|
||||
@@ -151,17 +134,6 @@ public class GuiConfiguration extends GuiMekanism
|
||||
}
|
||||
}
|
||||
|
||||
if(xAxis >= 80 && xAxis <= 96 && yAxis >= 49 && yAxis <= 65)
|
||||
{
|
||||
if(configurable.getEjector().getOutputColor() != null)
|
||||
{
|
||||
drawCreativeTabHoveringText(configurable.getEjector().getOutputColor().getName(), xAxis, yAxis);
|
||||
}
|
||||
else {
|
||||
drawCreativeTabHoveringText(MekanismUtils.localize("gui.none"), xAxis, yAxis);
|
||||
}
|
||||
}
|
||||
|
||||
if(xAxis >= 156 && xAxis <= 170 && yAxis >= 6 && yAxis <= 20)
|
||||
{
|
||||
drawCreativeTabHoveringText(MekanismUtils.localize("gui.autoEject"), xAxis, yAxis);
|
||||
@@ -214,12 +186,6 @@ public class GuiConfiguration extends GuiMekanism
|
||||
button = 2;
|
||||
}
|
||||
|
||||
if(xAxis >= 80 && xAxis <= 96 && yAxis >= 49 && yAxis <= 65)
|
||||
{
|
||||
SoundHandler.playSound("gui.button.press");
|
||||
Mekanism.packetHandler.sendToServer(new ConfigurationUpdateMessage(ConfigurationPacket.EJECT_COLOR, Coord4D.get(tile), button, 0, null));
|
||||
}
|
||||
|
||||
for(int i = 0; i < slotPosMap.size(); i++)
|
||||
{
|
||||
int x = slotPosMap.get(i).xPos;
|
||||
@@ -6,7 +6,8 @@ import java.util.Map;
|
||||
import mekanism.api.Coord4D;
|
||||
import mekanism.api.EnumColor;
|
||||
import mekanism.api.transmitters.TransmissionType;
|
||||
import mekanism.client.gui.GuiConfiguration.GuiPos;
|
||||
import mekanism.client.gui.GuiSideConfiguration.GuiPos;
|
||||
import mekanism.client.render.MekanismRenderer;
|
||||
import mekanism.client.sound.SoundHandler;
|
||||
import mekanism.common.Mekanism;
|
||||
import mekanism.common.SideData;
|
||||
@@ -25,6 +26,7 @@ import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
import org.lwjgl.input.Keyboard;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
import org.lwjgl.opengl.GL12;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
@@ -76,12 +78,12 @@ public class GuiTransporterConfig extends GuiMekanism
|
||||
drawTexturedModalRect(guiWidth + 6, guiHeight + 6, 176 + 14, 14, 14, 14);
|
||||
}
|
||||
|
||||
if(xAxis >= 6 && xAxis <= 20 && yAxis >= 6 && yAxis <= 20)
|
||||
if(xAxis >= 156 && xAxis <= 170 && yAxis >= 6 && yAxis <= 20)
|
||||
{
|
||||
drawTexturedModalRect(guiWidth + 6, guiHeight + 6, 176 + 28, 0, 14, 14);
|
||||
drawTexturedModalRect(guiWidth + 156, guiHeight + 6, 176 + 28, 0, 14, 14);
|
||||
}
|
||||
else {
|
||||
drawTexturedModalRect(guiWidth + 6, guiHeight + 6, 176 + 28, 14, 14, 14);
|
||||
drawTexturedModalRect(guiWidth + 156, guiHeight + 6, 176 + 28, 14, 14, 14);
|
||||
}
|
||||
|
||||
for(int i = 0; i < slotPosMap.size(); i++)
|
||||
@@ -116,8 +118,27 @@ public class GuiTransporterConfig extends GuiMekanism
|
||||
int xAxis = (mouseX - (width - xSize) / 2);
|
||||
int yAxis = (mouseY - (height - ySize) / 2);
|
||||
|
||||
String title = MekanismUtils.localize("gui.configuration.transporter");
|
||||
fontRendererObj.drawString(title, fontRendererObj.getStringWidth(title)/2, 14, 0x404040);
|
||||
String text = MekanismUtils.localize("gui.configuration.transporter");
|
||||
fontRendererObj.drawString(text, (xSize/2)-(fontRendererObj.getStringWidth(text)/2), 5, 0x404040);
|
||||
text = MekanismUtils.localize("gui.strictInput") + " (" + (configurable.getEjector().hasStrictInput() ? "On" : "Off") + ")";
|
||||
renderScaledText(text, 53, 17, 0x00CD00, 70);
|
||||
|
||||
fontRendererObj.drawString(MekanismUtils.localize("gui.input"), 48, 81, 0x787878);
|
||||
fontRendererObj.drawString(MekanismUtils.localize("gui.output"), 114, 68, 0x787878);
|
||||
|
||||
if(configurable.getEjector().getOutputColor() != null)
|
||||
{
|
||||
GL11.glPushMatrix();
|
||||
GL11.glColor4f(1, 1, 1, 1);
|
||||
GL11.glEnable(GL11.GL_LIGHTING);
|
||||
GL11.glEnable(GL12.GL_RESCALE_NORMAL);
|
||||
|
||||
mc.getTextureManager().bindTexture(MekanismRenderer.getBlocksTexture());
|
||||
itemRender.renderIcon(122, 49, MekanismRenderer.getColorIcon(configurable.getEjector().getOutputColor()), 16, 16);
|
||||
|
||||
GL11.glDisable(GL11.GL_LIGHTING);
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
|
||||
for(int i = 0; i < slotPosMap.size(); i++)
|
||||
{
|
||||
@@ -132,6 +153,17 @@ public class GuiTransporterConfig extends GuiMekanism
|
||||
}
|
||||
}
|
||||
|
||||
if(xAxis >= 122 && xAxis <= 138 && yAxis >= 49 && yAxis <= 65)
|
||||
{
|
||||
if(configurable.getEjector().getOutputColor() != null)
|
||||
{
|
||||
drawCreativeTabHoveringText(configurable.getEjector().getOutputColor().getName(), xAxis, yAxis);
|
||||
}
|
||||
else {
|
||||
drawCreativeTabHoveringText(MekanismUtils.localize("gui.none"), xAxis, yAxis);
|
||||
}
|
||||
}
|
||||
|
||||
if(xAxis >= 156 && xAxis <= 170 && yAxis >= 6 && yAxis <= 20)
|
||||
{
|
||||
drawCreativeTabHoveringText(MekanismUtils.localize("gui.configuration.strictInput"), xAxis, yAxis);
|
||||
@@ -171,6 +203,12 @@ public class GuiTransporterConfig extends GuiMekanism
|
||||
button = 2;
|
||||
}
|
||||
|
||||
if(xAxis >= 122 && xAxis <= 138 && yAxis >= 49 && yAxis <= 65)
|
||||
{
|
||||
SoundHandler.playSound("gui.button.press");
|
||||
Mekanism.packetHandler.sendToServer(new ConfigurationUpdateMessage(ConfigurationPacket.EJECT_COLOR, Coord4D.get(tile), button, 0, null));
|
||||
}
|
||||
|
||||
for(int i = 0; i < slotPosMap.size(); i++)
|
||||
{
|
||||
int x = slotPosMap.get(i).xPos;
|
||||
|
||||
+3
-3
@@ -14,11 +14,11 @@ import cpw.mods.fml.relauncher.SideOnly;
|
||||
import codechicken.lib.vec.Rectangle4i;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public class GuiConfigurationTab extends GuiElement
|
||||
public class GuiSideConfigurationTab extends GuiElement
|
||||
{
|
||||
public TileEntity tileEntity;
|
||||
|
||||
public GuiConfigurationTab(IGuiWrapper gui, TileEntity tile, ResourceLocation def)
|
||||
public GuiSideConfigurationTab(IGuiWrapper gui, TileEntity tile, ResourceLocation def)
|
||||
{
|
||||
super(MekanismUtils.getResource(ResourceType.GUI_ELEMENT, "GuiConfigurationTab.png"), gui, def);
|
||||
|
||||
@@ -56,7 +56,7 @@ public class GuiConfigurationTab extends GuiElement
|
||||
|
||||
if(xAxis >= -21 && xAxis <= -3 && yAxis >= 10 && yAxis <= 28)
|
||||
{
|
||||
displayTooltip(MekanismUtils.localize("gui.configuration"), xAxis, yAxis);
|
||||
displayTooltip(MekanismUtils.localize("gui.configuration.side"), xAxis, yAxis);
|
||||
}
|
||||
|
||||
mc.renderEngine.bindTexture(defaultLocation);
|
||||
@@ -8,17 +8,18 @@ import mekanism.client.sound.SoundHandler;
|
||||
import mekanism.common.Mekanism;
|
||||
import mekanism.common.network.PacketTileEntity.TileEntityMessage;
|
||||
import mekanism.common.tile.TileEntityFactory;
|
||||
import mekanism.common.util.LangUtils;
|
||||
import mekanism.common.util.MekanismUtils;
|
||||
import mekanism.common.util.MekanismUtils.ResourceType;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import codechicken.lib.vec.Rectangle4i;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import codechicken.lib.vec.Rectangle4i;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public class GuiSortingTab extends GuiElement
|
||||
{
|
||||
TileEntityFactory tileEntity;
|
||||
public TileEntityFactory tileEntity;
|
||||
|
||||
public GuiSortingTab(IGuiWrapper gui, TileEntityFactory tile, ResourceLocation def)
|
||||
{
|
||||
@@ -30,7 +31,7 @@ public class GuiSortingTab extends GuiElement
|
||||
@Override
|
||||
public Rectangle4i getBounds(int guiWidth, int guiHeight)
|
||||
{
|
||||
return new Rectangle4i(guiWidth - 26, guiHeight + 34, 26, 35);
|
||||
return new Rectangle4i(guiWidth - 26, guiHeight + 62, 26, 35);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -38,14 +39,14 @@ public class GuiSortingTab extends GuiElement
|
||||
{
|
||||
mc.renderEngine.bindTexture(RESOURCE);
|
||||
|
||||
guiObj.drawTexturedRect(guiWidth - 26, guiHeight + 34, 0, 0, 26, 35);
|
||||
guiObj.drawTexturedRect(guiWidth - 26, guiHeight + 62, 0, 0, 26, 35);
|
||||
|
||||
if(xAxis >= -21 && xAxis <= -3 && yAxis >= 38 && yAxis <= 56)
|
||||
if(xAxis >= -21 && xAxis <= -3 && yAxis >= 66 && yAxis <= 84)
|
||||
{
|
||||
guiObj.drawTexturedRect(guiWidth - 21, guiHeight + 38, 26, 0, 18, 18);
|
||||
guiObj.drawTexturedRect(guiWidth - 21, guiHeight + 66, 26, 0, 18, 18);
|
||||
}
|
||||
else {
|
||||
guiObj.drawTexturedRect(guiWidth - 21, guiHeight + 38, 26, 18, 18, 18);
|
||||
guiObj.drawTexturedRect(guiWidth - 21, guiHeight + 66, 26, 18, 18, 18);
|
||||
}
|
||||
|
||||
mc.renderEngine.bindTexture(defaultLocation);
|
||||
@@ -56,9 +57,9 @@ public class GuiSortingTab extends GuiElement
|
||||
{
|
||||
mc.renderEngine.bindTexture(RESOURCE);
|
||||
|
||||
getFontRenderer().drawString(((TileEntityFactory)tileEntity).sorting ? "On" : "Off", -21, 58, 0x0404040);
|
||||
getFontRenderer().drawString(LangUtils.transOnOff(((TileEntityFactory)tileEntity).sorting), -21, 86, 0x0404040);
|
||||
|
||||
if(xAxis >= -21 && xAxis <= -3 && yAxis >= 38 && yAxis <= 56)
|
||||
if(xAxis >= -21 && xAxis <= -3 && yAxis >= 66 && yAxis <= 84)
|
||||
{
|
||||
displayTooltip(MekanismUtils.localize("gui.factory.autoSort"), xAxis, yAxis);
|
||||
}
|
||||
@@ -74,7 +75,7 @@ public class GuiSortingTab extends GuiElement
|
||||
{
|
||||
if(button == 0)
|
||||
{
|
||||
if(xAxis >= -21 && xAxis <= -3 && yAxis >= 38 && yAxis <= 56)
|
||||
if(xAxis >= -21 && xAxis <= -3 && yAxis >= 66 && yAxis <= 84)
|
||||
{
|
||||
ArrayList data = new ArrayList();
|
||||
data.add(0);
|
||||
|
||||
@@ -17,19 +17,20 @@ import cpw.mods.fml.relauncher.SideOnly;
|
||||
public class GuiTransporterConfigTab extends GuiElement
|
||||
{
|
||||
public TileEntity tileEntity;
|
||||
public int yAxis;
|
||||
public int yPos;
|
||||
|
||||
public GuiTransporterConfigTab(IGuiWrapper gui, int y, TileEntity tile, ResourceLocation def)
|
||||
{
|
||||
super(MekanismUtils.getResource(ResourceType.GUI_ELEMENT, "GuiTransporterConfigTab.png"), gui, def);
|
||||
|
||||
yPos = y;
|
||||
tileEntity = tile;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Rectangle4i getBounds(int guiWidth, int guiHeight)
|
||||
{
|
||||
return new Rectangle4i(guiWidth - 26, guiHeight + yAxis, 26, 26);
|
||||
return new Rectangle4i(guiWidth - 26, guiHeight + yPos, 26, 26);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -37,14 +38,14 @@ public class GuiTransporterConfigTab extends GuiElement
|
||||
{
|
||||
mc.renderEngine.bindTexture(RESOURCE);
|
||||
|
||||
guiObj.drawTexturedRect(guiWidth - 26, guiHeight + yAxis, 0, 0, 26, 26);
|
||||
guiObj.drawTexturedRect(guiWidth - 26, guiHeight + yPos, 0, 0, 26, 26);
|
||||
|
||||
if(xAxis >= -21 && xAxis <= -3 && yAxis >= yAxis+4 && yAxis <= yAxis+22)
|
||||
if(xAxis >= -21 && xAxis <= -3 && yAxis >= yPos+4 && yAxis <= yPos+22)
|
||||
{
|
||||
guiObj.drawTexturedRect(guiWidth - 21, guiHeight + yAxis+4, 26, 0, 18, 18);
|
||||
guiObj.drawTexturedRect(guiWidth - 21, guiHeight + yPos+4, 26, 0, 18, 18);
|
||||
}
|
||||
else {
|
||||
guiObj.drawTexturedRect(guiWidth - 21, guiHeight + yAxis+4, 26, 18, 18, 18);
|
||||
guiObj.drawTexturedRect(guiWidth - 21, guiHeight + yPos+4, 26, 18, 18, 18);
|
||||
}
|
||||
|
||||
mc.renderEngine.bindTexture(defaultLocation);
|
||||
@@ -55,9 +56,9 @@ public class GuiTransporterConfigTab extends GuiElement
|
||||
{
|
||||
mc.renderEngine.bindTexture(RESOURCE);
|
||||
|
||||
if(xAxis >= -21 && xAxis <= -3 && yAxis >= yAxis+4 && yAxis <= yAxis+22)
|
||||
if(xAxis >= -21 && xAxis <= -3 && yAxis >= yPos+4 && yAxis <= yPos+22)
|
||||
{
|
||||
displayTooltip(MekanismUtils.localize("gui.configuration"), xAxis, yAxis);
|
||||
displayTooltip(MekanismUtils.localize("gui.configuration.transporter"), xAxis, yAxis);
|
||||
}
|
||||
|
||||
mc.renderEngine.bindTexture(defaultLocation);
|
||||
@@ -71,7 +72,7 @@ public class GuiTransporterConfigTab extends GuiElement
|
||||
{
|
||||
if(button == 0)
|
||||
{
|
||||
if(xAxis >= -21 && xAxis <= -3 && yAxis >= yAxis+4 && yAxis <= yAxis+22)
|
||||
if(xAxis >= -21 && xAxis <= -3 && yAxis >= yPos+4 && yAxis <= yPos+22)
|
||||
{
|
||||
Mekanism.packetHandler.sendToServer(new SimpleGuiMessage(Coord4D.get(tileEntity), 51));
|
||||
SoundHandler.playSound("gui.button.press");
|
||||
|
||||
Reference in new issue
Block a user