class UIToolWnd extends UICommonAPI;

//const DIALOGID_Gohome = 0;

var string m_WindowName;
var WindowHandle Me;
var ButtonHandle transBtn;
var ButtonHandle debugBtn;
var ButtonHandle uiBtn;
var ButtonHandle reloaduiBtn;
var ButtonHandle evemsgBtn;
var ButtonHandle uioffBtn;
var ButtonHandle showWBtn;
var ButtonHandle skillBtn;
var ButtonHandle killBtn;
var ButtonHandle weightBtn;
var ButtonHandle diaBtn;

var EditBoxHandle HEdit0;
var EditBoxHandle HEdit;

var EditBoxHandle NEdit;

var ListCtrlHandle WindowListCtrl;

var array<string> arrWinList;

var UIEasyLoginWnd easyLoginScript;

//var DialogBox	dScript;

//var INT64 tempN;
//var bool tempB;
//var bool tempResultB;
//var String tempOper;
//var EditBoxHandle m_ResultEditBox;

var WindowHandle m_dialogWnd;

function OnLoad()
{
	SetClosingOnESC();

	OnRegisterEvent();
	Me = GetWindowHandle("UIToolWnd");
	transBtn = GetButtonHandle("UIToolWnd.Tab0.transBtn");
	debugBtn = GetButtonHandle("UIToolWnd.Tab0.debugBtn");
	uiBtn = GetButtonHandle("UIToolWnd.Tab0.uiBtn");
	reloaduiBtn = GetButtonHandle("UIToolWnd.Tab0.reloaduiBtn");
	evemsgBtn = GetButtonHandle("UIToolWnd.Tab0.evemsgBtn");
	uioffBtn = GetButtonHandle("UIToolWnd.Tab0.uioffBtn");
	showWBtn = GetButtonHandle("UIToolWnd.Tab0.showWBtn");
	skillBtn = GetButtonHandle("UIToolWnd.Tab0.skillBtn");
	killBtn = GetButtonHandle("UIToolWnd.Tab0.killBtn");
	weightBtn = GetButtonHandle("UIToolWnd.Tab0.weightBtn");
	diaBtn = GetButtonHandle("UIToolWnd.Tab0.diaBtn");
	HEdit0 = GetEditBoxHandle("UIToolWnd.Tab1.HEdit0");
	HEdit = GetEditBoxHandle("UIToolWnd.Tab1.HEdit");
	NEdit = GetEditBoxHandle("UIToolWnd.Tab2.NEdit");
	WindowListCtrl = GetListCtrlHandle("UIToolWnd.Tab2.WindowListCtrl");
	easyLoginScript = UIEasyLoginWnd(GetScript("UIEasyLoginWnd"));
	setWindowTitleByString("UITool");
	setArr();
	SortButtonsTab0();
}

function OnRegisterEvent()
{
	RegisterEvent(EV_DialogOK);
	RegisterEvent(EV_DialogCancel);

	// ЕЧЅєЖ® їл АМєҐЖ®(ґЩАМѕу·О±Ч №ЪЅє)
	//RegisterEvent(EV_Test_7);
}

function OnEvent(int a_EventID, String a_Param)
{
	switch(a_EventID)
	{
		case EV_Test_7:
			dialogShowTest(a_Param);
			break;
	}
}

function dialogShowTest(string param)
{
	local int nSystemString, nSystemMessage, nHtml, nWidth, nHeight;

	local string dialogStr, customIconTexture;

	ParseInt(param, "html", nHtml);
	ParseInt(param, "width", nWidth);
	ParseInt(param, "height", nHeight);

	ParseInt(param, "systemString", nSystemString);
	ParseInt(param, "systemMessage", nSystemMessage);

	ParseString(param, "string", dialogStr);
	ParseString(param, "customIconTexture", customIconTexture);

	//htmlStr = "<br1><font name='hs9' color='FFDF4C'>ѕЖАОЗП»зµе</font> <font name=\"hs9\" color='00DF4C'>Е©·РєсЅєЖ®</font>АЗ ИыА» №ЮѕТґЩ. °Ў°шЗТ ёнБЯ·В°ъ °ш°Э·ВАё·О ±ЧµйАЗ АыїЎ°Ф °шЖчё¦ БЦѕъ°н ЖЇИч, ±ЧµйАЗ °Ў°шЗТ ї¬»з јУµµґВ АыµйАМ Бў±ЩЗП±в АьїЎ ±ЧµйА» їµїшЗС ѕИЅДїЎ µй°Ф ЗЯґЩ.";

	DialogHide();
	DialogSetID(34567891);
	if(dialogStr == "")
	{
		dialogStr = GetSystemMessage(nSystemMessage);
		if(dialogStr == "")
		{
			dialogStr = GetSystemString(nSystemString);
		}
	}

	if(nWidth == 0)
	{
		nWidth = 319;
	}
	if(nHeight == 0)
	{
		nHeight = 143;
	}

	DialogShow(DialogModalType_Modalless, DialogType_Warning, dialogStr, string(Self), nWidth, nHeight, numToBool(nHtml), customIconTexture);
}

function OnHide()
{
	SetINIString("UIToolWnd", "nEdit", nEdit.GetString(), "UIDEV.ini");
}

function onShow()
{
	local string stringValue;

	stringValue = "";	

	// Event Param 
	GetINIString("UIToolWnd", "nEdit", stringValue, "UIDEV.ini");
	nEdit.SetString(stringValue);

	if(easyLoginScript.getUseEasyLogin())
		GetButtonHandle("UIToolWnd.Tab0.EasyLogin").SetNameText("EZLogin On");
	else
		GetButtonHandle("UIToolWnd.Tab0.EasyLogin").SetNameText("EZLogin Off");
}

