mirror of
https://github.com/ArnoldSmith86/virtualtabletop.git
synced 2026-03-02 22:57:02 -05:00
Cursor hiding (after inactivity & focus loss) #361
Labels
No labels
PCIO compatibility
Validator
automated testing
bug
documentation
duplicate
editor
enhancement
enhancement
library
library
maintenance
needs legacy server
pile related
reported client crash
routine operations
user interface
widget properties
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/virtualtabletop#361
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @minotalen on GitHub (Oct 7, 2021).
Originally assigned to: @robartsd on GitHub.
Sometimes players join a room and don't participate. Sometimes they open a new tab or switch applications.
In both cases it can happen that the player cursor stays on board for a long time. Guess the best way to check for inactivity is to watch whether the cursor coordinates stay the same for some duration. Maybe the player cursor could start fading after ~20 secs of immobility, reaching 100% transparency after a minute. The cursor would immediately become visible again after movement.
Don't know if there is a way to check for focus loss (player switching tabs or application) but if there is, it might make sense to fade the cursor immediately for that case.
@robartsd commented on GitHub (Oct 7, 2021):
I'm in favor of cursors fading as well (I'd prefer much faster than a minute - probably similar to PCIO's timing). Others have argued for the cursor because the side channel information is similar to a person's hand position while playing in person. I think a stale cursor position causes a large difference in what it communicates based on the user's input device (mouse vs. touch) so it should fade out for everyone.
I think we should temporarily put a class in the cursor while it is moving setting a callback to remove the class shortly after it stops moving. We could also have a class to indicate that the mouse/touch is down - perhaps making the cursor more opaque while clicking/dragging. CSS can handle the actual fadeout based on the removal of the class. Then if we implement game css, game designers would be able to adjust this behavior with no additional game engine code.
This as been previously brought up in #249, #111, & #94.