Etiam-ONI-Modpack icon indicating copy to clipboard operation
Etiam-ONI-Modpack copied to clipboard

[door icons] draw icons centered, regardless of door size

Open dan-oak opened this issue 2 years ago • 2 comments

the icon offset is hardcoded https://github.com/EtiamNullam/Etiam-ONI-Modpack/blob/master/src/DoorIcons/IconManager.cs#L46 and so it doesn't draw nicely for tiny (half) doors form other mods. could you please make the mod create icons at positions dynamically determined?

image

dan-oak avatar Aug 04 '22 11:08 dan-oak

I will certainly fix it when I find some spare time. Thank you for reporting it!

Did you find a way to reliably check building dimensions?

EtiamNullam avatar Aug 07 '22 10:08 EtiamNullam

yeah, i have found it

var bdef = door.building.Def;
var wid  = bdef.WidthInCells;
var hei  = bdef.HeightInCells;

just divide by 2 and the rest is the same

dan-oak avatar Aug 07 '22 15:08 dan-oak