function OnClickButton(String a_ButtonID)
{
	local UIDebugWnd util;
	local bool bFlag;

	util = UIDebugWnd(GetScript("UIDebugWnd"));
	Debug("a_ButtonID" @ a_ButtonID);
	switch(a_ButtonID)
	{
		case "initBtn":
			initButtonClick();
			break;
		case "transBtn":
			if(transBtn.GetButtonName() == "HideOff")
			{
				ExecuteCommand("//hide off");
				transBtn.SetNameText("HideOn");
			}
			else
			{
				ExecuteCommand("//hide on");
				transBtn.SetNameText("HideOff");
			}
			break;
		case "debugBtn":
			ExecuteCommand("///uidebug");
			break;
		case "uiBtn":
			ExecuteCommand("///ui");
			break;
		case "reloaduiBtn":
			ExecuteCommand("///reloadui");
			break;
		case "evemsgBtn":
			if(evemsgBtn.GetButtonName() == "EvMsgON")
			{
				evemsgBtn.SetNameText("EvMsgOFF");
			}
			else
			{
				evemsgBtn.SetNameText("EvMsgON");
			}
			ExecuteCommand("///eventmsg");
			break;
			///gfx
			///delgfxall
			///delgfx "ЖДАПАМё§"
		case "showWBtn":
			ExecuteCommand("///show windowname");
			break;
		case "skillBtn":
			ExecuteCommand("//setskill 7029 3");
			break;
		case "killBtn":
			ExecuteCommand("//죽어");
			break;
		case "weightBtn":
			if(weightBtn.GetButtonName() == "WeightOFF")
			{
				ExecuteCommand("//무게 켬");
				weightBtn.SetNameText("WeightON");
			}
			else
			{
				ExecuteCommand("//무게 끔");
				weightBtn.SetNameText("WeightOFF");
			}
			break;
		case "gfxBtn":
			ExecuteCommand("///gfx");
			break;
		case "delgfxBtn":
			ExecuteCommand("///delgfxall");
			break;
		case "loadBtn":
			loadButtonClick();
			break;
		case "htmlBtn":
			htmlButtonClick();
			break;
		case "winBtn":
			winButtonClick();
			break;
		case "shoWBBtn":
			ExecuteCommand("///show windowbox");
			break;
		case "allBtn":
			ExecuteCommand("//올스킬");
			break;
		case "evnBtn":
			MakeEventBuff2();
			break;
		case "PowerTool":
			LoadWindowClick("UIPowerToolWnd");
			break;
		case "UITrace":
			util.ShowWindow();
			break;
		case "ServerHtml":
			LoadWindowClick("UIServerHtmlToolWnd");
			break;
		case "HtmlTool":
			LoadWindowClick("UIHtmlToolWnd");
			break;
		case "QuestTool":
			LoadWindowClick("UIQuestToolWnd");
			break;
		case "ItemTool":
			LoadWindowClick("UIItemToolWnd");
			break;
		case "GFXTester":
			CallGFxFunction("containerHUD", "showDebugTool", "");
			break;
		case "ShowUI":
			LoadWindowClick("UIOpenToolWnd");
			break;
		case "UIButton":
			toggleWindow("UIButtonTestWnd", true);
			break;
		// ЗГ·ЎЅГ·О ёёµз µр№ц±Ч
		//case "GfxDebug":
		//	ExecuteEvent(EV_Test_8, "");
			break;
		case "EasyLogin":
			bFlag = easyLoginScript.getUseEasyLogin();
			if(bFlag)
				GetButtonHandle("UIToolWnd.Tab0.EasyLogin").SetNameText("EasyLogin Off");
			else
				GetButtonHandle("UIToolWnd.Tab0.EasyLogin").SetNameText("EasyLogin On");
			
			easyLoginScript.setUseEasyLogin(!bFlag);
			break;
		case "GammaOff":
			SetOptionFloat("Video", "Gamma", 0);
			break;
		case "JobTree":
			ShowWindow("JobTreeWnd");
			break;
		case "mapSearchButton":
			toggleWindow("UISearchMapWnd", true);
			break;
		case "Tween":
			toggleWindow("UITweenTestWnd", true);
			break;
		case "Viewport":
			toggleWindow("EffectTester", true);
			break;
		case "htmlEditorButton":
			Debug("html");
			toggleWindow("UIHtmlTestEditor", true);
			break;
		case "UISoundButton":
			toggleWindow("UISoundWnd", true);
			break;
		case "UIEffectButton":
			toggleWindow("UIEffectViewportTester", true);
			break;
	}
}

function LoadWindowClick(string WindowName)
{
	local WindowHandle NewWindow;

	NewWindow = GetWindowHandle(WindowName);
	NewWindow.ShowWindow();
	NewWindow.SetFocus();
}

function initButtonClick()
{
	ExecuteCommand("//투명 끔");
	ExecuteCommand("//무적 on");
	ExecuteCommand("//속도 5");
	ExecuteCommand("///uidebug");
	ExecuteCommand("///autocom");
}

function loadButtonClick()
{
	local string str;
	local array<string> arrStr;
	
	//arrStr[0] = "";
	//arrStr[1] = "";

	str = HEdit0.GetString();	
	Split(str, ".", arrStr);

	if(arrStr[1] != "")
	{
		//debug("111@@@"$str);
		ExecuteCommand("//loadhtml " $ str);
	}
	else
	{
		//debug("222@@@"$str);
		ExecuteCommand("//loadhtml " $ str $ ".htm");
	}
}

function htmlButtonClick()
{
	local ItemDescWnd Script;
	local string str;
	local array<string> arrStr;
	
	//arrStr[0] = "";
	//arrStr[1] = "";

	str = HEdit.GetString();	
	Split(str, ".", arrStr);

	// ShowWindow("ItemDescWnd");

	Script = ItemDescWnd(GetScript("ItemDescWnd"));
	//Script.ShowWindow("ItemDescWnd");
	
	if(arrStr[1] != "")
	{
		Script.ShowHelp(GetLocalizedL2TextPathNameUC() $ str);
	}
	else
	{
		Script.ShowHelp(GetLocalizedL2TextPathNameUC() $ str $ ".htm");
	}
}


function winButtonClick()
{
	local WindowHandle NewWindow;
	local string str;

	str = NEdit.GetString();

	if(str != "")
	{
		NewWindow = GetWindowHandle(NEdit.GetString());
		NewWindow.ShowWindow();
		NewWindow.SetFocus();
	}	
}

