Skip to content

Commit 12036db

Browse files
committed
Merge branch 'release/1.6.0'
2 parents 0b62182 + 5e105c2 commit 12036db

File tree

2 files changed

+21
-1
lines changed

2 files changed

+21
-1
lines changed

Screen.lua

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,10 @@ function Screen.new()
4545

4646
function self:focus(dfocus) end
4747

48+
function self:directorydropped(path) end
49+
50+
function self:filedropped(file) end
51+
4852
function self:resize(w, h) end
4953

5054
function self:visible(dvisible) end

ScreenManager.lua

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
--===============================================================================--
2222

2323
local ScreenManager = {
24-
_VERSION = '1.5.0',
24+
_VERSION = '1.6.0',
2525
_DESCRIPTION = 'Screen/State Management for the LÖVE framework',
2626
_URL = 'https://github.com/rm-code/screenmanager/',
2727
};
@@ -161,6 +161,22 @@ function ScreenManager.resize(w, h)
161161
end
162162
end
163163

164+
---
165+
-- Callback function triggered when a directory is dragged and dropped onto the window.
166+
-- @param file - The full platform-dependent path to the directory.
167+
--
168+
function ScreenManager.directorydropped(path)
169+
ScreenManager.peek():directorydropped(path);
170+
end
171+
172+
---
173+
-- Callback function triggered when a file is dragged and dropped onto the window.
174+
-- @param file - The unopened File object representing the file that was dropped.
175+
--
176+
function ScreenManager.filedropped(file)
177+
ScreenManager.peek():filedropped(file);
178+
end
179+
164180
---
165181
-- Update all screens on the stack whenever the game window gains or
166182
-- loses focus.

0 commit comments

Comments
 (0)