Hovering over blocks with a selection displays the selection (#10323)
* Selection display Should this go in building or block? * Apparently serpulo liquid icons are not square??? * simplify * simplify further * Add disabling w/ setting Probably needs a better name * Better name * h
This commit is contained in:
@@ -128,6 +128,12 @@ public class DirectionalUnloader extends Block{
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void drawSelect(){
|
||||
super.drawSelect();
|
||||
drawItemSelection(unloadItem);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void buildConfiguration(Table table){
|
||||
ItemSelection.buildTable(DirectionalUnloader.this, table, content.items(), () -> unloadItem, this::configure);
|
||||
|
||||
@@ -89,6 +89,12 @@ public class DuctRouter extends Block{
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void drawSelect(){
|
||||
super.drawSelect();
|
||||
drawItemSelection(sortItem);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateTile(){
|
||||
progress += edelta() / speed * 2f;
|
||||
|
||||
@@ -83,6 +83,12 @@ public class Sorter extends Block{
|
||||
super.draw();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void drawSelect(){
|
||||
super.drawSelect();
|
||||
drawItemSelection(sortItem);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean acceptItem(Building source, Item item){
|
||||
Building to = getTileTarget(item, source, false);
|
||||
|
||||
@@ -78,6 +78,12 @@ public class ItemSource extends Block{
|
||||
super.draw();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void drawSelect(){
|
||||
super.drawSelect();
|
||||
drawItemSelection(outputItem);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateTile(){
|
||||
if(outputItem == null) return;
|
||||
@@ -121,4 +127,4 @@ public class ItemSource extends Block{
|
||||
outputItem = content.item(read.s());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -83,6 +83,12 @@ public class LiquidSource extends Block{
|
||||
Draw.rect(block.region, x, y);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void drawSelect(){
|
||||
super.drawSelect();
|
||||
drawItemSelection(source);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void buildConfiguration(Table table){
|
||||
ItemSelection.buildTable(LiquidSource.this, table, content.liquids(), () -> source, this::configure, selectionRows, selectionColumns);
|
||||
@@ -111,4 +117,4 @@ public class LiquidSource extends Block{
|
||||
source = id == -1 ? null : content.liquid(id);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -233,6 +233,12 @@ public class Unloader extends Block{
|
||||
Draw.color();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void drawSelect(){
|
||||
super.drawSelect();
|
||||
drawItemSelection(sortItem);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void buildConfiguration(Table table){
|
||||
ItemSelection.buildTable(Unloader.this, table, content.items(), () -> sortItem, this::configure, selectionRows, selectionColumns);
|
||||
|
||||
@@ -50,6 +50,12 @@ public class UnitCargoUnloadPoint extends Block{
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void drawSelect(){
|
||||
super.drawSelect();
|
||||
drawItemSelection(item);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateTile(){
|
||||
super.updateTile();
|
||||
|
||||
Reference in New Issue
Block a user