File tree Expand file tree Collapse file tree 2 files changed +21
-1
lines changed
Expand file tree Collapse file tree 2 files changed +21
-1
lines changed Original file line number Diff line number Diff 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
Original file line number Diff line number Diff line change 2121-- ===============================================================================--
2222
2323local 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
162162end
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.
You can’t perform that action at this time.
0 commit comments