Skip to content

MouseInput should have a position #883

@JMS55

Description

@JMS55

A common case is to get the location on screen a user clicks. The way to do that currently is to create a variable that stores the cursor location, which is updated whenever CursorMoved is received. Then, when a MouseInput event is received, you use whatever that variable is currently set to. I think it would be useful for winit to do this internally, so that the MouseInput event could store a position, making it easier for the user. winit should also update the variable whenever Window::set_cursor_position() is called.

Metadata

Metadata

Assignees

No one assigned

    Labels

    C - needs discussionDirection must be ironed outD - easyLikely easier than most tasks hereS - apiDesign and usability

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions