Difference between revisions of "Dynamic Window Response"
(Created page with "When presenting your Dynamic Window to a user, you can also pass in the GameObj that should receive the DynamicWindowResponse events with the second para...") |
|||
Line 14: | Line 14: | ||
-- window was closed or a useType we don't handle was sent. | -- window was closed or a useType we don't handle was sent. | ||
end) | end) | ||
+ | [[Category:Dynamic Window System]] |
Latest revision as of 21:51, 29 October 2016
When presenting your Dynamic Window to a user, you can also pass in the GameObj that should receive the DynamicWindowResponse events with the second parameter, if this parameter is left out then Module the DynamicWindow was created on will receive the event.
To capture the DynamicWindowResponse we Register an Event Handler:
RegisterEventHandler(EventType.DynamicWindowResponse, "WindowId", function(user, useType) if ( useType == "clickbutton" ) then -- do something about it return end if ( useType == "clickbutton2" ) then -- do something else about it return end -- window was closed or a useType we don't handle was sent. end)