Dynamic Window Response
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)