2121-- ===============================================================================--
2222
2323local ScreenManager = {
24- _VERSION = ' 1.4.1 ' ,
24+ _VERSION = ' 1.5.0 ' ,
2525 _DESCRIPTION = ' Screen/State Management for the LÖVE framework' ,
2626 _URL = ' https://github.com/rm-code/screenmanager/' ,
2727};
@@ -198,6 +198,13 @@ function ScreenManager.keyreleased(key)
198198 ScreenManager .peek ():keyreleased (key );
199199end
200200
201+ ---
202+ -- Callback function triggered when the system is running out of memory on mobile devices.
203+ --
204+ function ScreenManager .lowmemory ()
205+ ScreenManager .peek ():lowmemory ();
206+ end
207+
201208---
202209-- Reroute the textinput callback to the currently active screen.
203210-- @param input
@@ -253,6 +260,47 @@ function ScreenManager.quit(dquit)
253260 ScreenManager .peek ():quit (dquit );
254261end
255262
263+ ---
264+ -- Callback function triggered when a touch press moves inside the touch screen.
265+ -- @param id - The identifier for the touch press.
266+ -- @param x - The x-axis position of the touch press inside the window, in pixels.
267+ -- @param y - The y-axis position of the touch press inside the window, in pixels.
268+ -- @param pressure - The amount of pressure being applied. Most touch screens aren't pressure sensitive, in which case the pressure will be 1.
269+ --
270+ function ScreenManager .touchmoved (id , x , y , pressure )
271+ ScreenManager .peek ():touchmoved (id , x , y , pressure );
272+ end
273+
274+ ---
275+ -- Callback function triggered when the touch screen is touched.
276+ -- @param id - The identifier for the touch press.
277+ -- @param x - The x-axis position of the touch press inside the window, in pixels.
278+ -- @param y - The y-axis position of the touch press inside the window, in pixels.
279+ -- @param pressure - The amount of pressure being applied. Most touch screens aren't pressure sensitive, in which case the pressure will be 1.
280+ --
281+ function ScreenManager .touchpressed (id , x , y , pressure )
282+ ScreenManager .peek ():touchpressed (id , x , y , pressure );
283+ end
284+
285+ ---
286+ -- Callback function triggered when the touch screen stops being touched.
287+ -- @param id - The identifier for the touch press.
288+ -- @param x - The x-axis position of the touch press inside the window, in pixels.
289+ -- @param y - The y-axis position of the touch press inside the window, in pixels.
290+ -- @param pressure - The amount of pressure being applied. Most touch screens aren't pressure sensitive, in which case the pressure will be 1.
291+ --
292+ function ScreenManager .touchreleased (id , x , y , pressure )
293+ ScreenManager .peek ():touchreleased (id , x , y , pressure );
294+ end
295+
296+ ---
297+ -- Callback function triggered when the mouse wheel is moved.
298+ -- @param x - Amount of horizontal mouse wheel movement. Positive values indicate movement to the right.
299+ -- @param y - Amount of vertical mouse wheel movement. Positive values indicate upward movement.
300+ function ScreenManager .wheelmoved (x , y )
301+ ScreenManager .peek ():wheelmoved (x , y );
302+ end
303+
256304-- ------------------------------------------------
257305-- Return Module
258306-- ------------------------------------------------
@@ -261,4 +309,4 @@ return ScreenManager;
261309
262310-- ==================================================================================================
263311-- Created 02.06.14 - 17:30 =
264- -- ==================================================================================================
312+ -- ==================================================================================================
0 commit comments