We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b548006 commit ce13d41Copy full SHA for ce13d41
ScreenManager.lua
@@ -223,6 +223,19 @@ function ScreenManager.pop()
223
end
224
225
226
+---
227
+-- Publishes a message to all screens which have a public receive function.
228
+-- @tparam string event A string by which the message can be identified.
229
+-- @tparam varargs ... Multiple parameters to push to the receiver.
230
+--
231
+function ScreenManager.publish( event, ... )
232
+ for i = 1, #stack do
233
+ if stack[i].receive then
234
+ stack[i]:receive( event, ... )
235
+ end
236
237
+end
238
+
239
-- ------------------------------------------------
240
-- LOVE Callbacks
241
0 commit comments