Zero-K icon indicating copy to clipboard operation
Zero-K copied to clipboard

Fix unit images in selected units panel and tooltip stretching beyond what's expected when the unit has abnormally large extra energy production/use numbers

Open strategineer opened this issue 11 months ago • 4 comments

Fixes https://github.com/ZeroK-RTS/Zero-K/issues/4483

demo video: https://github.com/user-attachments/assets/a5b36b24-629a-4868-abc7-90172df9c626

strategineer avatar Dec 07 '25 20:12 strategineer

I'm not sure this is the right fix for this. It's better than before but I'd rather the unit image not change size at all.

strategineer avatar Dec 07 '25 20:12 strategineer

I feel given these two alternatives it's better to stretch the picture rather than have the +income text become unreadable due to overlap, since the picture represents something static while the number represents something partially unpredictable that you may actually want to read.

sprunk avatar Dec 08 '25 17:12 sprunk

It needs a refactoring but I took another stab at this that I'm much happier with compared to what I had previously. I added a demo video to the PR description.

strategineer avatar Dec 09 '25 21:12 strategineer

Ok, I think this is ready for review.

EDIT: maybe not quite...

strategineer avatar Dec 09 '25 22:12 strategineer

image

I prefer this, even though it means very large costs will end up under the health bar.

GoogleFrog avatar Jul 11 '26 03:07 GoogleFrog