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

Adventure map, mouse cursor position after the action of selecting a hero with a left click held on the hero sprite #8921

Open
1 task done
LeHerosInconnu opened this issue Jul 6, 2024 · 2 comments
Labels
awaiting feedback Feedback was requested from the issue opener improvement New feature, request or improvement ui UI/GUI related stuff

Comments

@LeHerosInconnu
Copy link

Preliminary checks

Describe the problem requiring a solution

When action is taken to select a hero by a left click held on the hero sprite on the adventure map, the hero becomes the selected hero and the area of the adventure map is centered on the hero.
However, the mouse cursor remains at its previous position.
I suggest that, at the end of the action, the mouse cursor be positioned on the hero sprite, so in the center of the adventure map area.

In fheroes2:

2024-07-06.17-57-04.mp4

Describe the possible solution

At the end of the action to select a hero by a left click held on the hero sprite on the adventure map, make the mouse cursor to be positioned on the hero sprite, so in the center of the adventure map area.

Additional info

No response

@zenseii
Copy link
Collaborator

zenseii commented Jul 7, 2024

I considered this way of operation when implementing it. However, this hero selection can be compared to the quick swap to a castle when the current focus is on a hero, and neither in this case does the mouse cursor get centered on the castle you just clicked on. Therefore I was reluctant to implement a potential unexpected way of working for the UI.

I should also note that we do not have auto placement of the mouse cursor as other games and apps tend to have, in which the cursor will jump to either the OK button or similar by as soon as a dialog pops up.

How does this work for quickly selecting castles in the OG, @LeHerosInconnu ?

@zenseii zenseii added ui UI/GUI related stuff awaiting feedback Feedback was requested from the issue opener labels Jul 7, 2024
@zenseii zenseii added this to the Beyond OG scope milestone Jul 7, 2024
@LeHerosInconnu
Copy link
Author

LeHerosInconnu commented Jul 8, 2024

Hello @zenseii,

How does this work for quickly selecting castles in the OG, @LeHerosInconnu ?

There's the same problem with the mouse cursor and castle in the original game.
It should be improved for the mouse cursor and castle too.
I haven't posted an issue for the mouse cursor and castle yet, I'll do it later (#9006).

I should also note that we do not have auto placement of the mouse cursor as other games and apps tend to have, in which the cursor will jump to either the OK button or similar by as soon as a dialog pops up.

It's not so much a matter of an auto placement of the mouse cursor on a clickable button, but of leaving the mouse cursor where the user positions it, in relation to the elements of the adventure map.
When the user left clicks, on the castle for example, to select it, the next action will be, in the vast majority of cases, to left click on the castle a second time to access the castle screen.
However, as the mouse cursor is no longer positioned over the castle sprite where the user has clicked, the user must move the
mouse cursor back to the castle sprite.

I considered this way of operation when implementing it. However, this hero selection can be compared to the quick swap to a castle when the current focus is on a hero, and neither in this case does the mouse cursor get centered on the castle you just clicked on. Therefore I was reluctant to implement a potential unexpected way of working for the UI.

It would be a real plus, in my opinion, if the user didn't have to readjust the position of the mouse cursor when performing this type of action.
Namely, for hero selection as in this thread.
The user positions the mouse cursor over the hero sprite to perform the action.
His next action, in most cases, will be to left click again on the hero sprite to access the hero screen.
The user expects the mouse cursor to still be positioned over the hero sprite, where he clicked when the action was triggered.
But the mouse cursor is no longer positioned over the hero sprite at the end of the completion of the action.
The user must then readjust the position of the mouse cursor.

Similar case for the action of casting the dimension door spell (in the example, I position the mouse cursor over the windmill during spell casting to visit it after the spell animation) in this issue: #8922.

Another case is for the mouse cursor and castle, from which I'll open an issue later (#9006).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
awaiting feedback Feedback was requested from the issue opener improvement New feature, request or improvement ui UI/GUI related stuff
Projects
None yet
Development

No branches or pull requests

2 participants