Regular API function

simDisplayDialog
remote API equivalent: simxDisplayDialog
RosPlugin API equivalent: simRosDisplayDialog

Description Displays a generic dialog box. Use in conjunction with simGetDialogResult ,simGetDialogInput and simEndDialog. From C, the function will only create non-modal dialogs (non-blocking), from Lua, modal dialogs can be created if called from a child script that runs in a thread. Use custom user interfaces instead if a higher customization level is required. Dialogs displayed from a main script or a child script will automatically close at simulation end. See also simMsgBox and simFileDialog.
C synopsis simInt simDisplayDialog(const simChar* titleText,const simChar* mainText,simInt dialogType,const simChar* initialText,const simFloat* titleColors,const simFloat* dialogColors,simInt* uiHandle)
C parameters
titleText: Title bar text
mainText: Information text
initialText: Initial text in the edit box if the dialog is of type sim_dlgstyle_input. Can be NULL
titleColors: Title bar color (6 simFloat values for RGB for background and foreground), can be NULL for default colors
dialogColors: Dialog color (6 simFloat values for RGB for background and foreground), can be NULL for default colors
uiHandle: corresponding OpenGl-based custom UI handle. Can be NULL
C return value
handle of generic dialog (different from OpenGl-based custom UI handle!!) if operation was successful, -1 otherwise. The handle should be used with following functions: simGetDialogResult ,simGetDialogInput and simEndDialog.
Lua synopsis number dialogHandle,number uiHandle=simDisplayDialog(string titleText,string mainText,number dialogType,boolean modalDialog,string initialText,table_6 titleColors,table_6 dialogColors,number uiHandle)
Lua parameters
titleText: Title bar text
mainText: information text
dialogType: generic dialog style
modalDialog: specifies whether the dialog is modal. Modal dialogs are only allowed when not called from the main thread.
initialText: Initial text in the edit box if the dialog is of type sim_dlgstyle_input. Can be nil or omitted
titleColors: Title bar color (6 values for RGB for background and foreground), can be nil for default colors, or omitted
dialogColors: Dialog color (6 values for RGB for background and foreground), can be nil for default colors, or omitted
Lua return values
dialogHandle: handle of generic dialog (different from OpenGl-based custom UI handle!!), or nil if operation failed
uiHandle: handle of corresponding OpenGl-based custom UI, or nil if operation failed

All regular API functions on one page