Skip to content

Conversation

@strategineer
Copy link
Contributor

@strategineer strategineer commented Dec 7, 2025

@strategineer strategineer marked this pull request as draft December 7, 2025 20:45
@strategineer
Copy link
Contributor Author

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.

@sprunk
Copy link
Member

sprunk commented Dec 8, 2025

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.

@strategineer
Copy link
Contributor Author

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 strategineer marked this pull request as ready for review December 9, 2025 21:55
@strategineer
Copy link
Contributor Author

strategineer commented Dec 9, 2025

Ok, I think this is ready for review.

EDIT: maybe not quite...

@strategineer strategineer marked this pull request as draft December 9, 2025 22:11
@strategineer strategineer marked this pull request as ready for review December 10, 2025 01:22
@strategineer strategineer force-pushed the fix-selected-units-panel-unit-image-being-too-wide-when-energy-make-is-too-high branch from 6545ead to abc0e09 Compare December 10, 2025 01:23

damageModifier = 0.333,
energyMake = 2,
energyMake = 200000000000,
Copy link
Contributor

@GoogleFrog GoogleFrog Dec 19, 2025

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.

Copy link
Contributor Author

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
@strategineer strategineer force-pushed the fix-selected-units-panel-unit-image-being-too-wide-when-energy-make-is-too-high branch from abc0e09 to 38fc994 Compare December 20, 2025 16:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Icons stretch with large energy production/use numbers

3 participants