Skip to content

set_grab/get_grab + mouse visibility #40

Open
@pmp-p

Description

@pmp-p

https://www.pygame.org/docs/ref/event.html#pygame.event.set_grab
=> https://developer.mozilla.org/en-US/docs/Web/API/Pointer_Lock_API

set_grab(1) should issue a : window.canvas.requestPointerLock() ( awaited )

[requestPointerLock hides mouse cursor]
so use https://www.pygame.org/docs/ref/mouse.html#pygame.mouse.get_visible

if document.pointerLockElement == window.canvas:
    if pygame.mouse.get_visible():
        #build a default mouse cursor

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions