mirror of
https://github.com/burrow-dev/burrow-server.git
synced 2026-11-21 01: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,62 @@
|
||||
package gui
|
||||
{
|
||||
import flash.display.DisplayObject;
|
||||
import flash.display.MovieClip;
|
||||
import flash.events.MouseEvent;
|
||||
|
||||
public class ItemWindowGame extends ItemWindowBase
|
||||
{
|
||||
|
||||
public function ItemWindowGame(windowLoaded:Function, currItem:Object, iconLayerName:String, index:int, mouseDown:Function = null, mouseOver:Function = null, mouseOut:Function = null, memberOnlyDown:Function = null, customParams:Object = null)
|
||||
{
|
||||
super("gameBtnCont",windowLoaded,currItem,iconLayerName,index,mouseDown,mouseOver,mouseOut,memberOnlyDown);
|
||||
}
|
||||
|
||||
public function get itemLayer() : MovieClip
|
||||
{
|
||||
return _window.itemLayer;
|
||||
}
|
||||
|
||||
override public function loadCurrItem(currYLocation:int = 0, currXLocation:int = 0) : void
|
||||
{
|
||||
_itemYLocation = currYLocation;
|
||||
_itemXLocation = currXLocation;
|
||||
if(Boolean(_currItem) && !_isCurrItemLoaded)
|
||||
{
|
||||
_isCurrItemLoaded = true;
|
||||
if(_iconLayerName != "" && _currItem.hasOwnProperty(_iconLayerName))
|
||||
{
|
||||
_window.itemLayer.addChild(_currItem[_iconLayerName]);
|
||||
}
|
||||
else
|
||||
{
|
||||
_window.itemLayer.addChild(DisplayObject(_currItem));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
override protected function addEventListeners() : void
|
||||
{
|
||||
if(Boolean(_window))
|
||||
{
|
||||
if(_mouseDown != null)
|
||||
{
|
||||
addEventListener(MouseEvent.MOUSE_DOWN,_mouseDown,false,0,true);
|
||||
}
|
||||
if(_mouseOver != null)
|
||||
{
|
||||
addEventListener(MouseEvent.ROLL_OVER,_mouseOver,false,0,true);
|
||||
}
|
||||
if(_mouseOut != null)
|
||||
{
|
||||
addEventListener(MouseEvent.ROLL_OUT,_mouseOut,false,0,true);
|
||||
}
|
||||
if(_memberOnlyDown != null)
|
||||
{
|
||||
addEventListener(MouseEvent.MOUSE_DOWN,_memberOnlyDown,false,0,true);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user