Opened 14 years ago
Last modified 4 years ago
#539 new defect
Game cursor state is not consistently reset — at Version 20
Reported by: | Sergio Fabian Vier | Owned by: | |
---|---|---|---|
Priority: | Nice to Have | Milestone: | Backlog |
Component: | UI – In-game | Keywords: | patch |
Cc: | Yves | Patch: |
Description (last modified by )
When you are playing, select a soldier and click over a tree, appear an wood icon. If you press ESC key and quit of the game to main menu, this icon persist in this place
Edit: The same bug can occur when pressing F10 to open the in-game menu
If you want simply reproduce the problem : select one citizen, hovering the mover over a tree, delete this citizen
Change History (21)
comment:1 by , 14 years ago
Milestone: | Unclassified |
---|
comment:2 by , 14 years ago
Milestone: | → OS Alpha 2 |
---|
comment:3 by , 14 years ago
Resolution: | → invalid |
---|---|
Status: | new → closed |
comment:4 by , 14 years ago
No longer valid. In the next release, ESC closes menus, it doesn't open them.
comment:5 by , 14 years ago
Milestone: | OS Alpha 2 → OS Alpha 3 |
---|---|
Resolution: | invalid |
Status: | closed → reopened |
The same bug can occur when pressing F10 to open the in-game menu (the cursor doesn't change back to default unless you move the mouse, and if you somehow exit to the main menu without moving the mouse then I believe it'll be stuck on the wrong cursor since nothing will try to reset it).
I'm not certain what's the best solution. Maybe the cursor changes should be scoped to the current GUI page, so session cursors can't leak out, and/or maybe we should send mouse movement events when showing/hiding pages (even if the mouse didn't really move), so the session code doesn't forget to set its cursor after changes.
comment:6 by , 14 years ago
Owner: | set to |
---|---|
Status: | reopened → new |
comment:7 by , 14 years ago
Priority: | trivial → minor |
---|
comment:8 by , 14 years ago
Owner: | removed |
---|
comment:9 by , 13 years ago
Description: | modified (diff) |
---|
comment:10 by , 13 years ago
Technically this could happen anytime you switch GUI object focus without moving the mouse. Hard to do now, but if we add something like tab focus switching between GUI elements, then you'd potentially see this more often. Maybe scoping the cursor somehow is most correct, but it seems like just as good or better of a solution to send an extra message when GUI focus changes (assume the mouse should move to cause this, even when it doesn't).
I've not looked in great depth at the code responsible for this, but perhaps key presses in addition to mouse movement, could trigger a cursor update.
comment:11 by , 13 years ago
With focus changing, e.g. when opening the chat box under the mouse, the cursor doesn't change to the correct (default) cursor until the next input event (e.g. the key release event). I think input.js handleInputBeforeGui is setting mouseIsOverObject which determines whether to show the default cursor or the world-interaction cursor; the problem is that the mouse might become over an object (e.g. when the chat box pops up) without handleInputBeforeGui being called so it doesn't notice.
Maybe we should add some new engine function so updateCursor can tell if the mouse is currently over an object, rather than relying on the value from the last call to handleInputBeforeGui.
I don't think the same solution would work for the issue when exiting to the main menu, though - in that case the session GUI code stops running entirely so there's nothing to revert the cursor.
comment:12 by , 13 years ago
Milestone: | Alpha 3 → Alpha 4 |
---|
comment:13 by , 13 years ago
Priority: | Nice to Have → If Time Permits |
---|
comment:14 by , 13 years ago
Milestone: | Alpha 4 → Alpha 5 |
---|
comment:15 by , 13 years ago
Milestone: | Alpha 5 → Backlog |
---|
comment:16 by , 12 years ago
Keywords: | gui simple added |
---|
comment:17 by , 12 years ago
Summary: | take wrong icon (pointer) in menu of the game → Game cursor state is not consistently reset |
---|
comment:19 by , 10 years ago
I can't reproduce it anymore as described in this ticket, but I can still reproduce it this way:
- Start a singleplayer scenario match against the AI
- Enable the developer overlay (menu->settings->developer overlay)and select "reveal map" and "control all units"
- Delete all enemy units except one
- Send your units to kill the remaining enemy while selecting a female citizen and hovering the mouse over a tree
- Ehen the enemy resigns, the icon won't change
comment:20 by , 10 years ago
Description: | modified (diff) |
---|
If you want simply reproduce the problem : select one citizen, hovering the mover over a tree, delete this citizen
by , 10 years ago
Attachment: | patch.patch added |
---|
Milestone Unclassified deleted