/*------------------------------------------------------------------------------------------------------------------------

 제목     : 번신체 UI - SCALEFORM UI

 event ID : 
 npc 

 - 빌드 명령어 - 
풀 리스트 요청 
//costume_list 

각인서 사용(각인서 서버아이디)
//costume_useitem [item sid]

진화
//costume_evolution [costume id] [material costume id1~5]

추출
//costume_extract [extract costume id] [amount]

잠금
//costume_lock [costume id] [on/off]

즐겨찾기 리스트 요청
//costume_shortcut_list

즐겨찾기 변경
//costume_shortcut_change [page] [slot] [costumeid]

------------------------------------------------------------------------------------------------------------------------*/
class CostumeWnd extends L2UIGFxScriptNoneContainer;
                                 
function OnRegisterEvent()
{	
	RegisterGFxEvent ( EV_CostumeUseItem ) ;            // 20250 
	RegisterGFxEvent ( EV_CostumeChooseItem ) ;         // 20251
	RegisterGFxEvent ( EV_CostumeList ) ;               // 20252
	RegisterGFxEvent ( EV_CostumeEvolution ) ;          // 20253
	RegisterGFxEvent ( EV_CostumeExtract ) ;            // 20254
	RegisterGFxEvent ( EV_CostumeLock ) ;               // 20255
	RegisterGFxEvent ( EV_CostumeShortCutList ) ;       // 20256
	RegisterGFxEvent ( EV_CostumeFullList ) ;           // 20257
	RegisterGFxEvent ( EV_CostumeCollectSkillActive ) ; // 20258
	RegisterGFxEvent(EV_AdenaInvenCount);
	RegisterGFxEvent ( EV_RESTART ) ;                   
}


function OnLoad()
{		
	//AddState( "GAMINGSTATE" );

	//SetContainerWindow(WINDOWTYPE_NONE, 0);		

	SetClosingOnESC();
	AddState( "GAMINGSTATE" );

	// SetDefaultShow( true ) ;

	SetAnchor("", EAnchorPointType.ANCHORPOINT_CenterCenter, EAnchorPointType.ANCHORPOINT_CenterCenter, 0,0);
}

function OnShow()
{
	//class'UIAPI_WINDOW'.static.HideWindow("CardDrawEventWnd");
	//View포트를 같이 사용 하므로, 끄는 기능인데 따로 만들자.
	if (class'UIAPI_WINDOW'.static.IsShowWindow("CardDrawEventWnd"))
		class'UIAPI_WINDOW'.static.HideWindow("CardDrawEventWnd");

	if (class'UIAPI_WINDOW'.static.IsShowWindow("ItemUpgrade"))
		class'UIAPI_WINDOW'.static.HideWindow("ItemUpgrade");

	//if (class'UIAPI_WINDOW'.static.IsShowWindow("ElementalSpiritWnd"))
	//	class'UIAPI_WINDOW'.static.HideWindow("ElementalSpiritWnd");	

	super.onShow();

	L2Util(GetScript("L2Util")).ItemRelationWindowHide(getCurrentWindowName(String(self)));
}

//function onFocus ( bool bFlag, bool bTransparency ) 
//{
//	//if ( bFlag ) 
//	//{
//	//	class'UIAPI_WINDOW'.static.BringToFront("EffectWnd") ;
//	//	if (IsShowWindow("QuitReportWnd")) GetWindowHandle("QuitReportWnd").ShowWindow();
//	//}	
//}

function OnFlashLoaded()
{	 
	//RegisterDelegateHandler(EDelegateHandlerType.EDHandler_UpgradeSystemWnd);
	RegisterDelegateHandler(EDelegateHandlerType.EDHandler_Costume);
	RegisterDelegateHandler(EDelegateHandlerType.EDHandler_Container);
	RegisterDelegateHandler(EDelegateHandlerType.EDHandler_Default);
	RegisterDelegateHandler(EDelegateHandlerType.EDHandler_GameData);
	//옵션 관련 델리게이트
	RegisterDelegateHandler(EDelegateHandlerType.EDHandler_Option);
	//에디셔널 스킬 . 스킬 사용 관련
	RegisterDelegateHandler(EDelegateHandlerType.EDHandler_UseSkill);
	//SetRenderOnTop(true);
	//SetAlwaysOnTop(true);
	//SetAlwaysFullAlpha(true);
}

function onCallUCFunction( string functionName, string param )
{
	//local string strParam;
	////Debug("sampe's onCallUCFunction" @ functionName @ param);
	//switch ( functionName ) 
	//{
	//	case "OpenHelpHTML" :
	//		ParamAdd(strParam, "FilePath", "..\\L2text\\item_upgrade_system_help001.htm");
	//		ExecuteEvent(EV_ShowHelp, strParam);
	//		break;		
	//}
}

//function onEvent ( int id, string param) 
//{
//	switch ( id ) 
//	{
//	//	case EV_UpdateMyHP : HandleUpdateHP( param ) ;break;
//		// case EV_RestartMenuShow : ShowWindow() ;break;
//		// case EV_RestartMenuHide : 
//		// case EV_Restart :hideWindow() ;break;

//		//case EV_Test_8 :ShowWindow() ;break;
		
//	}
//}


//event OnMouseOut( WindowHandle w )
//{
//	dispatchEventToFlash_String(0, "");
//	//강제로 마우스 위치를 0,0으로.
//	//ForceToMoveMousePos( 0, 0 );
//}

//event onMouseOver ( WindowHandle w )
//{
//	dispatchEventToFlash_String(1, "");
//}


//function dispatchEventToFlash_String(int Event_ID, string argString){
//	local array<GFxValue> args;
//	local GFxValue invokeResult;

//	AllocGFxValues(args, 2);
//	AllocGFxValue(invokeResult);
//	args[0].SetInt(Event_ID);
//	CreateObject(args[1]);

////	Debug("argString"@argString);
//	args[1].SetMemberString("string", argString );

//	Invoke("onEvent", args, invokeResult);
//	DeallocGFxValue(invokeResult);
//	DeallocGFxValues(args);
//}
defaultproperties
{
}