//·№ДЪµеё¦ Е¬ёЇЗПёй....
function OnClickListCtrlRecord(string ListCtrlID)
{
	local LVDataRecord	record;	
	
	switch(ListCtrlID)
	{
		case "WindowListCtrl":
			WindowListCtrl.GetSelectedRec(record);
			class'UIAPI_EDITBOX'.static.SetString("UIToolWnd.NEdit", record.LVDataList[0].szData);
			break;
	}
}

//·№ДЪµеё¦ ґхєнЕ¬ёЇЗПёй....
function OnDBClickListCtrlRecord(string ListCtrlID)
{
	local LVDataRecord	record;	
	local WindowHandle NewWindow;

	switch(ListCtrlID)
	{
		case "WindowListCtrl" :
			WindowListCtrl.GetSelectedRec(record);
			NewWindow = GetWindowHandle(record.LVDataList[0].szData);
			NewWindow.ShowWindow();
			NewWindow.SetFocus();
			break;
	}
}

function MakeWindowList()
{
	local LVDataRecord Record;
	local int i;	

	NEdit.ClearAdditionalSearchList(ESearchListType.SLT_ADDITIONAL_LIST);

	
	for(i = 0 ; i < arrWinList.Length ; i++)
	{
		Record.LVDataList.length = 1;
		Record.LVDataList[0].szData = arrWinList[i];
		class'UIAPI_LISTCTRL'.static.InsertRecord("UIToolWnd.WindowListCtrl", Record);

		NEdit.AddNameToAdditionalSearchList(Record.LVDataList[0].szData, ESearchListType.SLT_ADDITIONAL_LIST);
	}	
}

function MakeEventBuff2()
{
	local string					strParam;
	local int							 i;


	/*
	ParseInt(param, "ServerID", info.ServerID);
	ParseInt(param, "Max", Max);
	
	Debug("<<<<>>>>>>" $ param);


	//debug("//////////////////////////test_abnormal////////////////////////" $ Max);
	for(i=0; i<Max; i++)
	{
		ParseItemIDWithIndex(param, info.ID, i);
		ParseInt(param, "SkillLevel_" $ i, info.Level);
		ParseInt(param, "RemainTime_" $ i, info.RemainTime);
		ParseString(param, "Name_" $ i, info.Name);
		ParseString(param, "IconName_" $ i, info.IconName);
		ParseString(param, "Description_" $ i, info.Description);
	*/

	ParamAdd(strParam, "ServerID", String(1229005689));
	ParamAdd(strParam, "Max", String(70));

	for(i = 0 ; i < 36 ; i++)
	{
		ParamAdd(strParam, "ClassID_"$i, String(11259));
		ParamAdd(strParam, "SkillLevel_"$i, String(4));
		ParamAdd(strParam, "RemainTime_"$i, String(13));
		ParamAdd(strParam, "Name_"$i, "јиѕаАЗ і«АО");
		ParamAdd(strParam, "IconName_"$i, "icon.skill1263");
		ParamAdd(strParam, "Description_"$i, "ЕЧЅєЖ®їлАё·О ё¶±ё ВпґВ µр№цЗБ¤»¤»");
	}

	for(i = 36 ; i < 70 ; i++)
	{
		ParamAdd(strParam, "ClassID_"$i, String(1040));
		ParamAdd(strParam, "SkillLevel_"$i, String(1));
		ParamAdd(strParam, "RemainTime_"$i, String(942));
		ParamAdd(strParam, "Name_"$i, "ЅЗµе");
		ParamAdd(strParam, "IconName_"$i, "icon.skill1040");
		ParamAdd(strParam, "Description_"$i, "ЕЧЅєЖ®їлАё·О ё¶±ё ВпґВ µр№цЗБ¤»¤»");
	}
	/*
	for(i = 10 ; i < 20 ; i++)
	{
		ParamAdd(strParam, "ClassID_"$i, String(11260));
		ParamAdd(strParam, "SkillLevel_"$i, String(4));
		ParamAdd(strParam, "RemainTime_"$i, String(13));
		ParamAdd(strParam, "Name_"$i, "јиѕаАЗ і«АО");
		ParamAdd(strParam, "IconName_"$i, "icon.skill1263");
		ParamAdd(strParam, "Description_"$i, "ЕЧЅєЖ®їлАё·О ё¶±ё ВпґВ µр№цЗБ¤»¤»");
	}
*/
	ExecuteEvent(EV_AbnormalStatusNormalItem, strParam);
}

function SortButtonsTab0()
{
	local array<WindowHandle> ChildList;
	local int i;
	local int X;
	local int Y;

	GetWindowHandle("UIToolWnd.Tab0").GetChildWindowList(ChildList);
	
	for(i = 0;i < ChildList.Length; i++)
	{
		ChildList[i].SetWindowSize(93,30);
		X = int((i % 3))* 94 + 1;
		Y = i / 3 * 32 + 9;
		ChildList[i].SetAnchor("UIToolWnd.Tab0","TopLeft","TopLeft",X,Y);
	}
}

