Work on GUIs (specifically to get SkyChest GUI)
This commit is contained in:
@@ -33,9 +33,9 @@ public class GuiFluidFormationPlane extends GuiUpgradeable
|
||||
}
|
||||
|
||||
@Override
|
||||
public void initGui()
|
||||
public void init()
|
||||
{
|
||||
super.initGui();
|
||||
super.init();
|
||||
|
||||
final int xo = 8;
|
||||
final int yo = 23 + 6;
|
||||
@@ -63,7 +63,7 @@ public class GuiFluidFormationPlane extends GuiUpgradeable
|
||||
@Override
|
||||
protected void addButtons()
|
||||
{
|
||||
this.buttonList.add( this.priority = new GuiTabButton( this.guiLeft + 154, this.guiTop, 2 + 4 * 16, GuiText.Priority.getLocal(), this.itemRender ) );
|
||||
this.addButton( this.priority = new GuiTabButton( this.guiLeft + 154, this.guiTop, 2 + 4 * 16, GuiText.Priority.getLocal(), this.itemRender ) );
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -47,9 +47,9 @@ public class GuiFluidIO extends GuiUpgradeable
|
||||
}
|
||||
|
||||
@Override
|
||||
public void initGui()
|
||||
public void init()
|
||||
{
|
||||
super.initGui();
|
||||
super.init();
|
||||
|
||||
final ContainerFluidIO container = (ContainerFluidIO) this.inventorySlots;
|
||||
final IAEFluidTank inv = this.bus.getConfig();
|
||||
|
||||
@@ -53,9 +53,9 @@ public class GuiFluidInterface extends GuiUpgradeable
|
||||
}
|
||||
|
||||
@Override
|
||||
public void initGui()
|
||||
public void init()
|
||||
{
|
||||
super.initGui();
|
||||
super.init();
|
||||
|
||||
final IAEFluidTank configFluids = this.host.getDualityFluidInterface().getConfig();
|
||||
final IAEFluidTank fluidTank = this.host.getDualityFluidInterface().getTanks();
|
||||
@@ -64,12 +64,12 @@ public class GuiFluidInterface extends GuiUpgradeable
|
||||
{
|
||||
final GuiFluidTank guiTank = new GuiFluidTank( fluidTank, i, DualityFluidInterface.NUMBER_OF_TANKS + i, this.getGuiLeft() + 35 + 18 * i, this
|
||||
.getGuiTop() + 53, 16, 68 );
|
||||
this.buttonList.add( guiTank );
|
||||
this.addButton( guiTank );
|
||||
this.guiSlots.add( new GuiFluidSlot( configFluids, i, i, 35 + 18 * i, 35 ) );
|
||||
}
|
||||
|
||||
this.priority = new GuiTabButton( this.getGuiLeft() + 154, this.getGuiTop(), 2 + 4 * 16, GuiText.Priority.getLocal(), this.itemRender );
|
||||
this.buttonList.add( this.priority );
|
||||
this.addButton( this.priority );
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -80,10 +80,10 @@ public class GuiFluidInterface extends GuiUpgradeable
|
||||
@Override
|
||||
public void drawFG( int offsetX, int offsetY, int mouseX, int mouseY )
|
||||
{
|
||||
this.fontRenderer.drawString( this.getGuiDisplayName( GuiText.FluidInterface.getLocal() ), 8, 6, 4210752 );
|
||||
this.fontRenderer.drawString( GuiText.Config.getLocal(), 35, 6 + 11 + 7, 4210752 );
|
||||
this.fontRenderer.drawString( GuiText.StoredFluids.getLocal(), 35, 6 + 112 + 7, 4210752 );
|
||||
this.fontRenderer.drawString( GuiText.inventory.getLocal(), 8, this.ySize - 96 + 3, 4210752 );
|
||||
this.font.drawString( this.getGuiDisplayName( GuiText.FluidInterface.getLocal() ), 8, 6, 4210752 );
|
||||
this.font.drawString( GuiText.Config.getLocal(), 35, 6 + 11 + 7, 4210752 );
|
||||
this.font.drawString( GuiText.StoredFluids.getLocal(), 35, 6 + 112 + 7, 4210752 );
|
||||
this.font.drawString( GuiText.inventory.getLocal(), 8, this.ySize - 96 + 3, 4210752 );
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -43,11 +43,11 @@ public class GuiFluidLevelEmitter extends GuiUpgradeable
|
||||
}
|
||||
|
||||
@Override
|
||||
public void initGui()
|
||||
public void init()
|
||||
{
|
||||
super.initGui();
|
||||
super.init();
|
||||
|
||||
this.level = new GuiNumberBox( this.fontRenderer, this.guiLeft + 24, this.guiTop + 43, 79, this.fontRenderer.FONT_HEIGHT, Long.class );
|
||||
this.level = new GuiNumberBox( this.font, this.guiLeft + 24, this.guiTop + 43, 79, this.font.FONT_HEIGHT, Long.class );
|
||||
this.level.setEnableBackgroundDrawing( false );
|
||||
this.level.setMaxStringLength( 16 );
|
||||
this.level.setTextColor( 0xFFFFFF );
|
||||
@@ -70,17 +70,17 @@ public class GuiFluidLevelEmitter extends GuiUpgradeable
|
||||
final int c = AEConfig.instance().levelByMillyBuckets( 2 );
|
||||
final int d = AEConfig.instance().levelByMillyBuckets( 3 );
|
||||
|
||||
this.buttonList.add( this.plus1 = new GuiButton( 0, this.guiLeft + 20, this.guiTop + 17, 22, 20, "+" + a ) );
|
||||
this.buttonList.add( this.plus10 = new GuiButton( 0, this.guiLeft + 48, this.guiTop + 17, 28, 20, "+" + b ) );
|
||||
this.buttonList.add( this.plus100 = new GuiButton( 0, this.guiLeft + 82, this.guiTop + 17, 32, 20, "+" + c ) );
|
||||
this.buttonList.add( this.plus1000 = new GuiButton( 0, this.guiLeft + 120, this.guiTop + 17, 38, 20, "+" + d ) );
|
||||
this.addButton( this.plus1 = new GuiButton( 0, this.guiLeft + 20, this.guiTop + 17, 22, 20, "+" + a ) );
|
||||
this.addButton( this.plus10 = new GuiButton( 0, this.guiLeft + 48, this.guiTop + 17, 28, 20, "+" + b ) );
|
||||
this.addButton( this.plus100 = new GuiButton( 0, this.guiLeft + 82, this.guiTop + 17, 32, 20, "+" + c ) );
|
||||
this.addButton( this.plus1000 = new GuiButton( 0, this.guiLeft + 120, this.guiTop + 17, 38, 20, "+" + d ) );
|
||||
|
||||
this.buttonList.add( this.minus1 = new GuiButton( 0, this.guiLeft + 20, this.guiTop + 59, 22, 20, "-" + a ) );
|
||||
this.buttonList.add( this.minus10 = new GuiButton( 0, this.guiLeft + 48, this.guiTop + 59, 28, 20, "-" + b ) );
|
||||
this.buttonList.add( this.minus100 = new GuiButton( 0, this.guiLeft + 82, this.guiTop + 59, 32, 20, "-" + c ) );
|
||||
this.buttonList.add( this.minus1000 = new GuiButton( 0, this.guiLeft + 120, this.guiTop + 59, 38, 20, "-" + d ) );
|
||||
this.addButton( this.minus1 = new GuiButton( 0, this.guiLeft + 20, this.guiTop + 59, 22, 20, "-" + a ) );
|
||||
this.addButton( this.minus10 = new GuiButton( 0, this.guiLeft + 48, this.guiTop + 59, 28, 20, "-" + b ) );
|
||||
this.addButton( this.minus100 = new GuiButton( 0, this.guiLeft + 82, this.guiTop + 59, 32, 20, "-" + c ) );
|
||||
this.addButton( this.minus1000 = new GuiButton( 0, this.guiLeft + 120, this.guiTop + 59, 38, 20, "-" + d ) );
|
||||
|
||||
this.buttonList.add( this.redstoneMode );
|
||||
this.addButton( this.redstoneMode );
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -70,9 +70,9 @@ public class GuiFluidStorageBus extends GuiUpgradeable
|
||||
}
|
||||
|
||||
@Override
|
||||
public void initGui()
|
||||
public void init()
|
||||
{
|
||||
super.initGui();
|
||||
super.init();
|
||||
|
||||
final int xo = 8;
|
||||
final int yo = 23 + 6;
|
||||
@@ -106,20 +106,20 @@ public class GuiFluidStorageBus extends GuiUpgradeable
|
||||
this.storageFilter = new GuiImgButton( this.guiLeft - 18, this.guiTop + 68, Settings.STORAGE_FILTER, StorageFilter.EXTRACTABLE_ONLY );
|
||||
this.fuzzyMode = new GuiImgButton( this.guiLeft - 18, this.guiTop + 88, Settings.FUZZY_MODE, FuzzyMode.IGNORE_ALL );
|
||||
|
||||
this.buttonList.add( this.priority = new GuiTabButton( this.guiLeft + 154, this.guiTop, 2 + 4 * 16, GuiText.Priority.getLocal(), this.itemRender ) );
|
||||
this.addButton( this.priority = new GuiTabButton( this.guiLeft + 154, this.guiTop, 2 + 4 * 16, GuiText.Priority.getLocal(), this.itemRender ) );
|
||||
|
||||
this.buttonList.add( this.storageFilter );
|
||||
this.buttonList.add( this.fuzzyMode );
|
||||
this.buttonList.add( this.rwMode );
|
||||
this.buttonList.add( this.partition );
|
||||
this.buttonList.add( this.clear );
|
||||
this.addButton( this.storageFilter );
|
||||
this.addButton( this.fuzzyMode );
|
||||
this.addButton( this.rwMode );
|
||||
this.addButton( this.partition );
|
||||
this.addButton( this.clear );
|
||||
}
|
||||
|
||||
@Override
|
||||
public void drawFG( final int offsetX, final int offsetY, final int mouseX, final int mouseY )
|
||||
{
|
||||
this.fontRenderer.drawString( this.getGuiDisplayName( this.getName().getLocal() ), 8, 6, 4210752 );
|
||||
this.fontRenderer.drawString( GuiText.inventory.getLocal(), 8, this.ySize - 96 + 3, 4210752 );
|
||||
this.font.drawString( this.getGuiDisplayName( this.getName().getLocal() ), 8, 6, 4210752 );
|
||||
this.font.drawString( GuiText.inventory.getLocal(), 8, this.ySize - 96 + 3, 4210752 );
|
||||
|
||||
if( this.fuzzyMode != null )
|
||||
{
|
||||
|
||||
@@ -100,13 +100,13 @@ public class GuiFluidTerminal extends AEBaseMEGui implements ISortSource, IConfi
|
||||
}
|
||||
|
||||
@Override
|
||||
public void initGui()
|
||||
public void init()
|
||||
{
|
||||
this.mc.player.openContainer = this.inventorySlots;
|
||||
this.minecraft.player.openContainer = this.inventorySlots;
|
||||
this.guiLeft = ( this.width - this.xSize ) / 2;
|
||||
this.guiTop = ( this.height - this.ySize ) / 2;
|
||||
|
||||
this.searchField = new MEGuiTextField( this.fontRenderer, this.guiLeft + Math.max( 80, this.offsetX ), this.guiTop + 4, 90, 12 );
|
||||
this.searchField = new MEGuiTextField( this.font, this.guiLeft + Math.max( 80, this.offsetX ), this.guiTop + 4, 90, 12 );
|
||||
this.searchField.setEnableBackgroundDrawing( false );
|
||||
this.searchField.setMaxStringLength( 25 );
|
||||
this.searchField.setTextColor( 0xFFFFFF );
|
||||
@@ -115,10 +115,10 @@ public class GuiFluidTerminal extends AEBaseMEGui implements ISortSource, IConfi
|
||||
|
||||
int offset = this.guiTop;
|
||||
|
||||
this.buttonList.add( this.sortByBox = new GuiImgButton( this.guiLeft - 18, offset, Settings.SORT_BY, this.configSrc.getSetting( Settings.SORT_BY ) ) );
|
||||
this.addButton( this.sortByBox = new GuiImgButton( this.guiLeft - 18, offset, Settings.SORT_BY, this.configSrc.getSetting( Settings.SORT_BY ) ) );
|
||||
offset += 20;
|
||||
|
||||
this.buttonList.add( this.sortDirBox = new GuiImgButton( this.guiLeft - 18, offset, Settings.SORT_DIRECTION, this.configSrc
|
||||
this.addButton( this.sortDirBox = new GuiImgButton( this.guiLeft - 18, offset, Settings.SORT_DIRECTION, this.configSrc
|
||||
.getSetting( Settings.SORT_DIRECTION ) ) );
|
||||
|
||||
for( int y = 0; y < this.rows; y++ )
|
||||
@@ -136,8 +136,8 @@ public class GuiFluidTerminal extends AEBaseMEGui implements ISortSource, IConfi
|
||||
@Override
|
||||
public void drawFG( int offsetX, int offsetY, int mouseX, int mouseY )
|
||||
{
|
||||
this.fontRenderer.drawString( this.getGuiDisplayName( "Fluid Terminal" ), 8, 6, 4210752 );
|
||||
this.fontRenderer.drawString( GuiText.inventory.getLocal(), 8, this.ySize - 96 + 3, 4210752 );
|
||||
this.font.drawString( this.getGuiDisplayName( "Fluid Terminal" ), 8, 6, 4210752 );
|
||||
this.font.drawString( GuiText.inventory.getLocal(), 8, this.ySize - 96 + 3, 4210752 );
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -41,8 +41,8 @@ public class GuiFluidSlot extends GuiCustomSlot
|
||||
final IAEFluidStack fs = this.getFluidStack();
|
||||
if( fs != null )
|
||||
{
|
||||
GlStateManager.disableLighting();
|
||||
GlStateManager.disableBlend();
|
||||
RenderSystem.disableLighting();
|
||||
RenderSystem.disableBlend();
|
||||
final Fluid fluid = fs.getFluid();
|
||||
mc.getTextureManager().bindTexture( TextureMap.LOCATION_BLOCKS_TEXTURE );
|
||||
final TextureAtlasSprite sprite = mc.getTextureMapBlocks().getAtlasSprite( fluid.getStill().toString() );
|
||||
@@ -52,7 +52,7 @@ public class GuiFluidSlot extends GuiCustomSlot
|
||||
final float red = ( fluid.getColor() >> 16 & 255 ) / 255.0F;
|
||||
final float green = ( fluid.getColor() >> 8 & 255 ) / 255.0F;
|
||||
final float blue = ( fluid.getColor() & 255 ) / 255.0F;
|
||||
GlStateManager.color( red, green, blue );
|
||||
RenderSystem.color4f( red, green, blue );
|
||||
|
||||
this.drawTexturedModalRect( this.xPos(), this.yPos(), sprite, this.getWidth(), this.getHeight() );
|
||||
}
|
||||
|
||||
@@ -51,10 +51,10 @@ public class GuiFluidTank extends GuiButton implements ITooltip
|
||||
{
|
||||
if( this.visible )
|
||||
{
|
||||
GlStateManager.disableBlend();
|
||||
GlStateManager.disableLighting();
|
||||
RenderSystem.disableBlend();
|
||||
RenderSystem.disableLighting();
|
||||
|
||||
drawRect( this.x, this.y, this.x + this.width, this.y + this.height, AEColor.GRAY.blackVariant | 0xFF000000 );
|
||||
fill( this.x, this.y, this.x + this.width, this.y + this.height, AEColor.GRAY.blackVariant | 0xFF000000 );
|
||||
|
||||
final IAEFluidStack fluid = this.tank.getFluidInSlot( this.slot );
|
||||
if( fluid != null && fluid.getStackSize() > 0 )
|
||||
@@ -64,7 +64,7 @@ public class GuiFluidTank extends GuiButton implements ITooltip
|
||||
float red = ( fluid.getFluid().getColor() >> 16 & 255 ) / 255.0F;
|
||||
float green = ( fluid.getFluid().getColor() >> 8 & 255 ) / 255.0F;
|
||||
float blue = ( fluid.getFluid().getColor() & 255 ) / 255.0F;
|
||||
GlStateManager.color( red, green, blue );
|
||||
RenderSystem.color4f( red, green, blue );
|
||||
|
||||
TextureAtlasSprite sprite = mc.getTextureMapBlocks().getAtlasSprite( fluid.getFluid().getStill().toString() );
|
||||
final int scaledHeight = (int) ( this.height * ( (float) fluid.getStackSize() / this.tank.getTankProperties()[this.slot].getCapacity() ) );
|
||||
|
||||
@@ -48,14 +48,14 @@ public class GuiOptionalFluidSlot extends GuiFluidSlot
|
||||
@Override
|
||||
public void drawBackground( int guileft, int guitop )
|
||||
{
|
||||
GlStateManager.enableBlend();
|
||||
RenderSystem.enableBlend();
|
||||
if( this.isSlotEnabled() )
|
||||
{
|
||||
GlStateManager.color( 1.0F, 1.0F, 1.0F, 1.0F );
|
||||
RenderSystem.color4f( 1.0F, 1.0F, 1.0F, 1.0F );
|
||||
}
|
||||
else
|
||||
{
|
||||
GlStateManager.color( 1.0F, 1.0F, 1.0F, 0.4F );
|
||||
RenderSystem.color4f( 1.0F, 1.0F, 1.0F, 0.4F );
|
||||
}
|
||||
this.drawTexturedModalRect( guileft + this.xPos() - 1, guitop + this.yPos() - 1, this.srcX - 1, this.srcY - 1, this.getWidth() + 2,
|
||||
this.getHeight() + 2 );
|
||||
|
||||
Reference in New Issue
Block a user