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:
MEEPofFaith
2025-02-08 18:21:09 -08:00
committed by GitHub
parent 07e573ac42
commit e9ecb2a576
10 changed files with 53 additions and 2 deletions

View File

@@ -1201,6 +1201,13 @@ abstract class BuildingComp implements Posc, Teamc, Healthc, Buildingc, Timerc,
block.drawOverlay(x, y, rotation);
}
public void drawItemSelection(UnlockableContent selection){
if(selection != null && Core.settings.getBool("displayselection", true)){
TextureRegion region = selection.fullIcon;
Draw.rect(region, x, y + block.size * tilesize / 2f + 4, 8f * region.ratio(), 8f);
}
}
public void drawDisabled(){
Draw.color(Color.scarlet);
Draw.alpha(0.8f);