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

Center cursor on player after all UIs are drawn #45815

Merged
merged 1 commit into from
Dec 8, 2020

Conversation

anothersimulacrum
Copy link
Member

@anothersimulacrum anothersimulacrum commented Dec 4, 2020

Summary

SUMMARY: Interface "Center terminal cursor on player character after all UIs are drawn"

Purpose of change

Fixes #44686 (Though I'd appreciate if @BlindGuyNW could comment on if this fixes it or if there are other issues).

Describe the solution

After drawing all the UI, move the terminal cursor back to the player's position, and refresh the window.

Also, add a little explanatory comment for anyone debugging cursor issues in the future that changing curs_set() won't crash the game.

Describe alternatives you've considered

There are probably cursor errors elsewhere, this just solves one of them.

Testing

Change curs_set( 0 ) to curs_set( 2 ), and load up the game. See that the player character is blinking.
(This must be done on a curses build).

@anothersimulacrum anothersimulacrum added <Bugfix> This is a fix for a bug (or closes open issue) [C++] Changes (can be) made in C++. Previously named `Code` Accessibility Issues regarding accessibility labels Dec 4, 2020
Copy link
Contributor

@alex19EP alex19EP left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i confirm the fix. thanks @anothersimulacrum!

however it would be great if the cursor would also follow the viewpoint in the browse menu. (X)
should i create a new issue for it?

Also, add a little explanatory comment for anyone debugging cursor
issues in the future that changing curs_set() won't crash the game.

There are probably cursor errors all over the shop, but this solves at
least one of them.

Also remove the old code that did the same thing.
@anothersimulacrum
Copy link
Member Author

however it would be great if the cursor would also follow the viewpoint in the browse menu. (X)
should i create a new issue for it?

Yes, please do!
I'd do it in this PR, but it's quite complicated, so I think it needs separate attention (one problem is that I need the cursor on w_terrain, but need to refresh w_info after that, and I'm not sure how to reconcile that).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Accessibility Issues regarding accessibility <Bugfix> This is a fix for a bug (or closes open issue) [C++] Changes (can be) made in C++. Previously named `Code`
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Terminal Cursor doesn't Land on Player Character Reliably
3 participants