-
Notifications
You must be signed in to change notification settings - Fork 0
development input requests
Tim Stair edited this page Mar 18, 2018
·
2 revisions
InputRequests group the necessary information to display a prompt to the user. The standard InputRequest consists of text to display and a number of possible Responses.
Example request from the sample project.
InputRequest::with(
'After selecting a response the engine transitions to another InputRequest. You chose 1!',
[
Response::with('Continue to the map.', 'sample_map_02_04'),
]);
The above code will create an InputRequest with the text and array of responses (only 1 response in this case).
After everything has been configured on an InputRequest it should be added to the engine with the following call: $samqCore->addRequest(
specifying the id to link the request to.
In some cases you may need to have text that is displayed based on Conditions. These will render based on the state of the session at the time of rendering.
Adjusments performed before rendering.
Adjusments performed after rendering.