-
Notifications
You must be signed in to change notification settings - Fork 233
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 #5627
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
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 #5627
Conversation
|
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. |
|
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. |
|
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. |
|
Ok, I think this is ready for review. EDIT: maybe not quite... |
6545ead to
abc0e09
Compare
units/energysolar.lua
Outdated
|
|
||
| damageModifier = 0.333, | ||
| energyMake = 2, | ||
| energyMake = 200000000000, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You've left this in. This PR will probably want a squash and merge based on the relatively small size and large number of commits, so don't worry about rebasing to remove this change.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Woops. Fixed (and commits squashed)!
… what's expected when the unit has abnormally large extra energy production/use numbers Implement dynamic width for the left panel of the selected unit info tooltip and panel based on its content Refactor and minor tweaks to dynamic width calculation Fix typo Resize left/right panel width/positions only when the desired left panel's width has changed Fix broken multi unit info panel Fix bad shared state between the selection window and the tool window by splitting the `nMaxCaptionCharacters` variable into two, one for each Fix
abc0e09 to
38fc994
Compare
Fixes #4483
demo video:
https://github.com/user-attachments/assets/a5b36b24-629a-4868-abc7-90172df9c626