function MakeEventBuff()
{
	local string					strParam;
	local int							 i;
	local TargetStatusWnd	 script;

	script = TargetStatusWnd(GetScript("TargetStatusWnd"));
	script.HandleSkillCancel();

	ParamAdd(strParam, "TargetID", String(100));
	ParamAdd(strParam, "Max", String(40));

	for(i = 0 ; i < 10 ; i++)
	{
		ParamAdd(strParam, "Level_"$i, String(1));
		ParamAdd(strParam, "Sec_"$i, String(100));
		ParamAdd(strParam, "Count_"$i, String(1));
		ParamAdd(strParam, "OwnerShip_"$i, String(1));
	}

	ParamAdd(strParam, "ClassID_0", String(92));
	ParamAdd(strParam, "ClassID_1", String(101));
	ParamAdd(strParam, "ClassID_2", String(102));
	ParamAdd(strParam, "ClassID_3", String(105));
	ParamAdd(strParam, "ClassID_4", String(115));
	ParamAdd(strParam, "ClassID_5", String(129));
	ParamAdd(strParam, "ClassID_6", String(1069));
	ParamAdd(strParam, "ClassID_7", String(1083));
	ParamAdd(strParam, "ClassID_8", String(1160));
	ParamAdd(strParam, "ClassID_9", String(1164));


	for(i = 10 ; i < 20 ; i++)
	{
		ParamAdd(strParam, "Level_"$i, String(1));
		ParamAdd(strParam, "Sec_"$i, String(100));
		ParamAdd(strParam, "Count_"$i, String(1));
		ParamAdd(strParam, "OwnerShip_"$i, String(0));
	}

	ParamAdd(strParam, "ClassID_10", String(92));
	ParamAdd(strParam, "ClassID_11", String(101));
	ParamAdd(strParam, "ClassID_12", String(102));
	ParamAdd(strParam, "ClassID_13", String(105));
	ParamAdd(strParam, "ClassID_14", String(115));
	ParamAdd(strParam, "ClassID_15", String(129));
	ParamAdd(strParam, "ClassID_16", String(1069));
	ParamAdd(strParam, "ClassID_17", String(1083));
	ParamAdd(strParam, "ClassID_18", String(1160));
	ParamAdd(strParam, "ClassID_19", String(1164));	

	for(i = 20 ; i < 30 ; i++)
	{
		ParamAdd(strParam, "Level_"$i, String(1));
		ParamAdd(strParam, "Sec_"$i, String(10));
		ParamAdd(strParam, "Count_"$i, String(1));
		ParamAdd(strParam, "OwnerShip_"$i, String(1));
	}

	ParamAdd(strParam, "ClassID_20", String(77));
	ParamAdd(strParam, "ClassID_21", String(78));
	ParamAdd(strParam, "ClassID_22", String(82));
	ParamAdd(strParam, "ClassID_23", String(91));
	ParamAdd(strParam, "ClassID_24", String(99));
	ParamAdd(strParam, "ClassID_25", String(112));
	ParamAdd(strParam, "ClassID_26", String(113));
	ParamAdd(strParam, "ClassID_27", String(118));
	ParamAdd(strParam, "ClassID_28", String(121));
	ParamAdd(strParam, "ClassID_29", String(137));

	for(i = 30 ; i < 40 ; i++)
	{
		ParamAdd(strParam, "Level_"$i, String(1));
		ParamAdd(strParam, "Sec_"$i, String(10));
		ParamAdd(strParam, "Count_"$i, String(1));
		ParamAdd(strParam, "OwnerShip_"$i, String(0));
	}

	ParamAdd(strParam, "ClassID_30", String(77));
	ParamAdd(strParam, "ClassID_31", String(78));
	ParamAdd(strParam, "ClassID_32", String(82));
	ParamAdd(strParam, "ClassID_33", String(91));
	ParamAdd(strParam, "ClassID_34", String(99));
	ParamAdd(strParam, "ClassID_35", String(112));
	ParamAdd(strParam, "ClassID_36", String(113));
	ParamAdd(strParam, "ClassID_37", String(118));
	ParamAdd(strParam, "ClassID_38", String(121));
	ParamAdd(strParam, "ClassID_39", String(137));

	ExecuteEvent(EV_TargetSpelledList, strParam);
}


