Constructor
new GUI(psychoJS)
- Source:
Parameters:
Name | Type | Description |
---|---|---|
psychoJS |
module:core.PsychoJS | the PsychoJS instance |
Members
DEFAULT_SETTINGS :Object
- Source:
Default settings for GUI.
Type:
- Object
Methods
(protected, static) _onKeyChange(gui, event)
- Source:
Callback triggered upon change event (for required keys).
Parameters:
Name | Type | Description |
---|---|---|
gui |
module:core.GUI | this GUI |
event |
Event | the key's event |
(protected) _onCancelExperiment()
- Source:
Callback triggered when the participant presses the Cancel button
(protected) _onResourceEvents(signal)
- Source:
Callback triggered upon a resource event from the Server Manager
.
Parameters:
Name | Type | Description |
---|---|---|
signal |
Object.<string, (string|Symbol)> | the ServerManager's signal |
(protected) _onStartExperiment()
- Source:
Callback triggered when the participant presses the OK button
(protected) _setProgressMessage(message)
- Source:
Set the progress message.
Parameters:
Name | Type | Description |
---|---|---|
message |
string | the message |
(protected) _updateDialog(changeOKButtonFocusopt)
- Source:
Update the dialog box.
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
changeOKButtonFocus |
<optional> |
false
|
whether to change the focus to the OK button |
(protected) _updateProgressBar()
- Source:
Update the progress bar.
(protected) _userFriendlyError(errorCode) → {Object}
- Source:
Get the user-friendly html message associated to a pavlovia.or server error code.
Parameters:
Name | Type | Description |
---|---|---|
errorCode |
number | the pavlovia.org server error code |
Returns:
a user-friendly error message
- Type
- Object
closeDialog()
- Source:
Close the previously opened dialog box, if there is one.
dialog(options)
- Source:
Show a message to the participant in a dialog box.
This function can be used to display both warning and error messages.
Parameters:
Name | Type | Description | ||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options |
Object |
Properties
|
DlgFromDict(options)
- Source:
Create a dialog box that (a) enables the participant to set some experimental values (e.g. the session name), (b) shows progress of resource download, and (c) enables the participant to cancel the experiment.
Setting experiment values
DlgFromDict displays an input field for all values in the dictionary. It is possible to specify default values e.g.:
let expName = 'stroop';
let expInfo = {'participant':'', 'session':'01'};
psychoJS.schedule(psychoJS.gui.DlgFromDict({dictionary: expInfo, title: expName}));
If the participant cancels (by pressing Cancel or by closing the dialog box), then the dictionary remains unchanged.
Parameters:
Name | Type | Description | ||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options |
Object |
Properties
|
finishDialog(options)
- Source:
Create a dialog box with a progress bar, to inform the participant of the last stages of the experiment: upload of results, of log, and closing of session.
Parameters:
Name | Type | Description | ||||||||
---|---|---|---|---|---|---|---|---|---|---|
options |
Object |
Properties
|
Type Definitions
onOK()
- Source: