21
21
-- ===============================================================================--
22
22
23
23
local ScreenManager = {
24
- _VERSION = ' 1.4.1 ' ,
24
+ _VERSION = ' 1.5.0 ' ,
25
25
_DESCRIPTION = ' Screen/State Management for the LÖVE framework' ,
26
26
_URL = ' https://github.com/rm-code/screenmanager/' ,
27
27
};
@@ -198,6 +198,13 @@ function ScreenManager.keyreleased(key)
198
198
ScreenManager .peek ():keyreleased (key );
199
199
end
200
200
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
+
201
208
---
202
209
-- Reroute the textinput callback to the currently active screen.
203
210
-- @param input
@@ -253,6 +260,47 @@ function ScreenManager.quit(dquit)
253
260
ScreenManager .peek ():quit (dquit );
254
261
end
255
262
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
+
256
304
-- ------------------------------------------------
257
305
-- Return Module
258
306
-- ------------------------------------------------
@@ -261,4 +309,4 @@ return ScreenManager;
261
309
262
310
-- ==================================================================================================
263
311
-- Created 02.06.14 - 17:30 =
264
- -- ==================================================================================================
312
+ -- ==================================================================================================
0 commit comments