Skip to content
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

Adjust view offsets + show sidebar in alternate main screen states #29478

Merged
merged 2 commits into from
Apr 13, 2019

Conversation

esotericist
Copy link
Contributor

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 use x 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:
image

Aiming weapon:
image

Peeking one tile south:
image

Viewing all monsters with V while peeking:
image

Looking around, but with compact sidebar:
image

Aiming weapon, but with compact sidebar:
image

Look around, peek, zones, aiming, and listing all monsters.
@KorGgenT KorGgenT added <Bugfix> This is a fix for a bug (or closes open issue) Info / User Interface Game - player communication, menus, etc. labels Apr 12, 2019
@ifreund ifreund added the [C++] Changes (can be) made in C++. Previously named `Code` label Apr 12, 2019
@kevingranade
Copy link
Member

I don't know if this causes it, but the zone manager bugs out now, the start and end points of the zone aren't set to the same thing, so if you just hit enter twice you get a line instead of a point.

@esotericist
Copy link
Contributor Author

I can fix this. One moment

@kevingranade
Copy link
Member

Also needs an astyling.

@esotericist
Copy link
Contributor Author

Also needs an astyling.

I don't understand this statement. The only thing that changes when I run make astyle on my tree is that goofy line that you're needing to add an exception for.

@esotericist
Copy link
Contributor Author

In either case, I'm pretty sure I've got it all working right this time. Barring any other special cases I missed, which... I can't actually guarantee. but I've tested zones, installing headlights, using the debug menu to spawn things... they all seem to put things in the right place now

@kevingranade kevingranade merged commit 4bbcdf7 into CleverRaven:master Apr 13, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
<Bugfix> This is a fix for a bug (or closes open issue) [C++] Changes (can be) made in C++. Previously named `Code` Info / User Interface Game - player communication, menus, etc.
Projects
None yet
4 participants