1
0
mirror of https://github.com/Ylianst/MeshAgent synced 2025-12-21 10:43:36 +00:00

Updated on macOS to address multiline captions and button count errors

This commit is contained in:
Bryan Roe
2020-08-02 14:06:58 -07:00
parent 96390ab06e
commit 9931cdd9e1
2 changed files with 4 additions and 1 deletions

File diff suppressed because one or more lines are too long

View File

@@ -635,6 +635,9 @@ function macos_messageBox()
this.create = function create(title, caption, timeout, layout) this.create = function create(title, caption, timeout, layout)
{ {
caption = caption.split('\n').join('\\n');
if (Array.isArray(layout) && layout.length > 3) { throw ('This system only supports a maximum of 3 buttons'); }
if (require('user-sessions').isRoot()) if (require('user-sessions').isRoot())
{ {
ret = new promise(function (res, rej) { this._res = res; this._rej = rej; }); ret = new promise(function (res, rej) { this._res = res; this._rej = rej; });