fix scroll bar being rendered wrongly (#130)
* fix scroll bar being rendered wrongly * tooltip overlap * fix the first cpu select grid render
This commit is contained in:
@@ -179,12 +179,6 @@ public class GuiCraftingStatus extends GuiCraftingCPU
|
|||||||
@Override
|
@Override
|
||||||
public void drawFG( int offsetX, int offsetY, int mouseX, int mouseY )
|
public void drawFG( int offsetX, int offsetY, int mouseX, int mouseY )
|
||||||
{
|
{
|
||||||
super.drawFG( offsetX, offsetY, mouseX, mouseY );
|
|
||||||
if (this.cpuScrollbar != null)
|
|
||||||
{
|
|
||||||
this.cpuScrollbar.draw( this );
|
|
||||||
}
|
|
||||||
|
|
||||||
List<CraftingCPUStatus> cpus = this.status.getCPUs();
|
List<CraftingCPUStatus> cpus = this.status.getCPUs();
|
||||||
final int firstCpu = this.cpuScrollbar.getCurrentScroll();
|
final int firstCpu = this.cpuScrollbar.getCurrentScroll();
|
||||||
CraftingCPUStatus hoveredCpu = hitCpu( mouseX, mouseY );
|
CraftingCPUStatus hoveredCpu = hitCpu( mouseX, mouseY );
|
||||||
@@ -278,9 +272,9 @@ public class GuiCraftingStatus extends GuiCraftingCPU
|
|||||||
}
|
}
|
||||||
GL11.glColor4f( 1.0F, 1.0F, 1.0F, 1.0F );
|
GL11.glColor4f( 1.0F, 1.0F, 1.0F, 1.0F );
|
||||||
}
|
}
|
||||||
|
StringBuilder tooltip = new StringBuilder();
|
||||||
if( hoveredCpu != null )
|
if( hoveredCpu != null )
|
||||||
{
|
{
|
||||||
StringBuilder tooltip = new StringBuilder();
|
|
||||||
String name = hoveredCpu.getName();
|
String name = hoveredCpu.getName();
|
||||||
if( name != null && !name.isEmpty() )
|
if( name != null && !name.isEmpty() )
|
||||||
{
|
{
|
||||||
@@ -322,10 +316,15 @@ public class GuiCraftingStatus extends GuiCraftingCPU
|
|||||||
tooltip.append( hoveredCpu.getCoprocessors() );
|
tooltip.append( hoveredCpu.getCoprocessors() );
|
||||||
tooltip.append( '\n' );
|
tooltip.append( '\n' );
|
||||||
}
|
}
|
||||||
if (tooltip.length() > 0)
|
}
|
||||||
{
|
if (this.cpuScrollbar != null)
|
||||||
this.drawTooltip( mouseX - offsetX, mouseY - offsetY, tooltip.toString() );
|
{
|
||||||
}
|
this.cpuScrollbar.draw( this );
|
||||||
|
}
|
||||||
|
super.drawFG( offsetX, offsetY, mouseX, mouseY );
|
||||||
|
if (tooltip.length() > 0)
|
||||||
|
{
|
||||||
|
this.drawTooltip( mouseX - offsetX, mouseY - offsetY, tooltip.toString() );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user