Changed access to use this qualifier
This commit is contained in:
@@ -35,21 +35,21 @@ public class GuiNumberBox extends GuiTextField
|
||||
@Override
|
||||
public void writeText(String p_146191_1_)
|
||||
{
|
||||
String original = getText();
|
||||
String original = this.getText();
|
||||
super.writeText( p_146191_1_ );
|
||||
|
||||
try
|
||||
{
|
||||
if ( type == int.class || type == Integer.class )
|
||||
Integer.parseInt( getText() );
|
||||
else if ( type == long.class || type == Long.class )
|
||||
Long.parseLong( getText() );
|
||||
else if ( type == double.class || type == Double.class )
|
||||
Double.parseDouble( getText() );
|
||||
if ( this.type == int.class || this.type == Integer.class )
|
||||
Integer.parseInt( this.getText() );
|
||||
else if ( this.type == long.class || this.type == Long.class )
|
||||
Long.parseLong( this.getText() );
|
||||
else if ( this.type == double.class || this.type == Double.class )
|
||||
Double.parseDouble( this.getText() );
|
||||
}
|
||||
catch(NumberFormatException e )
|
||||
{
|
||||
setText( original );
|
||||
this.setText( original );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -55,12 +55,12 @@ public class GuiProgressBar extends GuiButton implements ITooltip
|
||||
this.xPosition = posX;
|
||||
this.yPosition = posY;
|
||||
this.texture = new ResourceLocation( "appliedenergistics2", "textures/" + texture );
|
||||
width = _width;
|
||||
height = _height;
|
||||
fill_u = u;
|
||||
fill_v = y;
|
||||
layout = dir;
|
||||
titleName = title;
|
||||
this.width = _width;
|
||||
this.height = _height;
|
||||
this.fill_u = u;
|
||||
this.fill_v = y;
|
||||
this.layout = dir;
|
||||
this.titleName = title;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -68,19 +68,19 @@ public class GuiProgressBar extends GuiButton implements ITooltip
|
||||
{
|
||||
if ( this.visible )
|
||||
{
|
||||
par1Minecraft.getTextureManager().bindTexture( texture );
|
||||
int max = source.getMaxProgress();
|
||||
int current = source.getCurrentProgress();
|
||||
par1Minecraft.getTextureManager().bindTexture( this.texture );
|
||||
int max = this.source.getMaxProgress();
|
||||
int current = this.source.getCurrentProgress();
|
||||
|
||||
if ( layout == Direction.VERTICAL )
|
||||
if ( this.layout == Direction.VERTICAL )
|
||||
{
|
||||
int diff = height - (max > 0 ? (height * current) / max : 0);
|
||||
this.drawTexturedModalRect( this.xPosition, this.yPosition + diff, fill_u, fill_v + diff, width, height - diff );
|
||||
int diff = this.height - (max > 0 ? (this.height * current) / max : 0);
|
||||
this.drawTexturedModalRect( this.xPosition, this.yPosition + diff, this.fill_u, this.fill_v + diff, this.width, this.height - diff );
|
||||
}
|
||||
else
|
||||
{
|
||||
int diff = width - (max > 0 ? (width * current) / max : 0);
|
||||
this.drawTexturedModalRect( this.xPosition, this.yPosition, fill_u + diff, fill_v, width - diff, height );
|
||||
int diff = this.width - (max > 0 ? (this.width * current) / max : 0);
|
||||
this.drawTexturedModalRect( this.xPosition, this.yPosition, this.fill_u + diff, this.fill_v, this.width - diff, this.height );
|
||||
}
|
||||
|
||||
this.mouseDragged( par1Minecraft, par2, par3 );
|
||||
@@ -95,34 +95,34 @@ public class GuiProgressBar extends GuiButton implements ITooltip
|
||||
@Override
|
||||
public String getMessage()
|
||||
{
|
||||
if ( fullMsg != null )
|
||||
return fullMsg;
|
||||
if ( this.fullMsg != null )
|
||||
return this.fullMsg;
|
||||
|
||||
return (titleName != null ? titleName : "") + '\n' + source.getCurrentProgress() + ' ' + GuiText.Of.getLocal() + ' ' + source.getMaxProgress();
|
||||
return (this.titleName != null ? this.titleName : "") + '\n' + this.source.getCurrentProgress() + ' ' + GuiText.Of.getLocal() + ' ' + this.source.getMaxProgress();
|
||||
}
|
||||
|
||||
@Override
|
||||
public int xPos()
|
||||
{
|
||||
return xPosition - 2;
|
||||
return this.xPosition - 2;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int yPos()
|
||||
{
|
||||
return yPosition - 2;
|
||||
return this.yPosition - 2;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getWidth()
|
||||
{
|
||||
return width + 4;
|
||||
return this.width + 4;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getHeight()
|
||||
{
|
||||
return height + 4;
|
||||
return this.height + 4;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -37,7 +37,7 @@ public class GuiScrollbar implements IScrollSource
|
||||
|
||||
private void applyRange()
|
||||
{
|
||||
currentScroll = Math.max( Math.min( currentScroll, maxScroll ), minScroll );
|
||||
this.currentScroll = Math.max( Math.min( this.currentScroll, this.maxScroll ), this.minScroll );
|
||||
}
|
||||
|
||||
public void draw(AEBaseGui g)
|
||||
@@ -45,97 +45,97 @@ public class GuiScrollbar implements IScrollSource
|
||||
g.bindTexture( "minecraft", "gui/container/creative_inventory/tabs.png" );
|
||||
GL11.glColor4f( 1.0f, 1.0f, 1.0f, 1.0f );
|
||||
|
||||
if ( getRange() == 0 )
|
||||
if ( this.getRange() == 0 )
|
||||
{
|
||||
g.drawTexturedModalRect( displayX, displayY, 232 + width, 0, width, 15 );
|
||||
g.drawTexturedModalRect( this.displayX, this.displayY, 232 + this.width, 0, this.width, 15 );
|
||||
}
|
||||
else
|
||||
{
|
||||
int offset = (currentScroll - minScroll) * (height - 15) / getRange();
|
||||
g.drawTexturedModalRect( displayX, offset + displayY, 232, 0, width, 15 );
|
||||
int offset = (this.currentScroll - this.minScroll) * (this.height - 15) / this.getRange();
|
||||
g.drawTexturedModalRect( this.displayX, offset + this.displayY, 232, 0, this.width, 15 );
|
||||
}
|
||||
}
|
||||
|
||||
public int getRange()
|
||||
{
|
||||
return maxScroll - minScroll;
|
||||
return this.maxScroll - this.minScroll;
|
||||
}
|
||||
|
||||
public int getLeft()
|
||||
{
|
||||
return displayX;
|
||||
return this.displayX;
|
||||
}
|
||||
|
||||
public int getTop()
|
||||
{
|
||||
return displayY;
|
||||
return this.displayY;
|
||||
}
|
||||
|
||||
public int getWidth()
|
||||
{
|
||||
return width;
|
||||
return this.width;
|
||||
}
|
||||
|
||||
public int getHeight()
|
||||
{
|
||||
return height;
|
||||
return this.height;
|
||||
}
|
||||
|
||||
public GuiScrollbar setLeft(int v)
|
||||
{
|
||||
displayX = v;
|
||||
this.displayX = v;
|
||||
return this;
|
||||
}
|
||||
|
||||
public GuiScrollbar setTop(int v)
|
||||
{
|
||||
displayY = v;
|
||||
this.displayY = v;
|
||||
return this;
|
||||
}
|
||||
|
||||
public GuiScrollbar setWidth(int v)
|
||||
{
|
||||
width = v;
|
||||
this.width = v;
|
||||
return this;
|
||||
}
|
||||
|
||||
public GuiScrollbar setHeight(int v)
|
||||
{
|
||||
height = v;
|
||||
this.height = v;
|
||||
return this;
|
||||
}
|
||||
|
||||
public void setRange(int min, int max, int pageSize)
|
||||
{
|
||||
minScroll = min;
|
||||
maxScroll = max;
|
||||
this.minScroll = min;
|
||||
this.maxScroll = max;
|
||||
this.pageSize = pageSize;
|
||||
|
||||
if ( minScroll > maxScroll )
|
||||
maxScroll = minScroll;
|
||||
if ( this.minScroll > this.maxScroll )
|
||||
this.maxScroll = this.minScroll;
|
||||
|
||||
applyRange();
|
||||
this.applyRange();
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getCurrentScroll()
|
||||
{
|
||||
return currentScroll;
|
||||
return this.currentScroll;
|
||||
}
|
||||
|
||||
public void click(AEBaseGui aeBaseGui, int x, int y)
|
||||
{
|
||||
if ( getRange() == 0 )
|
||||
if ( this.getRange() == 0 )
|
||||
return;
|
||||
|
||||
if ( x > displayX && x <= displayX + width )
|
||||
if ( x > this.displayX && x <= this.displayX + this.width )
|
||||
{
|
||||
if ( y > displayY && y <= displayY + height )
|
||||
if ( y > this.displayY && y <= this.displayY + this.height )
|
||||
{
|
||||
currentScroll = (y - displayY);
|
||||
currentScroll = minScroll + ((currentScroll * 2 * getRange() / height));
|
||||
currentScroll = (currentScroll + 1) >> 1;
|
||||
applyRange();
|
||||
this.currentScroll = (y - this.displayY);
|
||||
this.currentScroll = this.minScroll + ((this.currentScroll * 2 * this.getRange() / this.height));
|
||||
this.currentScroll = (this.currentScroll + 1) >> 1;
|
||||
this.applyRange();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -143,8 +143,8 @@ public class GuiScrollbar implements IScrollSource
|
||||
public void wheel(int delta)
|
||||
{
|
||||
delta = Math.max( Math.min( -delta, 1 ), -1 );
|
||||
currentScroll += delta * pageSize;
|
||||
applyRange();
|
||||
this.currentScroll += delta * this.pageSize;
|
||||
this.applyRange();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -64,7 +64,7 @@ public class MEGuiTextField extends GuiTextField
|
||||
{
|
||||
super.mouseClicked( xPos, yPos, button );
|
||||
|
||||
final boolean requiresFocus = isMouseIn( xPos, yPos );
|
||||
final boolean requiresFocus = this.isMouseIn( xPos, yPos );
|
||||
|
||||
this.setFocused( requiresFocus );
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user