function setArr()
{
	local int index;

	// uclist.int	(Interface\CLASSES\ ЖъґхїЎј­ »МѕЖј­ №ЩІЩ±в·О Б¤ё®);
	index = 0;

	arrWinList[index++] = "AbnormalStatusWnd";
	arrWinList[index++] = "ActionWnd";
	arrWinList[index++] = "AdenaDistributionResultWnd";
	arrWinList[index++] = "AdenaDistributionWnd";
	arrWinList[index++] = "AgeWnd";
	arrWinList[index++] = "AgitDecoDrawerWnd";
	arrWinList[index++] = "AgitDecoWnd";
	arrWinList[index++] = "AITimerWnd";
	arrWinList[index++] = "AlchemyItemConversionWnd";
	arrWinList[index++] = "AlchemyMixCubeWnd";
	arrWinList[index++] = "AlchemyOpener";
	arrWinList[index++] = "AlchemySkillCollectionWnd";
	arrWinList[index++] = "AlchemySkillLearnWnd";
	arrWinList[index++] = "AlchemySkillWnd";
	arrWinList[index++] = "AlterSkill";
	arrWinList[index++] = "AlterSkillJump";
	arrWinList[index++] = "AnniveEvent";
	arrWinList[index++] = "AnniveEventLauncher";
	arrWinList[index++] = "AnnounceMessage";
	arrWinList[index++] = "ArchiveHotLinkWnd";
	arrWinList[index++] = "ArchiveViewWnd";
	arrWinList[index++] = "ArenaCharacterInfoWnd";
	arrWinList[index++] = "ArenaDualManager";
	arrWinList[index++] = "ArenaMapGuidance";
	arrWinList[index++] = "ArenaMatchGroupWnd";
	arrWinList[index++] = "ArenaMatchWnd";
	arrWinList[index++] = "ArenaPickWnd";
	arrWinList[index++] = "ArenaRankingWnd";
	arrWinList[index++] = "ArenaRevivalWnd";
	arrWinList[index++] = "ArenaScoreBoardHUD";
	arrWinList[index++] = "ArenaScoreBoardWnd";
	arrWinList[index++] = "ArenaSkillUpgrade";
	arrWinList[index++] = "ArenaTutorialWnd";
	arrWinList[index++] = "ArmorEnchantEffectTestWnd";
	arrWinList[index++] = "ArmyTrainingCenterBottomWnd";
	arrWinList[index++] = "ArmyTrainingCenterWnd";
	arrWinList[index++] = "AttendCheckWnd";
	arrWinList[index++] = "AttributeEnchantWnd";
	arrWinList[index++] = "AttributeRemoveWnd";
	arrWinList[index++] = "AuctionNextWnd";
	arrWinList[index++] = "AuctionWnd";
	arrWinList[index++] = "AutoShotItemWnd";
	arrWinList[index++] = "AwakeViewWnd";
	arrWinList[index++] = "BeautyShop";
	arrWinList[index++] = "BenchMarkMenuWnd";
	arrWinList[index++] = "BirthdayAlarmBtn";
	arrWinList[index++] = "BirthdayAlarmWnd";
	arrWinList[index++] = "BlockCounter";
	arrWinList[index++] = "BlockCurTriggerWnd";
	arrWinList[index++] = "BlockCurWnd";
	arrWinList[index++] = "BlockEnterWnd";
	arrWinList[index++] = "BoardWnd";
	arrWinList[index++] = "BOTsystemWnd";
	arrWinList[index++] = "BR_CampaignAlarmWnd";
	arrWinList[index++] = "BR_CampaignTopContributorListWnd";
	arrWinList[index++] = "BR_CashShopAPI";
	arrWinList[index++] = "BR_CashShopReceiverListAddWnd";
	arrWinList[index++] = "BR_EventChristmasWnd";
	arrWinList[index++] = "BR_EventDefaultWnd";
	arrWinList[index++] = "BR_EventFastivalInkWnd";
	arrWinList[index++] = "BR_EventFireWnd";
	arrWinList[index++] = "BR_EventHalloweenTodayWnd";
	arrWinList[index++] = "BR_EventHalloweenWnd";
	arrWinList[index++] = "BR_EventHtmlWndA";
	arrWinList[index++] = "BR_EventHtmlWndB";
	arrWinList[index++] = "BR_EventHtmlWndC";
	arrWinList[index++] = "BR_MiniGameRankWnd";
	arrWinList[index++] = "BR_MyShopWnd";
	arrWinList[index++] = "BR_NewBuyingWnd";
	arrWinList[index++] = "BR_NewCashShopReceiverListWnd";
	arrWinList[index++] = "BR_NewCashShopWnd";
	arrWinList[index++] = "BR_NewPresentBuyingWnd";
	arrWinList[index++] = "BR_PathWnd";
	arrWinList[index++] = "BuilderCmdWnd";
	arrWinList[index++] = "CalculatorWnd";
	arrWinList[index++] = "CampaignAlarmWnd";
	arrWinList[index++] = "CampaignTopContributorListWnd";
	arrWinList[index++] = "CardDrawEventWnd";
	arrWinList[index++] = "CardExchange";
	arrWinList[index++] = "CardExchangeB";
	arrWinList[index++] = "CardExchangeC";
	arrWinList[index++] = "CharacterCreateMenuWnd";
	arrWinList[index++] = "CharacterPasswordHelpHtmlWnd";
	arrWinList[index++] = "CharacterPasswordWnd";
	arrWinList[index++] = "ChatAlertMessage";
	arrWinList[index++] = "ChatWnd";
	arrWinList[index++] = "ClanDrawerWnd";
	arrWinList[index++] = "ClanDrawerWndClassic";
	arrWinList[index++] = "ClanGfxWnd";
	arrWinList[index++] = "ClanPledgeBonusDrawerWnd";
	arrWinList[index++] = "ClanRaidsWnd";
	arrWinList[index++] = "ClanSearch";
	arrWinList[index++] = "ClanShopEditWnd";
	arrWinList[index++] = "ClanShopWnd";
	arrWinList[index++] = "ClanWnd";
	arrWinList[index++] = "ClanWndClassicNew";
	arrWinList[index++] = "CleftCounter";
	arrWinList[index++] = "CleftCurTriggerWnd";
	arrWinList[index++] = "CleftCurWnd";
	arrWinList[index++] = "CleftEnterWnd";
	arrWinList[index++] = "ColorNickNameWnd";
	arrWinList[index++] = "ConsoleWnd";
	arrWinList[index++] = "ContainerHUD";
	arrWinList[index++] = "ContainerWindow";
	arrWinList[index++] = "ContextMenu";
	arrWinList[index++] = "CouponEventWnd";
	arrWinList[index++] = "Credit";
	arrWinList[index++] = "CrystallizationWnd";
	arrWinList[index++] = "DamageText";
	arrWinList[index++] = "DeliverWnd";
	arrWinList[index++] = "DepthOfField";
	arrWinList[index++] = "DetailStatusWnd";
	arrWinList[index++] = "DetailStatusWndClassic";
	arrWinList[index++] = "DialogBox";
	arrWinList[index++] = "DominionWarInfoWnd";
	arrWinList[index++] = "DuelManager";
	arrWinList[index++] = "EffectTester";
	arrWinList[index++] = "ElementalSpiritWnd";
	arrWinList[index++] = "EnsoulExtractSubWnd";
	arrWinList[index++] = "EnsoulExtractWnd";
	arrWinList[index++] = "EnsoulSubWnd";
	arrWinList[index++] = "EnsoulWnd";
	arrWinList[index++] = "EnvTestWnd";
	arrWinList[index++] = "ErtheiaTestWnd";
	arrWinList[index++] = "EventBalthus";
	arrWinList[index++] = "EventChristmasWnd";
	arrWinList[index++] = "EventInfoWnd";
	arrWinList[index++] = "EventKalie";
	arrWinList[index++] = "EventMatchGMFenceWnd";
	arrWinList[index++] = "EventMatchGMMsgWnd";
	arrWinList[index++] = "EventMatchGMWnd";
	arrWinList[index++] = "EventMatchObserverWnd";
	arrWinList[index++] = "EventMatchSpecialMsgWnd";
	arrWinList[index++] = "ExpBar";
	arrWinList[index++] = "FactionWnd";
	arrWinList[index++] = "FileListWnd";
	arrWinList[index++] = "FileRegisterWnd";
	arrWinList[index++] = "FileWnd";
	arrWinList[index++] = "Fishing";
	arrWinList[index++] = "FishViewportWnd";
	arrWinList[index++] = "FlightShipCtrlWnd";
	arrWinList[index++] = "FlightTeleportWnd";
	arrWinList[index++] = "FlightTransformCtrlWnd";
	arrWinList[index++] = "GametipWnd";
	//arrWinList[index++] = "GfxDebug";
	arrWinList[index++] = "GfxDialog";
	arrWinList[index++] = "GfxScreenMessage";
	arrWinList[index++] = "GfxScreenMessageBG";
	arrWinList[index++] = "GMClanWnd";
	arrWinList[index++] = "GMDetailStatusWnd";
	arrWinList[index++] = "GMFindTreeWnd";
	arrWinList[index++] = "GMInventoryWnd";
	arrWinList[index++] = "GMMagicSkillWnd";
	arrWinList[index++] = "GMQuestWnd";
	arrWinList[index++] = "GMSnoopWnd";
	arrWinList[index++] = "GMWarehouseWnd";
	arrWinList[index++] = "GMWnd";
	arrWinList[index++] = "HairshopWnd";
	arrWinList[index++] = "HDRRenderTestWnd";
	arrWinList[index++] = "HelpHtmlWnd";
	arrWinList[index++] = "HelpWnd";
	arrWinList[index++] = "HennaInfoPremiumWnd";
	arrWinList[index++] = "HennaInfoWnd";
	arrWinList[index++] = "HennaListWnd";
	arrWinList[index++] = "HeroTowerWnd";
	arrWinList[index++] = "HeroTowerWndWorld";
	arrWinList[index++] = "InfoWnd";
	arrWinList[index++] = "IngameNoticeWnd";
	arrWinList[index++] = "IngameShopWnd";
	arrWinList[index++] = "IngameWebWnd";
	arrWinList[index++] = "InstancedZoneHistoryWnd";
	arrWinList[index++] = "InventoryViewer";
	arrWinList[index++] = "InventoryWnd";
	arrWinList[index++] = "InviteClanPopWnd";
	arrWinList[index++] = "InviteClanPopWndClassic";
	arrWinList[index++] = "ItemAttributeChangeWnd";
	arrWinList[index++] = "ItemDescWnd";
	arrWinList[index++] = "ItemEnchantWnd";
	arrWinList[index++] = "ItemJewelEnchantSubWnd";
	arrWinList[index++] = "ItemJewelEnchantWnd";
	arrWinList[index++] = "ItemLockSubWnd";
	arrWinList[index++] = "ItemLockWnd";
	arrWinList[index++] = "ItemLookChangeWnd";
	arrWinList[index++] = "ItemUpgrade";
	arrWinList[index++] = "JobTreeWnd";
	arrWinList[index++] = "KillpointCounterWnd";
	arrWinList[index++] = "KillpointRankTrigger";
	arrWinList[index++] = "KillPointRankWnd";
	arrWinList[index++] = "L2UIGFxScript";
	arrWinList[index++] = "L2UIGFxScriptNoneContainer";
	arrWinList[index++] = "L2UIToolTip";
	arrWinList[index++] = "L2Util";
	arrWinList[index++] = "LoadingWnd";
	arrWinList[index++] = "LoadingWnd_cn";
	arrWinList[index++] = "LoadingWnd_de";
	arrWinList[index++] = "LoadingWnd_e";
	arrWinList[index++] = "LoadingWnd_eu";
	arrWinList[index++] = "LoadingWnd_fr";
	arrWinList[index++] = "LoadingWnd_id";
	arrWinList[index++] = "LoadingWnd_j";
	arrWinList[index++] = "LoadingWnd_k";
	arrWinList[index++] = "LoadingWnd_ph";
	arrWinList[index++] = "LoadingWnd_pl";
	arrWinList[index++] = "LoadingWnd_ru";
	arrWinList[index++] = "LoadingWnd_th";
	arrWinList[index++] = "LoadingWnd_tr";
	arrWinList[index++] = "LoadingWnd_tw";
	arrWinList[index++] = "LobbyMenuWnd";
	arrWinList[index++] = "LogIn";
	arrWinList[index++] = "LogInEula";
	arrWinList[index++] = "LogInLoading";
	arrWinList[index++] = "LogInMenu";
	arrWinList[index++] = "LoginServerSelect";
	arrWinList[index++] = "LoginSystemMessageWnd";
	arrWinList[index++] = "LuckyGame";
	arrWinList[index++] = "MacroEditWnd";
	arrWinList[index++] = "MacroListWnd";
	arrWinList[index++] = "MacroPresetWnd";
	arrWinList[index++] = "MagicSkillDrawerWnd";
	arrWinList[index++] = "MagicskillGuideWnd";
	arrWinList[index++] = "MagicSkillWnd";
	arrWinList[index++] = "MailBtnWnd";
	arrWinList[index++] = "MainMenu";
	arrWinList[index++] = "ManorCropInfoChangeWnd";
	arrWinList[index++] = "ManorCropInfoSettingWnd";
	arrWinList[index++] = "ManorCropSellChangeWnd";
	arrWinList[index++] = "ManorCropSellWnd";
	arrWinList[index++] = "ManorInfoWnd";
	arrWinList[index++] = "ManorSeedInfoChangeWnd";
	arrWinList[index++] = "ManorSeedInfoSettingWnd";
	arrWinList[index++] = "ManorShopWnd";
	arrWinList[index++] = "Menu";
	arrWinList[index++] = "MiniGame1Wnd";
	arrWinList[index++] = "MiniMapGfxWnd";
	arrWinList[index++] = "MinimapMissionWnd";
	arrWinList[index++] = "MinimapWnd";
	arrWinList[index++] = "MonsterArenaResultWnd";
	arrWinList[index++] = "MonsterBookDetailedInfo";
	arrWinList[index++] = "MonsterBookWnd";
	arrWinList[index++] = "MovieCaptureWnd";
	arrWinList[index++] = "MovieCaptureWnd_Expand";
	arrWinList[index++] = "MSProfilerWnd";
	arrWinList[index++] = "MSViewerWnd";
	arrWinList[index++] = "MultiSellWnd";
	arrWinList[index++] = "MultiTimer";
	arrWinList[index++] = "MysteriousMansionControlWnd";
	arrWinList[index++] = "MysteriousMansionMenuWnd";
	arrWinList[index++] = "MysteriousMansionResultWnd";
	arrWinList[index++] = "MysteriousMansionRoomListWnd";
	arrWinList[index++] = "MysteriousMansionStatusWnd";
	arrWinList[index++] = "NewPetitionFeedBackResultWnd";
	arrWinList[index++] = "NewPetitionFeedBackWnd";
	arrWinList[index++] = "NewPetitionFeedBackWnd_2nd";
	arrWinList[index++] = "NewPetitionWnd";
	arrWinList[index++] = "NewUserPetitionDrawerWnd";
	arrWinList[index++] = "NewUserPetitionWnd";
	arrWinList[index++] = "NoticeWnd";
	arrWinList[index++] = "NPCDialogWnd";
	arrWinList[index++] = "NPCViewerWnd";
	arrWinList[index++] = "ObserverWnd";
	arrWinList[index++] = "OlympiadArenaListWnd";
	arrWinList[index++] = "OlympiadBuff1Wnd";
	arrWinList[index++] = "OlympiadBuff2Wnd";
	arrWinList[index++] = "OlympiadBuffWnd";
	arrWinList[index++] = "OlympiadControlWnd";
	arrWinList[index++] = "OlympiadGuideWnd";
	arrWinList[index++] = "OlympiadPlayer1Wnd";
	arrWinList[index++] = "OlympiadPlayer2Wnd";
	arrWinList[index++] = "OlympiadPlayerWnd";
	arrWinList[index++] = "OlympiadResultWnd";
	arrWinList[index++] = "OlympiadScoreBoardHUD";
	arrWinList[index++] = "OlympiadTargetWnd";
	arrWinList[index++] = "OlympiadWnd";
	arrWinList[index++] = "OptionWnd";
	arrWinList[index++] = "PacketTest";
	arrWinList[index++] = "PartyMatchMakeRoomWnd";
	arrWinList[index++] = "PartyMatchOutWaitListWnd";
	arrWinList[index++] = "PartyMatchRoomWnd";
	arrWinList[index++] = "PartyMatchWaitListWnd";
	arrWinList[index++] = "PartyMatchWnd";
	arrWinList[index++] = "PartyMatchWndCommon";
	arrWinList[index++] = "PartyWnd";
	arrWinList[index++] = "PartyWndArena";
	arrWinList[index++] = "PartyWndOption";
	arrWinList[index++] = "PCViewerWnd";
	arrWinList[index++] = "PersonalConnectionsDrawerWnd";
	arrWinList[index++] = "PersonalConnectionsWnd";
	arrWinList[index++] = "PetitionFeedBackWnd";
	arrWinList[index++] = "PetitionWnd";
	arrWinList[index++] = "PetStatusWnd";
	arrWinList[index++] = "PetWnd";
	arrWinList[index++] = "PlayerAgeWnd";
	arrWinList[index++] = "PlayerSkillGauge";
	arrWinList[index++] = "PledgeCreateWnd";
	arrWinList[index++] = "PostBoxWnd";
	arrWinList[index++] = "PostDetailWnd_General";
	arrWinList[index++] = "PostDetailWnd_SafetyTrade";
	arrWinList[index++] = "PostEffectTestWnd";
	arrWinList[index++] = "PostReceiverListAddWnd";
	arrWinList[index++] = "PostReceiverListWnd";
	arrWinList[index++] = "PostWriteWnd";
	arrWinList[index++] = "PremiumItemAlarmWnd";
	arrWinList[index++] = "PremiumItemGetWnd";
	arrWinList[index++] = "PrivateMarketWnd";
	arrWinList[index++] = "PrivateShopWnd";
	arrWinList[index++] = "PrivateShopWndHistory";
	arrWinList[index++] = "PrivateShopWndReport";
	arrWinList[index++] = "ProductInventoryDrawerWnd";
	arrWinList[index++] = "ProductInventoryHelpHtmlWnd";
	arrWinList[index++] = "ProductInventoryWnd";
	arrWinList[index++] = "ProgressBox";
	arrWinList[index++] = "PVBuilderCmdWnd";
	arrWinList[index++] = "PVPCounter";
	arrWinList[index++] = "PVPCounterTrigger";
	arrWinList[index++] = "PVPDetailedWnd";
	arrWinList[index++] = "PVShortcutWnd";
	arrWinList[index++] = "QuestAlarmWnd";
	arrWinList[index++] = "QuestBtnWnd";
	arrWinList[index++] = "QuestHTMLWnd";
	arrWinList[index++] = "QuestListWnd";
	arrWinList[index++] = "QuestTreeDrawerWnd";
	arrWinList[index++] = "QuestTreeWnd";
	arrWinList[index++] = "QuestTutorialWnd";
	arrWinList[index++] = "QuitReportDrawerWnd";
	arrWinList[index++] = "QuitReportWnd";
	arrWinList[index++] = "RadarMapWnd";
	arrWinList[index++] = "RecipeBookWnd";
	arrWinList[index++] = "RecipeBuyListWnd";
	arrWinList[index++] = "RecipeBuyManufactureWnd";
	arrWinList[index++] = "RecipeManufactureWnd";
	arrWinList[index++] = "RecipeShopWnd";
	arrWinList[index++] = "RecipeTreeWnd";
	arrWinList[index++] = "RecommendBonusHelpHtmlWnd";
	arrWinList[index++] = "RecommendBonusWnd";
	arrWinList[index++] = "RefineryWnd";
	arrWinList[index++] = "ReplayListWnd";
	arrWinList[index++] = "ReplayLogoWnd";
	arrWinList[index++] = "ReplayLogoWnd_cn";
	arrWinList[index++] = "ReplayLogoWnd_de";
	arrWinList[index++] = "ReplayLogoWnd_e";
	arrWinList[index++] = "ReplayLogoWnd_eu";
	arrWinList[index++] = "ReplayLogoWnd_fr";
	arrWinList[index++] = "ReplayLogoWnd_id";
	arrWinList[index++] = "ReplayLogoWnd_j";
	arrWinList[index++] = "ReplayLogoWnd_k";
	arrWinList[index++] = "ReplayLogoWnd_ph";
	arrWinList[index++] = "ReplayLogoWnd_pl";
	arrWinList[index++] = "ReplayLogoWnd_ru";
	arrWinList[index++] = "ReplayLogoWnd_th";
	arrWinList[index++] = "ReplayLogoWnd_tr";
	arrWinList[index++] = "ReplayLogoWnd_tw";
	arrWinList[index++] = "RestartMenuWnd";
	arrWinList[index++] = "Sample";
	arrWinList[index++] = "SceneClipView";
	arrWinList[index++] = "SceneEditorSlideWnd";
	arrWinList[index++] = "SceneEditorWnd";
	arrWinList[index++] = "SeedShopWnd";
	arrWinList[index++] = "SelectDeliverWnd";
	arrWinList[index++] = "SellingAgencyWnd";
	arrWinList[index++] = "ShaderBuild";
	arrWinList[index++] = "SheathingWnd";
	arrWinList[index++] = "ShopWnd";
	arrWinList[index++] = "Shortcut";
	arrWinList[index++] = "ShortcutWnd";
	arrWinList[index++] = "ShortcutWndArena";
	arrWinList[index++] = "SiegeInfoWnd";
	arrWinList[index++] = "SiegeReportWnd";
	arrWinList[index++] = "SkillLearnWnd";
	arrWinList[index++] = "SkillTrainClanTreeWnd";
	arrWinList[index++] = "SkillTrainInfoWnd";
	arrWinList[index++] = "SkillTrainListWnd";
	arrWinList[index++] = "SSAOWnd";
	arrWinList[index++] = "SSQMainBoard";
	arrWinList[index++] = "StatusWnd";
	arrWinList[index++] = "SummonedStatusWnd";
	arrWinList[index++] = "SummonedWnd";
	arrWinList[index++] = "SummonedWndClassic";
	arrWinList[index++] = "SystemMsgWnd";
	arrWinList[index++] = "TargetStatusBuff1Wnd";
	arrWinList[index++] = "TargetStatusBuff2Wnd";
	arrWinList[index++] = "TargetStatusWnd";
	arrWinList[index++] = "TargetStatusWndArena";
	arrWinList[index++] = "TeleportBookMarkDrawerWnd";
	arrWinList[index++] = "TeleportBookMarkWnd";
	arrWinList[index++] = "ToDoListClanWnd";
	arrWinList[index++] = "ToDoListWnd";
	arrWinList[index++] = "TokenTradeWnd";
	arrWinList[index++] = "Tooltip";
	arrWinList[index++] = "ToolTipWnd";
	arrWinList[index++] = "TownMapWnd";
	arrWinList[index++] = "TradeWnd";
	arrWinList[index++] = "TutorialBtnWnd";
	arrWinList[index++] = "TutorialViewerWnd";
	arrWinList[index++] = "UICommandWnd";
	arrWinList[index++] = "UICommonAPI";
	arrWinList[index++] = "UIConstants";
	arrWinList[index++] = "UIData";
	arrWinList[index++] = "UIDebugWnd";
	arrWinList[index++] = "UIDevTestWnd";
	arrWinList[index++] = "UIDevTestWnd_SubFrameWnd";
	arrWinList[index++] = "UIEasyLoginWnd";
	arrWinList[index++] = "UIEditor_ControlManager";
	arrWinList[index++] = "UIEditor_DocumentInfo";
	arrWinList[index++] = "UIEditor_FileManager";
	arrWinList[index++] = "UIEditor_PropertyController";
	arrWinList[index++] = "UIEditor_Worksheet";
	arrWinList[index++] = "UIHtmlToolWnd";
	arrWinList[index++] = "UIItemToolWnd";
	arrWinList[index++] = "UIOpenToolWnd";
	arrWinList[index++] = "UIPowerToolWnd";
	arrWinList[index++] = "UIQuestToolWnd";
	arrWinList[index++] = "UISearchMapWnd";
	arrWinList[index++] = "UIServerHtmlToolWnd";
	arrWinList[index++] = "UISysMsgToolWnd";
	arrWinList[index++] = "UIToolWnd";
	arrWinList[index++] = "UnionDetailWnd";
	arrWinList[index++] = "UnionDetailWndClassic";
	arrWinList[index++] = "UnionMatchDrawerWnd";
	arrWinList[index++] = "UnionMatchMakeRoomWnd";
	arrWinList[index++] = "UnionMatchWnd";
	arrWinList[index++] = "UnionWnd";
	arrWinList[index++] = "UniversalToolTip";
	arrWinList[index++] = "UnrefineryWnd";
	arrWinList[index++] = "UserAlertMessage";
	arrWinList[index++] = "UserPetitionWnd";
	arrWinList[index++] = "ViewPortElementalSpirit";
	arrWinList[index++] = "ViewPortWndArena";
	arrWinList[index++] = "ViewPortWndBase";
	arrWinList[index++] = "ViewPortWndEffect";
	arrWinList[index++] = "ViewPortWndMonster";
	arrWinList[index++] = "VipInfoWnd";
	arrWinList[index++] = "WarehouseWnd";
	arrWinList[index++] = "WeatherWnd";
	arrWinList[index++] = "WebBrowserWnd";
	arrWinList[index++] = "WebPetitionWnd";
	arrWinList[index++] = "WorldChatBox";
	arrWinList[index++] = "WorldOlympiadResultWnd";
	arrWinList[index++] = "XMasSealWnd";
	arrWinList[index++] = "ZoneQuestAlarmWnd";
	arrWinList[index++] = "ZoneQuestSituationWnd";
	arrWinList[index++] = "ZoneTitleWnd";

	MakeWindowList();
}

/**
 * А©µµїм ESC Е°·О ґЭ±в Гіё® 
 * "Esc" Key
 ***/
function OnReceivedCloseUI()
{
	PlayConsoleSound(IFST_WINDOW_CLOSE);
	GetWindowHandle(m_WindowName).HideWindow();
}

defaultproperties
{
	m_WindowName="UIToolWnd"
}
