Module: dialogs

dialogs

Camera module

Methods

staticalert(text, callback, title, buttonName)

Present a single button dialog

Name Type Description
text string

Content text

callback function

Callback

title string

Window title

buttonName string

Button name

Supported platforms
  • iOS(7.0)

staticconfirm(text, callback, title, buttonName)

Present a dialog with multiple options

Name Type Description
text string

Content text

callback function

Callback

title string

Window title

buttonName Array.<string>

Button labels

Supported platforms
  • iOS(7.0)
Example
function onConfirm(results) {
    // results.input1
    // results.buttonIndex
  }

  Roblox.Hybrid.dialogs.confirm(
    'Please enter your name',
    onConfirm,
    'Window title',
    ['Ok', 'Cancel']
  );

staticprompt(text, callback, title, buttonName, defaultText)

Present a dialog with a textbox

Name Type Description
text string

Content text

callback function

Callback

title string

Window title

buttonName string

Button name

defaultText string

Default text

Supported platforms
  • iOS(7.0)
Example
function onPrompt(results) {
    // results.input1
    // results.buttonIndex
  }

  Roblox.Hybrid.dialogs.prompt(
    'Please enter your name',
    onPrompt,
    'Window title',
    ['Ok', 'Cancel'],
    'Your name here'
  );