
Untitled
By: a guest on
May 1st, 2012 | syntax:
None | size: 1.03 KB | hits: 13 | expires: Never
public function Dialog(opts) {
this.opts = opts || {};
this.acceptText = this.opts.acceptText || "Ok";
this.cancelText = this.opts.cancelText || "Cancel";
this.titleText = this.opts.title || "Title Text";
this.bodyText = this.opts.body || "Body Text";
this.openSoundName = this.opts.openSoundName || "HighPop";
this.acceptSoundName = this.opts.acceptSoundName || "LockSound";
this.cancelSoundName = this.opts.cancelSoundName || "PageBack";
this.onAccept = this.opts.onAccept || null;
this.onCancel = this.opts.onCancel || null;
this.context = this.opts.context || null;
this.dialogWidth = this.opts.width || Globals.get('dialog_width');
this.dialogHeight = this.opts.height || Globals.get('dialog_height');
this.dialogX = this.opts.x || (Globals.get('screen_width') - dialogWidth)/2;
this.dialogY = this.opts.y || (Globals.get('screen_height') - dialogHeight)/2;
this.imageName = this.opts.imageName || null;