-
-
Notifications
You must be signed in to change notification settings - Fork 376
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
Modernize cursor update for the game area #8012
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Everything works fine.
However, this PR does not fix #8026.
I am moving this change to the next release as we are very close to the current release. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @Districh-ru , I put several comments in this pull request. Would you mind to take a look at them?
src/fheroes2/kingdom/puzzle.cpp
Outdated
adventureMapInterface.getGameArea().SetUpdateCursor(); | ||
|
||
adventureMapInterface.setRedraw( Interface::REDRAW_RADAR_CURSOR ); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can see that we set to update cursor if Interface::REDRAW_RADAR_CURSOR flag is set. Is it valid for all situations? If yes should we add an internal logic while redrawing adventure map to update the cursor?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi, @ihhub, you are right - REDRAW_RADAR_CURSOR
is not needed here because we restore radar by restorer. I made the same restorer for the second puzzle function. It was called here to restore radar because its area is used to render EXIT button.
Hi @Districh-ru , do we need to change specific logic in this pull request since we separated Adventure Map and Editor classes and do not share quick info dialog code for the Editor? |
Hi @ihhub, yes this PR needs some improvement for the new editor quick view. I'll update it on the next week. |
Some parts of this PR are redone in separate PRs. |
Based on #7808.
This PR does the next changes:
gameArea
to theQuickInfo()
functions;POINTER
cursor when map dragging is started (it is made to show the player that no action will be performed after the mouse button is released, discussible, can be reverted);CURRENT_HERO_DELAY
pass: this part needs testing, the assertions are temporary put instead;gameArea
of giveninterface
(AdventureMab/EditorInterface);gameArea
copies for the View World, use references to the originalgameArea
.