Skip to content

Commit f51eb9c

Browse files
committed
Allow variable arguments in init function
1 parent e69afd2 commit f51eb9c

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

ScreenManager.lua

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,11 +60,12 @@ end
6060
-- @param screen (string) The key of the first screen to push to the stack.
6161
-- Use the key under which the screen in question is
6262
-- stored in the nscreens table.
63+
-- @param ... (vararg) One or multiple arguments passed to the new screen.
6364
--
64-
function ScreenManager.init( nscreens, screen )
65+
function ScreenManager.init( nscreens, screen, ... )
6566
stack = {};
6667
screens = nscreens;
67-
ScreenManager.push( screen );
68+
ScreenManager.push( screen, ... );
6869
end
6970

7071
---

0 commit comments

Comments
 (0)