Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on May 1st, 2012  |  syntax: None  |  size: 1.03 KB  |  hits: 13  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. public function Dialog(opts) {
  2.                         this.opts = opts || {};
  3.                        
  4.                         this.acceptText      = this.opts.acceptText || "Ok";
  5.                         this.cancelText      = this.opts.cancelText || "Cancel";
  6.                         this.titleText       = this.opts.title || "Title Text";
  7.                         this.bodyText        = this.opts.body || "Body Text";
  8.                         this.openSoundName   = this.opts.openSoundName || "HighPop";
  9.                         this.acceptSoundName = this.opts.acceptSoundName || "LockSound";
  10.                         this.cancelSoundName = this.opts.cancelSoundName || "PageBack";
  11.                         this.onAccept        = this.opts.onAccept || null;
  12.                         this.onCancel        = this.opts.onCancel || null;
  13.                         this.context         = this.opts.context  || null;
  14.                         this.dialogWidth     = this.opts.width || Globals.get('dialog_width');
  15.                         this.dialogHeight    = this.opts.height || Globals.get('dialog_height');
  16.                         this.dialogX         = this.opts.x || (Globals.get('screen_width')  - dialogWidth)/2;
  17.                         this.dialogY         = this.opts.y || (Globals.get('screen_height')  - dialogHeight)/2;
  18.                         this.imageName       = this.opts.imageName || null;