Skip to content

Request: Add x and y params to filedropped() and directorydropped() event callbacks #2019

Closed
@AverniteDF

Description

@AverniteDF

filedropped(file) => filedropped(file, x, y)
directorydropped(path) => directorydropped(path, x, y)

In most cases the correct coords can be obtained using mouse.getPosition() inside those two callbacks but not always. Consider the case where the Love2D application has halted because it's waiting for a file dialog to close. If you drag a file or directory from the file dialog onto the halted application window and then close the file dialog, the application has no way of knowing the actual coords of the drop because the mouse has possibly moved between the time of the drop and the closing of the dialog. Adding x and y params to those callbacks will allow the programmer to always know the exact location of the drop.

Metadata

Metadata

Assignees

No one assigned

    Labels

    SDL3Features and changes that depend on upgrading from SDL2 to SDL3featureNew feature or requestlibrary dependencyRelated to a library used by LÖVE

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions