MCPcopy Create free account
hub / github.com/FSGModding/FSG_Mod_Assistant / doDialogBox

Method doDialogBox

lib/modAssist_window_lib.js:1140–1150  ·  view source on GitHub ↗

* Show a dialog box (sync) * MARK: doDialogBox * @param {string} attachTo window to attach * @param {Object} options options * @param {string} options.type type of dialog * @param {?string} options.message message of dialog * @param {?string} options.messageL10n l10n key of dialog messag

(attachTo, {type = 'info', message = null, messageL10n = null, title = null, titleL10n = null })

Source from the content-addressed store, hash-verified

1138 * @param {?string} options.titleL10n l10n key of title
1139 */
1140 doDialogBox(attachTo, {type = 'info', message = null, messageL10n = null, title = null, titleL10n = null }) {
1141 const attachWin = ( attachTo === null ) ? null : this.win[attachTo]
1142 const thisTitle = ( title !== null ) ? title : this.l10n.syncStringLookup(( titleL10n === null ) ? 'app_name' : titleL10n)
1143 const thisMessage = ( message !== null ) ? message : this.l10n.syncStringLookup(messageL10n)
1144
1145 dialog.showMessageBoxSync(attachWin, {
1146 title : thisTitle,
1147 message : thisMessage,
1148 type : type,
1149 })
1150 }
1151}
1152
1153/**

Callers 1

Calls 1

syncStringLookupMethod · 0.80

Tested by

no test coverage detected