All GUI compile errors fixed, switched to excludes over includes in gradle build and lots, LOTS of more fixes.
This commit is contained in:
@@ -30,7 +30,6 @@ import appeng.core.AELog;
|
||||
import appeng.core.localization.GuiText;
|
||||
import appeng.core.sync.network.NetworkHandler;
|
||||
import appeng.core.sync.packets.PacketValueConfig;
|
||||
import appeng.items.contents.QuartzKnifeObj;
|
||||
import net.minecraft.util.text.ITextComponent;
|
||||
import net.minecraftforge.fml.client.gui.GuiUtils;
|
||||
|
||||
@@ -50,7 +49,7 @@ public class GuiQuartzKnife extends AEBaseGui<ContainerQuartzKnife>
|
||||
{
|
||||
super.init();
|
||||
|
||||
this.name = new TextFieldWidget( 0, this.font, this.guiLeft + 24, this.guiTop + 32, 79, this.font.FONT_HEIGHT );
|
||||
this.name = new TextFieldWidget( this.font, this.guiLeft + 24, this.guiTop + 32, 79, this.font.FONT_HEIGHT, "" );
|
||||
this.name.setEnableBackgroundDrawing( false );
|
||||
this.name.setMaxStringLength( 32 );
|
||||
this.name.setTextColor( 0xFFFFFF );
|
||||
@@ -66,32 +65,37 @@ public class GuiQuartzKnife extends AEBaseGui<ContainerQuartzKnife>
|
||||
}
|
||||
|
||||
@Override
|
||||
public void drawBG( final int offsetX, final int offsetY, final int mouseX, final int mouseY )
|
||||
public void drawBG(final int offsetX, final int offsetY, final int mouseX, final int mouseY, float partialTicks)
|
||||
{
|
||||
this.bindTexture( "guis/quartzknife.png" );
|
||||
GuiUtils.drawTexturedModalRect( offsetX, offsetY, 0, 0, this.xSize, this.ySize, 0 /* FIXME this.zlevel was used */ );
|
||||
this.name.drawTextBox();
|
||||
this.name.render(mouseX, mouseY, partialTicks);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void keyTyped( final char character, final int key ) throws IOException
|
||||
public boolean charTyped(char character, int key) {
|
||||
if( this.name.charTyped( character, key ) )
|
||||
{
|
||||
final String Out = this.name.getText();
|
||||
container.setName( Out );
|
||||
NetworkHandler.instance().sendToServer( new PacketValueConfig( "QuartzKnife.Name", Out ) );
|
||||
return true;
|
||||
}
|
||||
|
||||
return super.charTyped(character, key);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean keyPressed(int keyCode, int scanCode, int p_keyPressed_3_)
|
||||
{
|
||||
if( this.name.textboxKeyTyped( character, key ) )
|
||||
if( this.name.keyPressed( keyCode, scanCode, p_keyPressed_3_ ) )
|
||||
{
|
||||
try
|
||||
{
|
||||
final String Out = this.name.getText();
|
||||
container.setName( Out );
|
||||
NetworkHandler.instance().sendToServer( new PacketValueConfig( "QuartzKnife.Name", Out ) );
|
||||
}
|
||||
catch( final IOException e )
|
||||
{
|
||||
AELog.debug( e );
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
super.keyTyped( character, key );
|
||||
final String Out = this.name.getText();
|
||||
container.setName( Out );
|
||||
NetworkHandler.instance().sendToServer( new PacketValueConfig( "QuartzKnife.Name", Out ) );
|
||||
return true;
|
||||
}
|
||||
|
||||
return super.keyPressed(keyCode, scanCode, p_keyPressed_3_);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user