package characterCreateMenu.contents
{
import characterCreateMenu.data.CharacterData;
import characterCreateMenu.event.CreateMenuEvModel;
import fl.transitions.easing.Strong;
import flash.display.Sprite;
import flash.events.Event;
import flash.text.TextField;
import ncsoft.l2.core.L2UIComponent;
import ncsoft.l2.events.L2UIEvent;
import ncsoft.l2.events.L2UIToolTipEvent;
import ncsoft.l2.native.L2UISystem;
import scaleform.clik.controls.RadioButton;
import scaleform.clik.motion.Tween;
import scaleform.gfx.InteractiveObjectEx;
public class CreateMenuTopCenter extends L2UIComponent
{
internal static var _instance:CreateMenuTopCenter;
public var race_0:RadioButton;
public var race_1:RadioButton;
public var race_2:RadioButton;
public var race_3:RadioButton;
public var race_4:RadioButton;
public var race_5:RadioButton;
public var race_6:RadioButton;
public var race_7:RadioButton;
public var race_8:RadioButton;
public var msgBox:Sprite;
internal var txtBox:TextField;
public var tween:Tween;
public function CreateMenuTopCenter()
{
super();
_instance = this;
this.tween = new Tween(2000,this.msgBox);
this.tween.paused = true;
this.msgBox.alpha = 0;
}
public static function get Instance() : CreateMenuTopCenter
{
return _instance;
}
override protected function configUI() : void
{
var _loc2_:RadioButton = null;
super.configUI();
var _loc1_:int = 0;
while(_loc1_ < CharacterData.MAX_RACE)
{
_loc2_ = getChildByName("race_" + _loc1_) as RadioButton;
dispatchEvent(new L2UIToolTipEvent(L2UIToolTipEvent.REGISTER_ELEMENT,_loc2_));
_loc1_++;
}
this.race_0.group.addEventListener(Event.CHANGE,this.HandleChange);
this.addEvent();
this.txtBox = this.msgBox.getChildByName("systemMsg") as TextField;
this.SetTooltips();
InteractiveObjectEx.setHitTestDisable(this.msgBox,true);
InteractiveObjectEx.setHitTestDisable(this.txtBox,true);
}
protected function addEvent() : void
{
CreateMenuEvModel.evData.addEventListener("STEP_CHANGED_1",this.handleSetStep1);
CreateMenuEvModel.evData.addEventListener("EV_OnShow",this.handleOnShow);
}
private function handleSetStep1(param1:L2UIEvent) : void
{
var _loc2_:Number = Number(param1._parameter.obj.race);
(getChildByName("race_" + this.GetRaceIndexByRacdID(_loc2_)) as RadioButton).selected = true;
}
private function GetRaceIndexByRacdID(param1:Number) : int
{
switch(param1)
{
case 30:
return 7;
case 31:
return 8;
default:
return param1;
}
}
public function handleOnShow(param1:L2UIEvent) : void
{
this.tween.paused = true;
this.msgBox.alpha = 0;
this.checkform();
}
private function checkform() : void
{
var _loc4_:RadioButton = null;
var _loc5_:int = 0;
var _loc8_:RadioButton = null;
var _loc1_:int = 90;
var _loc2_:Boolean = L2UISystem.isClassicServer();
var _loc3_:Array = new Array();
this.race_6.visible = !_loc2_;
this.race_7.visible = L2UISystem.isAdenServer();
this.race_8.visible = L2UISystem.isAdenServer();
if(L2UISystem.isAdenServer())
{
_loc3_.push(8);
}
_loc3_.push(0);
_loc3_.push(1);
_loc3_.push(2);
_loc3_.push(3);
_loc3_.push(4);
if(_loc2_)
{
if(L2UISystem.isAdenServer())
{
_loc3_.push(7);
}
_loc3_.push(5);
}
else if(!_loc2_)
{
_loc3_.push(5);
_loc3_.push(6);
}
var _loc6_:int = _loc3_.length * _loc1_;
var _loc7_:int = _loc6_ / 2 - _loc1_;
_loc4_ = getChildByName("race_" + _loc3_.pop()) as RadioButton;
_loc4_.x = _loc7_;
while(_loc3_.length > 0)
{
_loc8_ = getChildByName("race_" + _loc3_.pop()) as RadioButton;
_loc8_.visible = true;
_loc8_.x = _loc4_.x - _loc1_;
_loc4_ = _loc8_;
}
}
internal function SetTooltips() : void
{
var _loc2_:String = null;
var _loc3_:RadioButton = null;
var _loc1_:Number = 0;
while(_loc1_ < CharacterData.MAX_RACE)
{
_loc2_ = L2UISystem.getSystemString(CharacterData.raceNameStr[_loc1_]);
_loc3_ = getChildByName("race_" + _loc1_) as RadioButton;
_loc3_.label = _loc2_;
_loc1_++;
}
}
internal function HandleChange(param1:Event) : void
{
CreateMenuCenterRight.Instance.handleChange(param1);
}
public function ShowMsg(param1:String) : void
{
this.tween.paused = true;
this.tween.duration = 1000;
this.tween.delay = 0;
this.msgBox.alpha = 0;
this.tween.quickSet({"props":{"alpha":1}});
this.tween.ease = Strong.easeOut;
this.txtBox.htmlText = param1;
this.tween.onComplete = this.MsgBoxStartCompleted;
this.tween.paused = false;
}
public function HideMsg() : void
{
this.tween.paused = true;
this.tween.duration = 2000;
this.tween.delay = 3000;
this.tween.quickSet({"props":{"alpha":0}});
this.tween.ease = Strong.easeIn;
this.tween.onComplete = null;
this.tween.paused = false;
}
internal function MsgBoxStartCompleted() : void
{
this.HideMsg();
}
}
}
Просто кнопку сверху с артеей убратьПосмотреть вложение 85276
На 464 кнопку скрыл без проблем. Или чет другое нужно?
Посмотреть вложение 85276
На 464 кнопку скрыл без проблем. Или чет другое нужно?
*** Скрытый текст не может быть процитирован. ***
скинь ui4.ugx*** Скрытый текст не может быть процитирован. ***
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?