Scale spell window to spell list and terminal size #78883
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
SUMMARY: Interface "Scale spell window to spell list and terminal size"
Purpose of change
Reduce amount of scrolling when screen space allows
Improve usability on small terminal size
Fixes #78802
(I accidentally screwed up #78871 by merging a different branch into it, instead of the other way around, so I'm remaking the PR)
Describe the solution
Give the spells window more space to show spell descriptions by default.
As more spells populate the list, the window's vertical size increases, up to 90%.
For smaller terminal sizes, the spells window will shrink as needed to fit.
Describe alternatives you've considered
Use the entire vertical space of the screen if needed
Not increasing height to accomodate description
Testing
Game compiles and loads
Create character and debug in spells
Test varying spell list amounts at multiple terminal sizes
Scroll through spell tabs
Additional context
Before, fresh install build 76c2d10
Maximum terminal
After
Max terminal
With many spells
With one spell
Before
Minimum terminal
After
Min terminal
With one spell