Adjust view offsets + show sidebar in alternate main screen states #29478
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 "Adjust view offsets and re-enable sidebars for look, aim, etc"
Purpose of change
With the new UI, the sidebar was no longer implicit to all view states, such as looking around, peeking, managing zones, aiming weapons, and the like.
In addition to losing the minimap, this also caused the render offset of the screen to jump to one side (as the implied center of the viewing area changes with the sidebar absent)
Fixes #29275
Fixes #29038
Fixes #29183
Describe the solution
Re-enabled the sidebar rendering when looking around (including peeking and managing zones), when aiming/firing a ranged/reach weapon. For same states, adjusted game window offset to use the same center of view as the main play state.
The size of the 'Look Around' window is linked to the size of the sidebar layout; if you use a narrower sidebar (compact/labels) the
Look Around
window will match.The size of the 'Aim' window behaves independently, and will instead slightly overlap the playspace a bit. It's not clear there's a good solution to this.
Also adjusted an off-by-one (on both axes) for centering on monsters using the
V
command to view all monsters (when the center setting is enabled). This makes it so if you usex
to look around after selecting a monster with centering enabled, the cursor is already on that monster.Describe alternatives you've considered
Continuing to experience minor disorientation and vertigo by having the view constantly hop back and forth?
This could also be made a config setting, but I'm not convinced that's worthwhile.
Additional context
For best results a user will probably want minimap+compass at the bottom of their sidebar, but that's on them.
Standing still:
Aiming weapon:
Peeking one tile south:
Viewing all monsters with
V
while peeking:Looking around, but with compact sidebar:
Aiming weapon, but with compact sidebar: