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,175 @@
|
||||
package com.sbi.popup
|
||||
{
|
||||
import flash.filters.*;
|
||||
|
||||
public class SBPopupManager
|
||||
{
|
||||
|
||||
public static var _selected:SBPopup;
|
||||
|
||||
public static var _modalSBPopup:SBPopup;
|
||||
|
||||
public static var _prevModalSBPopup:SBPopup;
|
||||
|
||||
public static var darken:Function;
|
||||
|
||||
public static var lighten:Function;
|
||||
|
||||
public static var popups:Array = [];
|
||||
|
||||
public static var nonSBPopups:Array = [];
|
||||
|
||||
public static var enabled:Boolean = true;
|
||||
|
||||
public function SBPopupManager()
|
||||
{
|
||||
super();
|
||||
}
|
||||
|
||||
public static function get selected() : SBPopup
|
||||
{
|
||||
return _selected;
|
||||
}
|
||||
|
||||
public static function set selected(param1:SBPopup) : void
|
||||
{
|
||||
if(param1.selected)
|
||||
{
|
||||
return;
|
||||
}
|
||||
param1.selected = true;
|
||||
_selected = param1;
|
||||
}
|
||||
|
||||
public static function get modalSBPopup() : SBPopup
|
||||
{
|
||||
return _modalSBPopup;
|
||||
}
|
||||
|
||||
public static function set modalSBPopup(param1:SBPopup) : void
|
||||
{
|
||||
var _loc2_:SBPopup = null;
|
||||
var _loc3_:SBPopup = null;
|
||||
for each(_loc2_ in popups)
|
||||
{
|
||||
if(_loc2_ != param1)
|
||||
{
|
||||
_loc2_.enabled = param1 == null;
|
||||
}
|
||||
}
|
||||
_loc3_ = _prevModalSBPopup;
|
||||
if(Boolean(param1) && Boolean(_modalSBPopup) && param1 != _modalSBPopup)
|
||||
{
|
||||
_prevModalSBPopup = _modalSBPopup;
|
||||
}
|
||||
_modalSBPopup = param1;
|
||||
if(_modalSBPopup == null && Boolean(_loc3_))
|
||||
{
|
||||
_modalSBPopup = _loc3_;
|
||||
_prevModalSBPopup = null;
|
||||
}
|
||||
}
|
||||
|
||||
public static function checkModalSBPopup(param1:SBPopup, param2:Boolean) : Boolean
|
||||
{
|
||||
if(_modalSBPopup == null)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
if(_modalSBPopup != param1)
|
||||
{
|
||||
if(param2)
|
||||
{
|
||||
_modalSBPopup.alpha = 0.5;
|
||||
}
|
||||
else
|
||||
{
|
||||
_modalSBPopup.alpha = 1;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
public static function getBlurFilter(param1:Number = 2, param2:Number = 2, param3:int = 3) : BlurFilter
|
||||
{
|
||||
var _loc4_:BlurFilter = new BlurFilter();
|
||||
_loc4_.blurX = param1;
|
||||
_loc4_.blurY = param2;
|
||||
_loc4_.quality = param3;
|
||||
return _loc4_;
|
||||
}
|
||||
|
||||
public static function getColorFilter(param1:Number = 1, param2:Number = 1, param3:Number = 1, param4:Number = 1) : ColorMatrixFilter
|
||||
{
|
||||
var _loc5_:Array = new Array();
|
||||
_loc5_ = _loc5_.concat([param2,0,0,0,0]);
|
||||
_loc5_ = _loc5_.concat([0,param3,0,0,0]);
|
||||
_loc5_ = _loc5_.concat([0,0,param4,0,0]);
|
||||
_loc5_ = _loc5_.concat([0,0,0,param1,0]);
|
||||
return new ColorMatrixFilter(_loc5_);
|
||||
}
|
||||
|
||||
public static function setAllPopupEffects(param1:Array = null) : void
|
||||
{
|
||||
var _loc2_:SBPopup = null;
|
||||
for each(_loc2_ in popups)
|
||||
{
|
||||
_loc2_.setFilters(param1);
|
||||
}
|
||||
}
|
||||
|
||||
public static function setAllModalPopupEffects(param1:Array = null) : void
|
||||
{
|
||||
var _loc2_:SBPopup = null;
|
||||
for each(_loc2_ in popups)
|
||||
{
|
||||
if(_loc2_.modal)
|
||||
{
|
||||
_loc2_.setFilters(param1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static function closeAll() : void
|
||||
{
|
||||
var _loc1_:SBPopup = null;
|
||||
modalSBPopup = null;
|
||||
for each(_loc1_ in popups)
|
||||
{
|
||||
if(_loc1_.visible)
|
||||
{
|
||||
_loc1_.close();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static function destroyAll() : void
|
||||
{
|
||||
var _loc1_:SBPopup = null;
|
||||
modalSBPopup = null;
|
||||
for each(_loc1_ in popups)
|
||||
{
|
||||
_loc1_.destroy();
|
||||
}
|
||||
while(popups.length > 0)
|
||||
{
|
||||
popups.pop();
|
||||
}
|
||||
}
|
||||
|
||||
public static function destroyNonSBPopups() : void
|
||||
{
|
||||
var _loc1_:Object = null;
|
||||
for each(_loc1_ in nonSBPopups)
|
||||
{
|
||||
_loc1_.destroy();
|
||||
}
|
||||
while(nonSBPopups.length > 0)
|
||||
{
|
||||
nonSBPopups.pop();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user