Skip to content

Commit 0b62182

Browse files
committed
Merge branch 'release/1.5.0'
2 parents acb2dec + 0faae70 commit 0b62182

File tree

2 files changed

+61
-3
lines changed

2 files changed

+61
-3
lines changed

Screen.lua

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,8 @@ function Screen.new()
5353

5454
function self:keyreleased(key) end
5555

56+
function self:lowmemory() end
57+
5658
function self:textinput(input) end
5759

5860
function self:mousereleased(x, y, button) end
@@ -65,6 +67,14 @@ function Screen.new()
6567

6668
function self:quit(dquit) end
6769

70+
function self:touchmoved(id, x, y, pressure) end
71+
72+
function self:touchpressed(id, x, y, pressure) end
73+
74+
function self:touchreleased(id, x, y, pressure) end
75+
76+
function self:wheelmoved(x, y) end
77+
6878
function self:isActive()
6979
return active;
7080
end
@@ -84,4 +94,4 @@ return Screen;
8494

8595
--==================================================================================================
8696
-- Created 02.06.14 - 20:25 =
87-
--==================================================================================================
97+
--==================================================================================================

ScreenManager.lua

Lines changed: 50 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
--===============================================================================--
2222

2323
local 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);
199199
end
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);
254261
end
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

Comments
 (0)