alexsylex / CompassNavigationOverhaul

MIT License
11 stars 7 forks source link

Don't hide enemy labels if the vanilla target bar is hidden by other mods #28

Open WaterFace opened 6 months ago

WaterFace commented 6 months ago

This mod hides enemy name labels on the compass if the enemy health bar is visible, since otherwise they would overlap. It checks whether or not the bar is visible by testing whether or not HUDMenu.EnemyHealth_mc.BracketsInstance._alpha is greater than zero, which corresponds to how the vanilla game hides that bar.

However TrueHUD hides the enemy bar by setting EnemyHealth_mc._alpha to zero, which means it isn't always recognized as hidden by CNO. I haven't confirmed but I believe iHUD does the same thing. This results in enemy name labels disappearing most of the time in combat, even when they wouldn't be overlapping anything.

I think the solution would be to consider the bar hidden when either EnemyHealth_mc.BracketsInstance._alpha or EnemyHealth_mc._alpha is zero. I would submit a PR but I don't really have the tools to work with flash.

alexsylex commented 6 months ago

Gotcha, will take a look at it!