Added feature request #817
Crafting CPU GUI now shows a yellow background on items being crafted, and a yellow background on scheduled items.
This commit is contained in:
parent
ef3cb0a455
commit
3fa501d726
1 changed files with 19 additions and 1 deletions
|
@ -39,6 +39,7 @@ import appeng.api.config.SortOrder;
|
||||||
import appeng.api.config.ViewItems;
|
import appeng.api.config.ViewItems;
|
||||||
import appeng.api.storage.data.IAEItemStack;
|
import appeng.api.storage.data.IAEItemStack;
|
||||||
import appeng.api.storage.data.IItemList;
|
import appeng.api.storage.data.IItemList;
|
||||||
|
import appeng.api.util.AEColor;
|
||||||
import appeng.client.gui.AEBaseGui;
|
import appeng.client.gui.AEBaseGui;
|
||||||
import appeng.client.gui.widgets.GuiScrollbar;
|
import appeng.client.gui.widgets.GuiScrollbar;
|
||||||
import appeng.client.gui.widgets.ISortSource;
|
import appeng.client.gui.widgets.ISortSource;
|
||||||
|
@ -307,13 +308,30 @@ public class GuiCraftingCPU extends AEBaseGui implements ISortSource
|
||||||
IAEItemStack pendingStack = this.pending.findPrecise( refStack );
|
IAEItemStack pendingStack = this.pending.findPrecise( refStack );
|
||||||
|
|
||||||
int lines = 0;
|
int lines = 0;
|
||||||
|
boolean active = false, scheduled = false;
|
||||||
|
|
||||||
if ( stored != null && stored.getStackSize() > 0 )
|
if ( stored != null && stored.getStackSize() > 0 )
|
||||||
|
{
|
||||||
lines++;
|
lines++;
|
||||||
|
}
|
||||||
if ( activeStack != null && activeStack.getStackSize() > 0 )
|
if ( activeStack != null && activeStack.getStackSize() > 0 )
|
||||||
|
{
|
||||||
lines++;
|
lines++;
|
||||||
|
active = true;
|
||||||
|
}
|
||||||
if ( pendingStack != null && pendingStack.getStackSize() > 0 )
|
if ( pendingStack != null && pendingStack.getStackSize() > 0 )
|
||||||
|
{
|
||||||
lines++;
|
lines++;
|
||||||
|
scheduled = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( active || scheduled )
|
||||||
|
{
|
||||||
|
int bgcol = ( active ? AEColor.Green.blackVariant : AEColor.Yellow.blackVariant ) | 0x5A000000;
|
||||||
|
int startX = (x * (1 + sectionLength) + xo) * 2;
|
||||||
|
int startY = ((y * offY + yo) - 3) * 2;
|
||||||
|
drawRect( startX, startY, startX + (sectionLength * 2), startY + (offY * 2) - 2, bgcol);
|
||||||
|
}
|
||||||
|
|
||||||
int negY = ((lines - 1) * 5) / 2;
|
int negY = ((lines - 1) * 5) / 2;
|
||||||
int downY = 0;
|
int downY = 0;
|
||||||
|
|
Loading…
Reference in a new issue