mirror of
https://github.com/burrow-dev/burrow-server.git
synced 2026-11-19 09:37:50 -05:00
66 lines
2.2 KiB
ActionScript
66 lines
2.2 KiB
ActionScript
package gui
|
|
{
|
|
public class ItemWindowPattern extends ItemWindowBase
|
|
{
|
|
|
|
public static const TYPE_SWATCH:String = "swatch";
|
|
|
|
public static const TYPE_MESSAGE:String = "message";
|
|
|
|
public static const TYPE_POST:String = "post";
|
|
|
|
private var _type:String;
|
|
|
|
private var _patternIndexOrName:Object;
|
|
|
|
private var _colorIndexOrName:Object;
|
|
|
|
public function ItemWindowPattern(param1:Function, param2:Object, param3:String, param4:int, param5:Function, param6:Function, param7:Function, param8:Function, param9:Object)
|
|
{
|
|
this._type = param9.type;
|
|
this._patternIndexOrName = param9.patternIndex != null ? param9.patternIndex : param4 + 1;
|
|
this._colorIndexOrName = param9.colorIndex != null ? param9.colorIndex : 1;
|
|
super(param2,param1,param2,param3,param4,param5,param6,param7,param8,false);
|
|
}
|
|
|
|
override protected function setChildrenAndInitialConditions() : void
|
|
{
|
|
if(_window)
|
|
{
|
|
_window.gotoAndStop(this._type);
|
|
_window[this._type + "Btn"].gotoAndStop(this._colorIndexOrName);
|
|
if(_window[this._type + "Btn"].messageBodyCont != null)
|
|
{
|
|
_window[this._type + "Btn"].messageBodyCont.gotoAndStop(this._colorIndexOrName);
|
|
}
|
|
_window[this._type + "Btn"].pattern.gotoAndStop(this._patternIndexOrName);
|
|
}
|
|
}
|
|
|
|
public function getCurrentPatternIndex() : int
|
|
{
|
|
return _window[this._type + "Btn"].pattern.currentFrame;
|
|
}
|
|
|
|
public function setPatternAndColor(param1:Object, param2:Object) : void
|
|
{
|
|
this._colorIndexOrName = param2;
|
|
this._patternIndexOrName = param1;
|
|
this.setChildrenAndInitialConditions();
|
|
}
|
|
|
|
public function setColor(param1:Object) : void
|
|
{
|
|
this._colorIndexOrName = param1;
|
|
this.setChildrenAndInitialConditions();
|
|
}
|
|
|
|
public function setPattern(param1:Object) : void
|
|
{
|
|
this._patternIndexOrName = param1;
|
|
this.setChildrenAndInitialConditions();
|
|
}
|
|
}
|
|
}
|
|
|