mirror of
https://github.com/burrow-dev/burrow-server.git
synced 2026-11-21 17:37:50 -05:00
Brought up to date with the private repository (feea4c7)
This commit is contained in:
1 parent
1aa738d692
commit
1b1df1ae48
7925 files changed
+2617237
-20
No files matched your search
@@ -0,0 +1,71 @@
|
||||
package com.sbi.popup
|
||||
{
|
||||
import flash.display.*;
|
||||
import flash.events.*;
|
||||
import flash.net.FileReference;
|
||||
import flash.utils.getDefinitionByName;
|
||||
|
||||
public dynamic class SBYesNoPopup extends SBStandardPopup
|
||||
{
|
||||
|
||||
private var _yesBtn:MovieClip;
|
||||
|
||||
private var _noBtn:MovieClip;
|
||||
|
||||
private var _confirmCallback:Function;
|
||||
|
||||
private var _passbackObject:Object;
|
||||
|
||||
public function SBYesNoPopup(param1:DisplayObjectContainer, param2:String = null, param3:Boolean = true, param4:Function = null, param5:Object = null, param6:Boolean = true, param7:Boolean = true, param8:Boolean = false, param9:Boolean = false, param10:String = null, param11:Number = undefined, param12:Number = undefined, param13:Number = undefined, param14:Number = undefined, param15:Array = null)
|
||||
{
|
||||
this._confirmCallback = param4;
|
||||
this._passbackObject = param5;
|
||||
_verticalOffset = -20;
|
||||
_btnTxtGap = 6;
|
||||
_btnHeight = 44;
|
||||
var _loc16_:MovieClip = new (getDefinitionByName("YesNoPopupSkin") as Class)();
|
||||
var _loc17_:MovieClip = new (getDefinitionByName("YesNoPopupContent") as Class)();
|
||||
this._yesBtn = _loc17_.yesBtn;
|
||||
this._noBtn = _loc17_.noBtn;
|
||||
this._yesBtn.addEventListener(MouseEvent.MOUSE_DOWN,this.onYesNoBtn,false,0,true);
|
||||
this._noBtn.addEventListener(MouseEvent.MOUSE_DOWN,this.onYesNoBtn,false,0,true);
|
||||
_resizeCallback = this.onResize;
|
||||
super(param1,param2,param3,_loc17_,_loc16_,param6,param7,param8,param9,param10,param11,param12,param13,param14,param15);
|
||||
}
|
||||
|
||||
override public function destroy() : void
|
||||
{
|
||||
this._yesBtn.removeEventListener(MouseEvent.MOUSE_DOWN,this.onYesNoBtn);
|
||||
this._noBtn.removeEventListener(MouseEvent.MOUSE_DOWN,this.onYesNoBtn);
|
||||
super.destroy();
|
||||
}
|
||||
|
||||
private function onResize() : void
|
||||
{
|
||||
this._yesBtn.y = _text.height + _btnTxtGap + 0.5 * _btnHeight;
|
||||
this._noBtn.y = this._yesBtn.y;
|
||||
}
|
||||
|
||||
private function onYesNoBtn(param1:MouseEvent) : void
|
||||
{
|
||||
var _loc2_:FileReference = null;
|
||||
var _loc3_:Object = null;
|
||||
param1.stopPropagation();
|
||||
this.destroy();
|
||||
if(Boolean(param1.currentTarget == this._yesBtn) && Boolean(this._passbackObject) && this._passbackObject.hasOwnProperty("FileReference"))
|
||||
{
|
||||
_loc2_ = new FileReference();
|
||||
_loc2_.save(this._passbackObject.ImageData,this._passbackObject.SaveName);
|
||||
}
|
||||
if(this._confirmCallback != null)
|
||||
{
|
||||
_loc3_ = {
|
||||
"status":param1.currentTarget == this._yesBtn,
|
||||
"passback":this._passbackObject
|
||||
};
|
||||
this._confirmCallback(_loc3_);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user