Skip to content

Drag-n-drop file support. #256

@SweetSea-ButImNotSweet

Description

@SweetSea-ButImNotSweet

Model

Galaxy J7 Prime, Android 8.1

Video file:

https://cdn.discordapp.com/attachments/329400828920070144/1163073721049809006/2023_10_15_18.07.13.mp4?ex=653e3fcf&is=652bcacf&hm=856621ffe7ac6dd6e920fbbfd1b0b042d6c3315ee038a61927bd96e277c61d3b&

I forget to tap "Custom BG" to check but the game doesn't get the image dropped and you may already noticed the animation of the dragging file is "coming back" not "disappear/fading out at the spot"

How to reproduce

Requirment: you have to turn on "Force activity/app can be resizable" since love2d doesn't allow split screen (Restart required if you change this option)

1: Open an known app that support drag-n-drop: example Gallery or Files by Google (I will call it A)
2: Run any game or code have known working love.filedropped call or using this one (by Miku AuahDark) (I will call it B)

local file = {size = 0, path = ""}

function love.draw()
  love.graphics.print(string.format("%s\n%d", file.path, file.size), 100, 100)
end

function love.filedropped(f)
  file.path = f:getFilename()
  file.size = f:getSize()
end

3: Enable split screen
4: Try to do drag and drop any file from the window A to window B

Expected behavior

Depend, but the game/code should get the "love.filedropped" working

Metadata

Metadata

Assignees

No one assigned

    Labels

    featureNew feature or requestlibrary dependencyRelated to a library used by LÖVE

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions