Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //------------------------------------------------------------------------------------------------------------------------
- //
- // Б¦ёс : MainMenu ї№Аь SystemMenuWndАЗ ЅєДЙАПЖы №цАь - SCALEFORM UI
- // : MenuWnd.uc + SystemMenuWnd.uc
- // ёЮАО ёЮґє
- //
- //------------------------------------------------------------------------------------------------------------------------
- class MainMenu extends L2UIGFxScript;
- /*
- //ЗГ·ЎЅ¬ їЙјВ БВЗҐ
- const FLASH_XPOS = 0;
- const FLASH_YPOS = -21;
- //SubMenu іРАМ Flash ГЦґл 250 ~ ГЦјТ 166±оБц ё·ѕЖіхАЅ.
- const SUBMENUWIDTH = 166;
- // БЯ±№ ВКАє ёЮґє°Ў ГС10°і, °Ў·О 5°і (202ЗИјї), ЗС±№Ає166 °Ў·О4°і ,µОБЩ ГС 8°і
- const MAINMENUWIDTH = 166;
- //ёЮАО ёЮґє ё®ЅєЖ® №иї
- var array<string> LIST;
- //ёЮАО ёЮґє ЕшЖБ №иї
- var array<string> LISTCOMMAND;
- //ёЮАО ёЮґє АМё§ №иї
- var array<int> LISTMENUNAME;
- //јєк1 ёЮґє ё®ЅєЖ® №иї
- var array<string> LISTSUB1;
- //јєк2 ёЮґєАЗ јєк1 №иї
- var array<int> LISTSUB2NUM;
- //јєк1 ёЮґє ЕшЖБ №иї
- var array<string> LISTSUB1COMMAND;
- //јєк2 ёЮґє ё®ЅєЖ® №иї
- var array<string> LISTSUB2;
- //ЗцАз БцїЄ PeaceZoneАО°Ў
- var int IsPeaceZone;
- //ёЮґєё¦ ЗС№ш ёёµй±в А§ЗС єЇјц
- var bool IsStart;
- //UIїл UC
- var L2Util util;
- var toolTipWnd toolTipWndGFXScript;
- //ґЬГаЕ° ЕшЖБїл
- var string groupName;
- const DIALOGID_Gohome = 4420;
- */
- function OnRegisterEvent()
- {
- /*
- RegisterEvent( EV_GamingStateEnter );
- RegisterEvent( EV_ShowWindow );
- RegisterEvent( EV_DialogOK );
- RegisterEvent( EV_DialogCancel );
- RegisterEvent( EV_StateChanged );
- RegisterEvent( EV_SetRadarZoneCode ); //branch 111109*/
- }
- function OnLoad()
- {
- /*
- SetClosingOnESC();
- registerState( "MainMenu", "GamingState" );
- //SetAlwaysFullAlpha( true );
- SetHavingFocus( false );
- SetHUD();//nextFocus ё¦ №«ЅГ ±вБёїЎґВ SetDefaultShow °Ў µСґЩ Гіё® ЗЯАёіЄ єРё®
- SetDefaultShow(true);
- SetAnchor( "", EAnchorPointType.ANCHORPOINT_BottomRight, EAnchorPointType.ANCHORPOINT_TopLeft, 0, 0 );
- //SetAnchor( "", EAnchorPointType.ANCHORPOINT_BottomRight, EAnchorPointType.ANCHORPOINT_BottomRight, FLASH_XPOS, FLASH_YPOS );
- groupName = "GamingStateShortcut";
- IsStart = false;
- //ёЮАО ёЮґє »эјєїл №иї »эјє
- SetLISTDATA();
- util = L2Util(GetScript("L2Util"));
- toolTipWndGFXScript = toolTipWnd(GetScript("toolTipWnd")); */
- }
- /*
- function OnShow()
- {
- // empty
- }
- function OnFlashLoaded()
- {
- // empty
- }
- function OnHide(){}
- function OnFocus(bool bFlag, bool bTransparency)
- {
- local array<GFxValue> args;
- local GFxValue invokeResult;
- AllocGFxValues(args,2);
- args[0].setbool(bflag);
- args[1].setbool(bTransparency);
- AllocGFxValue(invokeResult);
- Invoke("_root.onFocus", args, invokeResult);
- DeallocGFxValue(invokeResult);
- DeallocGFxValues(args);
- }
- function OnCallUCLogic( int logicID, string param )
- {
- local string strSection;
- ParseString(param, "strSection", strSection);
- if( logicID == 0 )
- {
- switch( strSection )
- {
- //ДщЅєЖ®
- case "Quest":
- ToggleOpenQuestWnd();
- break;
- //ЗчёНѕЧјЗ
- case "Clan":
- ToggleOpenClanWnd();
- break;
- //АОёЖ°ьё®
- case "Personal":
- ToggleOpenPersonalConnectionsWnd();
- break;
- //ЅєЕі&ё¶№э
- case "Skill":
- ToggleOpenSkillWnd();
- break;
- //ДіёЇЕН Б¤єё
- case "Char":
- ToggleOpenCharInfoWnd();
- break;
- //АОєҐЕдё®
- case "Inven":
- ToggleOpenInventoryWnd();
- break;
- //ѕЧјЗ
- case "Action":
- ToggleOpenActionWnd();
- break;
- //Бцµµ
- case "Map":
- RequestOpenMinimap();
- break;
- }
- }
- //Sub1 ёЮґєїЎј єёі»ґВ °Є
- else if( logicID == 1 )
- {
- switch( strSection )
- {
- case "Quit":
- ExecuteEvent(EV_OpenDialogQuit);
- break;
- case "Restart":
- ExecuteEvent(EV_OpenDialogRestart);
- break;
- //їЙјЗГў ї±в
- case "Option":
- HandleShowOptionWnd();
- break;
- //ёЕЕ©·О
- case "Macro":
- ExecuteEvent(EV_MacroShowListWnd);
- break;
- //ґЬГаЕ°
- case "Shortcut":
- HandleShowShortcutAssignWnd();
- break;
- //јєсЅє
- case "Service":
- //ѕшАЅ
- break;
- //ГЯ°Ў±вґЙ
- case "Add":
- //ѕшАЅ
- break;
- //Бцµµ
- case "Map":
- RequestOpenMinimap();
- break;
- //№Ъ№°°ь > »иБ¦20121109
- /*
- case "Museum":
- ExecuteEvent(EV_StatisticWndshow);
- break;
- */
- //°ФЅГЖЗ
- case "Board":
- HandleShowBoardWnd();
- break;
- //°ФЅГЖЗ/№Ї°нґдЗП±в
- case "QABoard":
- handleShowQABoardWnd();
- break;
- //MSN ёЮЅЕБ®
- /*13.01.23 АМИД »иБ¦ µЛґПґЩ.
- case "MSN":
- ToggleMsnWindow();
- break;
- */
- //АОёЖ°ьё®
- case "Personal":
- ToggleOpenPersonalConnectionsWnd();
- break;
- //ЖДЖјёЕДЄ
- case "Party":
- HandlePartyMatchWnd();
- break;
- //їмЖнЗФ
- case "Post":
- HandleShowPostBoxWnd();
- break;
- //°іАО»уБЎ
- case "Shop":
- //ѕшАЅ
- break;
- //»уЗ° АОєҐЕдё®
- case "Product":
- HandleShowProductInventory();
- break;
- //µµїтё»
- case "Help":
- HandleShowHelpHtmlWnd();
- break;
- //БшБ¤
- case "Petition":
- HandleShowPetitionBegin();
- break;
- case "instanceZone":
- HandleShowInstanceZone();
- break;
- //PC№ж АМєҐЖ®
- case "PC":
- HandleShowPCWnd();
- break;
- //24Hz
- /*
- case "24Hz":
- W24HzShowWnd();
- break;
- */
- //µїїµ»у імИ
- case "Rec":
- HandleShowMovieCaptureWnd();
- break;
- //ё®ЗГ·№АМ імИ
- case "reRec":
- DoAction( class'UICommonAPI'.static.GetItemID(55) );
- break;
- //ИЁЖдАМБц
- case "Home":
- linkHomePage();
- break;
- //ЖЗёЕ»уБЎ
- case "SellStore":
- DoAction( class'UICommonAPI'.static.GetItemID(10) );
- break;
- //±ёёЕ»уБЎ
- case "BuyStore":
- DoAction( class'UICommonAPI'.static.GetItemID(28) );
- break;
- //АП°эЖЗёЕ»уБЎ
- case "AllSell":
- DoAction( class'UICommonAPI'.static.GetItemID(61) );
- break;
- //»уБЎ°Л»ц
- case "StoreSearch":
- DoAction( class'UICommonAPI'.static.GetItemID(57) );
- break;
- case "ClanSearch":
- HandleShowClanSearch();
- break;
- case "IngameNoticeWnd":
- handleShowInGameNoticeWnd();
- break;
- case "PathToAwakening":
- //9800 ЅЗЗа
- ExecuteEvent( EV_ShowWebPathMainPage );
- break;
- }
- }
- // ЕшЖБ »эјє
- else if( logicID == 10001 )
- {
- toolTipWndGFXScript.externalCall(1, param);
- }
- // ЕшЖБ Б¦°Е
- else if( logicID == 10002 )
- {
- toolTipWndGFXScript.externalCall(2, "");
- }
- }
- function handleShowInGameNoticeWnd()
- {
- local IngameNoticeWnd script;
- script = IngameNoticeWnd ( GetScript("IngameNoticeWnd") );
- script.MainMenuShow();
- }
- function HandleShowClanSearch()
- {
- local string windowName;
- windowName = "ClanSearch";
- if ( class'UIAPI_WINDOW'.static.IsShowWindow (windowName) )
- {
- class'UIAPI_WINDOW'.static.HideWindow(windowName);
- }
- else
- {
- class'UIAPI_WINDOW'.static.ShowWindow(windowName);
- }
- }
- function OnEvent(int Event_ID, string param)
- {
- local int zonetype;
- if( Event_ID == EV_GamingStateEnter )
- {
- if( IsStart == false )
- {
- SetShowWindow();
- CreateMainMenu();
- CreateMainMenuTooltip();
- CreateMenuWidth();
- CreateSub1Menu();
- CreateSUB1Tooltip();
- CreateSub2Menu();
- IsStart = true;
- }
- else
- {
- SetShowWindow();
- CreateSub1Menu();
- CreateSUB1Tooltip();
- CreateSub2Menu();
- }
- }
- else if ( Event_ID == EV_SetRadarZoneCode )
- {
- ParseInt( param, "ZoneCode", zonetype );
- if (zonetype == 12)
- {
- IsPeaceZone = 1;
- }
- else
- {
- IsPeaceZone = 0;
- }
- }
- else if( Event_ID == EV_DialogOK )
- {
- HandleDialogOK();
- }
- else if( Event_ID == EV_ShowWindow )
- {
- HandleSubMenuOpen( param );
- }
- else if( Event_ID == EV_StateChanged )
- {
- HandleStateChange( param );
- }
- }
- function changeEnterChat( string str )
- {
- groupName = str;
- updateTooltip();
- }
- function updateTooltip()
- {
- CreateMainMenuTooltip();
- CreateSUB1Tooltip();
- }
- function HandleStateChange( String state )
- {
- local FlightShipCtrlWnd scriptShip;
- local FlightTransformCtrlWnd scriptTrans;
- if( state == "GAMINGSTATE" )
- {
- scriptShip = FlightShipCtrlWnd ( GetScript("FlightShipCtrlWnd") );
- scriptTrans = FlightTransformCtrlWnd ( GetScript("FlightTransformCtrlWnd") );
- if(GetOptionBool( "CommunIcation", "EnterChatting" ))
- {
- changeEnterChat( "TempStateShortcut" );
- }
- else
- {
- changeEnterChat( "GamingStateShortcut" );
- }
- //
- if(scriptShip.isNowActiveFlightShipShortcut) // єсЗаБ¤ Б¶Бѕ ёрµе¶уёй
- {
- //if(GetOptionBool( "Game", "EnterChatting" )) {class'ShortcutAPI'.static.DeactivateGroup("TempStateShortcut");}
- //Debug("isNowActiveFlightShipShortcut???? єсЗаБ¤ Б¶Бѕ ёрµе¶уёй");
- changeEnterChat( "FlightStateShortcut" );
- //class'ShortcutAPI'.static.ActivateGroup("FlightStateShortcut");
- }
- else if (scriptTrans.isNowActiveFlightTransShortcut ) // єсЗа єЇЅЕГј ёрµе¶уёй
- {
- //Debug("isNowActiveFlightTransShortcut???? єсЗа єЇЅЕГј ёрµе");
- changeEnterChat("FlightTransformShortcut");
- //if(GetOptionBool( "Game", "EnterChatting" )) {class'ShortcutAPI'.static.DeactivateGroup("TempStateShortcut");}
- //class'ShortcutAPI'.static.ActivateGroup("FlightTransformShortcut");
- }
- }
- }
- function HandleSubMenuOpen( string a_Param )
- {
- local string WNDName;
- ParseString(a_Param, "Name", WNDName);
- if( WNDName == "SystemMenuWnd" )
- {
- //ShowWindowWithFocus();
- ShowWindow();
- SetFocus();
- OpenSub1Menu();
- }
- }
- /**
- * ёЮАО ёЮґє ёёµй±в.
- * 0№ш ИЈГв
- */
- function CreateMainMenu()
- {
- dispatchEventToFlash_String(0 , TransArrayToString(LIST));
- }
- /**
- * ёЮґє іРАМ
- */
- function CreateMenuWidth()
- {
- // ЗГ·ЎЅГ ЕёАФ µҐАМЕё АОЅєЕПЅє »эјє
- local array<GFxValue> args;
- local GFxValue invokeResult;
- AllocGFxValues(args, 2);
- AllocGFxValue(invokeResult);
- // °ўјє ѕЛ¶ч : АМєҐЖ® №шИЈ 5№ш
- args[0].SetInt( 5 );
- CreateObject(args[1]);
- args[1].SetMemberInt( "MAINMENUWIDTH" , MAINMENUWIDTH );
- args[1].SetMemberInt( "SUBMENUWIDTH" , SUBMENUWIDTH );
- Invoke( "_root.onEvent", args, invokeResult );
- DeallocGFxValue( invokeResult );
- DeallocGFxValues( args );
- }
- /**
- * Sub1 ёЮґє ёёµй±в.
- */
- function CreateSub1Menu()
- {
- LISTSUB1.remove( 0, LISTSUB1.Length );
- SetLISTSUB1DATA();
- dispatchEventToFlash_String(10 , TransArrayToString(LISTSUB1));
- //Debug("! --- CreateSub1Menu create" @ LISTSUB1.length );
- }
- /**
- * Sub2 ёЮґє ёёµй±в.
- */
- function CreateSub2Menu()
- {
- LISTSUB2.remove( 0, LISTSUB2.Length );
- SetLISTSUB2DATA();
- dispatchEventToFlash_String(20 , TransArrayToString(LISTSUB2));
- //Debug("! --- CreateSub2Menu create" @ LISTSUB2.length);
- }
- /**
- * јєк ёЮґє ї±в.
- */
- function OpenSub1Menu()
- {
- dispatchEventToFlash_String(100 , "");
- }
- /**
- * ЗС±№ѕо ёЮАО ёЮґє јіБ¤.
- */
- function SetLISTDATA()
- {
- local int MAINum;
- MAINum = 0;
- SetLIST( MAINum, 434, "Char", "DetailStatusWnd" ); //ДіёЇЕН Б¤єё
- SetLIST(++MAINum, 1, "Inven","InventoryWnd"); //АОєҐЕдё®
- SetLIST(++MAINum, 197, "Action","ActionWnd"); //ѕЧјЗ
- SetLIST(++MAINum, 196, "Skill","MagicSkillWnd"); //ЅєЕі
- SetLIST(++MAINum, 198, "Quest","QuestTreeWnd"); //ДщЅєЖ®
- SetLIST(++MAINum, 314, "Clan", "ClanWnd"); //ЗчёНѕЧјЗ
- SetLIST(++MAINum, 447, "Map", "MinimapWnd" ); //ёг
- SetLIST(++MAINum, 2641,"Total","SystemMenuWnd"); //ЕлЗХёЮґє
- }
- function SetLIST (int MAINum, int stringNum, string menuID, string tooltipCommand)
- {
- local string MenuName;
- MenuName = GetSystemString(stringNum);
- LIST[MAINum] = MAINum $ "|" $ MenuName $ "|" $ menuID $ "|<NORMAL_FONT13>" $ MenuName $ "<br/><ґЬГаЕ°:>";
- LISTMENUNAME[MAINum]= stringNum;
- LISTCOMMAND[MAINum] = tooltipCommand;
- }
- function CreateMainMenuTooltip()
- {
- local int i;
- local array<string> LISTToolTip;
- for (i=0; i< LISTCOMMAND.Length ; i++)
- {
- // Debug("CreateMainMenuTooltip" @ LISTMENUNAME[i] @ LISTCOMMAND[i]);
- LISTToolTip[i] = setMainShortcutString( LISTMENUNAME[i], LISTCOMMAND[i]);
- }
- dispatchEventToFlash_String(1 , TransArrayToString(LISTToolTip));
- }
- function string TransArrayToString( array<string> arr )
- {
- local int i;
- local string str;
- for( i = 0 ; i < arr.Length ; i ++ )
- {
- if( i != arr.Length - 1 )
- {
- str = str $ arr[i] $ "!";
- }
- else
- {
- str = str $ arr[i];
- }
- }
- return str;
- }
- function SetLISTSUB1DATA()
- {
- local ELanguageType Language;
- local int sub1num;
- local int bValue;
- local bool isClassic;
- isClassic = getInstanceUIData().getIsClassicServer();
- Language = GetLanguage();
- sub1num=0;
- setLISTSUB1( sub1num, 148, "Quit", false, 1, ""); //°ФАУ Бѕ·б
- setLISTSUB1(++sub1num, 147, "Restart", false, 1, ""); //ё®ЅєЕёЖ®
- inputDivision( ); //єРё®ј±--------------------------------------------------------------------
- setLISTSUB1(++sub1num, 146, "Option", false, 1, "OptionWnd"); //їЙјЗ
- setLISTSUB1(++sub1num, 711, "Macro", false, 1, "MacroWnd"); //ёЕЕ©·О
- setLISTSUB1(++sub1num, 1523, "Shortcut",false, 1, ""); //ґЬГаЕ°
- inputDivision( ); //єРё®ј±--------------------------------------------------------------------
- setLISTSUB1(++sub1num, 2643, "Service", true, 1, ""); //јєсЅє
- inputDivision( ); //єРё®ј±--------------------------------------------------------------------
- setLISTSUB1(++sub1num, 2642, "Add_Tooltip", true, 1, ""); //ГЯ°Ў±вґЙ
- //inputDivision( ); //єРё®ј±--------------------------------------------------------------------
- //setLISTSUB1(++sub1num, 2600, "Museum", false, 1, ""); //№Ъ№°°ь > »иБ¦20121109
- inputDivision( ); //єРё®ј±--------------------------------------------------------------------
- setLISTSUB1(++sub1num, 387, "Board", false, 1, "BoardWnd"); //°ФЅГЖЗ
- //13.02.27 АМИД ГЯ°Ў µЛґПґЩ.
- //ЗШїЬїЎј »зїл ЗПБц ѕКґВ ёЮґє 2013.12.06¤У;
- if (Language != ELanguageType.LANG_Korean) bValue = 0;else bValue = 1;
- if ( isClassic ) bValue = 0;
- setLISTSUB1(++sub1num, 3136, "QABoard", false, bValue, ""); //°ФЅГЖЗ/№Ї°нґдЗП±в
- //setLISTSUB1(++sub1num, 387, "QABoard", false, 1, "QABoardWnd"); //°ФЅГЖЗ/№Ї°нґдЗП±в
- //13.01.23 АМИД »иБ¦ µЛґПґЩ.
- // БЯ±№ ВКїЎґВ msn АМ ѕшґЩ.±ЧїЎ µыёҐ ї№їЬ Гіё®
- //if (Language == ELanguageType.LANG_Chinese) GetINIBool("Localize", "UseMsn", bValue, "L2.ini"); //Б¶°З Б¶»з
- //else bValue = 1;
- //setLISTSUB1(++sub1num, 896, "MSN", false, bValue, ""); //ёЮЅЕБ®
- setLISTSUB1(++sub1num, 2383, "Personal",false, 1, "PersonalConnectionsWnd"); //АОёЖ
- setLISTSUB1(++sub1num, 389, "Party", false, 1, "PartyMatchWnd"); //ЖДЖјёЮДЄ
- setLISTSUB1(++sub1num, 3068, "ClanSearch", false, 1, ""); //ЗчёН °ЎАФ
- setLISTSUB1(++sub1num, 2074, "Post", false, 1, "PostWnd"); //їмЖнЗФ
- inputDivision( ); //єРё®ј±--------------------------------------------------------------------
- setLISTSUB1(++sub1num, 498, "Shop", true , 1, ""); //°іАО»уБЎ
- GetINIBool("PrimeShop", "UseGoodsInventory", bValue, "L2.ini"); //Б¶°З Б¶»з
- setLISTSUB1(++sub1num, 2469, "Product", false, bValue, ""); //»уЗ°АОєҐЕдё®
- }
- function setLISTSUB1(int sub1num, int stringNUm, string menuName, bool useSubMenu, int bValue, string tooltip)
- {
- if (bValue == 1) //ЗШґз Б¶°ЗАМ ёВАёёй
- {
- LISTSUB1[LISTSUB1.Length] = sub1num$"|"$GetSystemString(stringNUm)$"|"$menuName$"|"; // ёЮґє АФ·В ѕЖґПёй »иБ¦
- }
- if ( useSubMenu ) //јєк ёЮґє°Ў АЦАёёй
- {
- LISTSUB2NUM[LISTSUB2NUM.Length] = sub1num; //јєкёЮґє №шИЈ АФ·В
- }
- LISTSUB1COMMAND[sub1num] = tooltip; //ЕшЖБїЎ ДїёЗµе АФ·В
- }
- function CreateSUB1Tooltip( )
- {
- local int i;
- local array<string> LISTSUB1ToolTip;
- for ( i =0 ; i< LISTSUB1COMMAND.Length ; i++)
- {
- LISTSUB1ToolTip[i] = setSubShortcutString(LISTSUB1COMMAND[i]);
- }
- dispatchEventToFlash_String(15 , TransArrayToString(LISTSUB1ToolTip));
- }
- function inputDivision( )
- {
- local string divisionStr ;
- divisionStr = "999|єРё®ј±Divi|false|Tooltip";
- if ( LISTSUB1[LISTSUB1.Length - 1] != divisionStr ) //їЙјЗїЎ АЗЗШ ёЮґє°Ў ЕлВ°·О »з¶уБцґВ °жїм µрєсБЇАМ µО№ш µйѕо°ЎґВ °Й №жБц
- {
- LISTSUB1[LISTSUB1.Length] = divisionStr;
- }
- }
- function SetLISTSUB2DATA()
- {
- local int bValue ;
- local int sub2num ;
- local bool isClassic;
- local ELanguageType Language;
- isClassic = getInstanceUIData().getIsClassicServer();
- Language = GetLanguage();
- sub2num =0;
- setLISTSUB2(LISTSUB2NUM[2], sub2num, 2644, "|SellStore|false", 1); //ЖЗёЕ»уБЎ
- setLISTSUB2(LISTSUB2NUM[2], ++sub2num, 2645, "|BuyStore|false", 1); //±ёёЕ»уБЎ
- setLISTSUB2(LISTSUB2NUM[2], ++sub2num, 2646, "|AllSell|false", 1); //АП°эЖЗёЕ»уБЎ
- setLISTSUB2(LISTSUB2NUM[2], ++sub2num, 1283, "|StoreSearch|false", 1); //»уБЎ°Л»ц
- /*-----------------------------------------------------------------------------------------------------------------------------*/
- if ( isClassic ) bValue = 0;else bValue = 1;
- setLISTSUB2(LISTSUB2NUM[1], ++sub2num, 2796, "|InstanceZone|false", bValue); //АОЅєЕПЅє Бё
- //Е¬·ЎЅД ј№цїЎјґВ PC№ж ЖчАОЖ®°Ў єёАМБц ѕКАЅ.
- GetINIBool("Localize", "UsePCBangPoint", bValue, "L2.ini"); //Б¶°З°Л»ц
- if ( isClassic ) bValue = 0;
- setLISTSUB2(LISTSUB2NUM[1], ++sub2num, 1277, "|PC|false", bValue); //PC№ж АМєҐЖ®
- //GetINIBool("URL", "bUse24HZ", bValue, "L2.ini"); //Б¶°З °Л»ц
- //setLISTSUB2(LISTSUB2NUM[1], ++sub2num, 2410, "|24Hz|false", bValue); //24Hz
- setLISTSUB2(LISTSUB2NUM[1], ++sub2num, 2448, "|Rec|false", 1); //µїїµ»у імИ
- setLISTSUB2(LISTSUB2NUM[1], ++sub2num, 2647, "|reRec|false", 1); //ё®ЗГ·№АМ імИ
- /*-----------------------------------------------------------------------------------------------------------------------------*/
- if ( isClassic ) bValue = 0;else bValue = 1;
- setLISTSUB2(LISTSUB2NUM[0], ++sub2num, 145, "|Help|false", bValue); //µµїтё»
- //ЗС±№ їЬїЎјґВ 1:1 БшБ¤ №®АЗ°Ў ѕшАЅ ±ЧїЎ ґЩёҐ ї№їЬ Гіё®
- if (Language != ELanguageType.LANG_Korean) bValue = 0;else bValue = 1;
- setLISTSUB2(LISTSUB2NUM[0], ++sub2num, 470, "|Petition|false", bValue); //БшБ¤
- //ЗШїЬїЎј »зїл ЗПБц ѕКґВ ёЮґє 2013.12.0
- if (Language != ELanguageType.LANG_Korean) bValue = 0;else bValue = 1;
- setLISTSUB2(LISTSUB2NUM[0], ++sub2num, 3169, "|IngameNoticeWnd|false", bValue); //БўјУ°шБцГў
- setLISTSUB2(LISTSUB2NUM[0], ++sub2num, 2257, "|Home|false", 1); //ИЁЖдАМБц
- //ЖдЅє Ех ѕоїюАМЕ«
- if ( !GetINIBool("Localize", "UsePathToAwakening", bValue, "L2.ini")) bValue = 0;
- setLISTSUB2(LISTSUB2NUM[0], ++sub2num, 5178, "|PathToAwakening|false", bValue);
- }
- function setLISTSUB2(int snub1num, int sub2num, int stringNUm, string etc, int bValue)
- {
- if (bValue == 1)
- LISTSUB2[LISTSUB2.Length] = snub1num $ "||" $ sub2num $ "|" $ GetSystemString(stringNUm) $ etc;//Tool";
- }
- /**
- * ShowWindow ГўАМ ї·Б АЦА»¶§ ґЩЅГ їБц ѕК±в.
- */
- function SetShowWindow()
- {
- if( IsShowWindow() == false )
- {
- ShowWindow();
- }
- }
- function string setMainShortcutString( int sysNum, string commandName )
- {
- local ShortcutCommandItem commandItem;
- local string strShort;
- local OptionWnd Script;
- Script = OptionWnd( GetScript( "OptionWnd" ) );
- strShort = "<NORMAL_FONT13>" $ GetSystemString( sysNum ) $ "<br><" $ GetSystemString(1523) $ ": ";
- //ДщЅєЖ®
- class'ShortcutAPI'.static.GetAssignedKeyFromCommand( groupName, "ShowWindow Name=" $ commandName, commandItem);
- //ґЬГаЕ° јіён...
- if( commandItem.subkey1 != "" )
- {
- strShort = strShort $ Script.GetUserReadableKeyName( commandItem.subkey1 ) $ "+";
- }
- if( commandItem.subkey2 != "" )
- {
- strShort = strShort $ Script.GetUserReadableKeyName( commandItem.subkey2 ) $ "+";
- }
- if( commandItem.Key != "" )
- {
- if( commandName == "InventoryWnd" )
- {
- strShort = strShort $ Script.GetUserReadableKeyName( commandItem.Key ) $ ",";
- }
- else
- strShort = strShort $ Script.GetUserReadableKeyName( commandItem.Key ) $ "></NORMAL_FONT13>";
- }
- if( commandItem.subkey1 == "" && commandItem.subkey2 == "" && commandItem.Key == "" )
- {
- strShort = strShort $ "ѕшАЅ></NORMAL_FONT13>";
- }
- if( commandName == "InventoryWnd" )
- {
- class'ShortcutAPI'.static.GetAssignedKeyFromCommand( "GamingStateShortcut", "TabShowInventoryWindow", commandItem);
- if( commandItem.subkey1 != "" )
- {
- strShort = strShort $ Script.GetUserReadableKeyName( commandItem.subkey1 ) $ "+";
- }
- if( commandItem.subkey2 != "" )
- {
- strShort = strShort $ Script.GetUserReadableKeyName( commandItem.subkey2 ) $ "+";
- }
- if( commandItem.Key != "" )
- {
- strShort = strShort $ Script.GetUserReadableKeyName( commandItem.Key ) $ "></NORMAL_FONT13>";
- }
- }
- return strShort;
- }
- function string setSubShortcutString( string commandName )
- {
- local ShortcutCommandItem commandItem;
- local string strShort;
- local OptionWnd Script;
- if( commandName == "" )
- {
- return "";
- }
- Script = OptionWnd( GetScript( "OptionWnd" ) );
- strShort = "<NORMAL_FONT13><" $ GetSystemString(1523) $ ": ";
- //ДщЅєЖ®
- class'ShortcutAPI'.static.GetAssignedKeyFromCommand( groupName, "ShowWindow Name=" $ commandName, commandItem);
- //ґЬГаЕ° јіён...
- if( commandItem.subkey1 != "" )
- {
- strShort = strShort $ Script.GetUserReadableKeyName( commandItem.subkey1 ) $ "+";
- }
- if( commandItem.subkey2 != "" )
- {
- strShort = strShort $ Script.GetUserReadableKeyName( commandItem.subkey2 ) $ "+";
- }
- if( commandItem.Key != "" )
- {
- strShort = strShort $ Script.GetUserReadableKeyName( commandItem.Key ) $ "></NORMAL_FONT13>";
- }
- if( commandItem.subkey1 == "" && commandItem.subkey2 == "" && commandItem.Key == "" )
- {
- class'ShortcutAPI'.static.GetAssignedKeyFromCommand( "GamingStateShortcut", "ShowWindow Name=" $ commandName, commandItem);
- if( commandItem.subkey1 != "" )
- {
- strShort = strShort $ Script.GetUserReadableKeyName( commandItem.subkey1 ) $ "+";
- }
- if( commandItem.subkey2 != "" )
- {
- strShort = strShort $ Script.GetUserReadableKeyName( commandItem.subkey2 ) $ "+";
- }
- if( commandItem.Key != "" )
- {
- strShort = strShort $ Script.GetUserReadableKeyName( commandItem.Key ) $ "></NORMAL_FONT13>";
- }
- }
- if( commandItem.subkey1 == "" && commandItem.subkey2 == "" && commandItem.Key == "" )
- {
- strShort = "";
- }
- //strShort = substitute( strShort, "<", "<", true );
- //strShort = substitute( strShort, ">", ">", true );
- return strShort;
- }
- /*
- function int Split( string strInput, string delim, out array<string> arrToken )
- {
- local int arrSize;
- while ( InStr(strInput, delim)>0 )
- {
- arrToken.Insert(arrToken.Length, 1);
- arrToken[arrToken.Length-1] = Left(strInput, InStr(strInput, delim));
- strInput = Mid(strInput, InStr(strInput, delim)+1);
- arrSize = arrSize + 1;
- }
- arrToken.Insert(arrToken.Length, 1);
- arrToken[arrToken.Length-1] = strInput;
- arrSize = arrSize + 1;
- return arrSize;
- }
- */
- /**
- * ДщЅєЖ® Гў ї±в
- */
- function ToggleOpenQuestWnd()
- {
- local WindowHandle win;
- win = GetWindowHandle( "QuestTreeWnd" );
- if( win.IsShowWindow() )
- {
- win.HideWindow();
- PlaySound("InterfaceSound.map_close_01");
- }
- else
- {
- win.ShowWindow();
- win.SetFocus();
- PlaySound("InterfaceSound.map_open_01");
- }
- }
- /**
- * ЗчёН Гў ї±в
- */
- function ToggleOpenClanWnd()
- {
- local WindowHandle win;
- win = getWindowHandleCheckClassic( "ClanWnd" );
- if( win.IsShowWindow() )
- {
- win.HideWindow();
- PlaySound("InterfaceSound.charstat_close_01");
- }
- else
- {
- win.ShowWindow();
- win.SetFocus();
- PlaySound("InterfaceSound.charstat_open_01");
- }
- }
- /**
- * АОёЖ°ьё® ЅГЅєЕЫ ї±в
- */
- function ToggleOpenPersonalConnectionsWnd ()
- {
- local WindowHandle win;
- win = GetWindowHandle( "PersonalConnectionsWnd" );
- if( win.IsShowWindow() )
- {
- win.HideWindow();
- PlaySound("ItemSound.window_close");
- }
- else
- {
- win.ShowWindow();
- win.SetFocus();
- PlaySound("ItemSound.window_open");
- }
- }
- /**
- * ЅєЕі Гў ї±в
- */
- function ToggleOpenSkillWnd()
- {
- local WindowHandle win;
- win = GetWindowHandle( "MagicSkillWnd" );
- if( win.IsShowWindow() )
- {
- win.HideWindow();
- PlayConsoleSound(IFST_MAPWND_OPEN);
- }
- else
- {
- win.ShowWindow();
- win.SetFocus();
- PlayConsoleSound(IFST_MAPWND_CLOSE);
- }
- }
- function WindowHandle getWindowHandleCheckClassic( String winName)
- {
- local WindowHandle win;
- //local bool _isClassicServer;
- //local UIData script;
- //script = getInstanceUIData();
- //_isClassicServer = true;
- //Debug ( "isclassic?" @script.getIsClassicServer() );
- if ( getInstanceUIData().getIsClassicServer() )
- {
- //Debug ( "classic");
- win = GetWindowHandle( winName $ "Classic" );
- }
- else
- {
- //Debug ( "normal");
- win = GetWindowHandle( winName );
- }
- return win;
- }
- /**
- * ДЙёЇЕН Б¤єё Гў ї±в
- */
- function ToggleOpenCharInfoWnd()
- {
- local WindowHandle win;
- win = getWindowHandleCheckClassic( "DetailStatusWnd" );
- if( win.IsShowWindow() )
- {
- win.HideWindow();
- PlayConsoleSound(IFST_WINDOW_CLOSE);
- }
- else
- {
- win.ShowWindow();
- win.SetFocus();
- PlayConsoleSound(IFST_WINDOW_OPEN);
- }
- }
- /**
- * АОєҐЕдё® Гў ї±в
- */
- function ToggleOpenInventoryWnd()
- {
- local WindowHandle win;
- win = GetWindowHandle( "InventoryWnd" );
- if( win.IsShowWindow() )
- {
- win.HideWindow();
- PlaySound("InterfaceSound.inventory_close_01");
- }
- else
- {
- ExecuteEvent(EV_InventoryToggleWindow);
- PlaySound("InterfaceSound.inventory_open_01");
- }
- }
- /**
- * ѕЧјЗ Гў ї±в
- */
- function ToggleOpenActionWnd()
- {
- local WindowHandle win;
- win = GetWindowHandle( "ActionWnd" );
- if( win.IsShowWindow() )
- {
- win.HideWindow();
- PlayConsoleSound(IFST_WINDOW_OPEN);
- }
- else
- {
- win.ShowWindow();
- win.SetFocus();
- ExecuteEvent(EV_ActionListStart);
- ExecuteEvent(EV_ActionList);
- ExecuteEvent(EV_LanguageChanged);
- ExecuteEvent(EV_ActionListNew);
- PlayConsoleSound(IFST_WINDOW_CLOSE);
- }
- }
- /**
- * їЙјЗ Гў ї±в
- */
- function HandleShowOptionWnd()
- {
- local OptionWnd win;
- win = OptionWnd( GetScript("OptionWnd") );
- win.ToggleOpenMeWnd(false); //їЙјЗГўёё ї±в
- //ExecuteEvent( EV_OptionWndShow ) ;//ґЬГаЕ° Гў ї±в
- }
- /**
- * ґЬГаЕ° Гў ї±в
- */
- function HandleShowShortcutAssignWnd()
- {
- local OptionWnd win;
- win = OptionWnd( GetScript("OptionWnd") );
- win.ToggleOpenMeWnd(true); //јфДЖ ГўАё·О ї±в
- }
- /**
- * °ФЅГЖЗ ї±в
- */
- function HandleShowBoardWnd()
- {
- local string strParam;
- ParamAdd(strParam, "Init", "1");
- ExecuteEvent(EV_ShowBBS, strParam);
- }
- //°ФЅГЖЗ/№Ї°н ґдЗП±в
- function handleShowQABoardWnd()
- {
- local string strParam;
- ParamAdd(strParam, "Index", "8");
- ExecuteEvent(EV_ShowBBS, strParam);
- }
- /**
- * ЖДЖјёЕДЄ ї±в
- */
- function HandlePartyMatchWnd()
- {
- ExecuteEvent( EV_ShowWindow, "Name=PartyMatchWnd" );
- }
- /**
- * їмЖпЗФ ї±в
- */
- function HandleShowPostBoxWnd()
- {
- local WindowHandle win;
- win = GetWindowHandle( "PostBoxWnd" );
- if( win.IsShowWindow() )
- {
- win.HideWindow();
- PlayConsoleSound(IFST_WINDOW_CLOSE);
- }
- else
- {
- PlayConsoleSound(IFST_WINDOW_OPEN);
- RequestRequestReceivedPostList();
- if (IsPeaceZone == 0)
- AddSystemMessage(3066);
- }
- }
- /**
- * µµїтё» ї±в
- */
- function HandleShowHelpHtmlWnd()
- {
- local AgeWnd script; // µо±ЮЗҐЅГ ЅєЕ©ёіЖ® °ЎБ®їА±в
- local string strParam;
- ParamAdd(strParam, "FilePath", "..\\L2text\\help.htm");
- ExecuteEvent(EV_ShowHelp, strParam);
- script = AgeWnd( GetScript("AgeWnd") );
- if(script.bBlock == false) script.startAge(); //µо±ЮЗҐЅГё¦ ДСБШґЩ.
- }
- /**
- * АОЅєЕПЅє Бё Гў ї±в
- */
- function HandleShowInstanceZone()
- {
- //Debug(" HandleShowInstanceZone" );
- RequestInzoneWaitingTime();
- }
- /**
- * БшБ¤ Гў ї±в
- */
- function HandleShowPetitionBegin()
- {
- local WindowHandle win;
- local WindowHandle win1;
- local WindowHandle win2;
- local PetitionMethod useNewPetition;
- win = GetWindowHandle( "NewUserPetitionWnd" );
- win1 = GetWindowHandle( "UserPetitionWnd" );
- win2 = GetWindowHandle( "WebPetitionWnd" );
- useNewPetition = GetPetitionMethod();
- if( useNewPetition == PetitionMethod_New )
- {
- if(win.IsShowWindow())
- {
- PlayConsoleSound(IFST_WINDOW_CLOSE);
- win.HideWindow();
- }
- else
- {
- PlayConsoleSound(IFST_WINDOW_OPEN);
- RequestShowPetitionAsMethod();
- }
- }
- else if( useNewPetition == PetitionMethod_Default )
- {
- if (win1.IsShowWindow())
- {
- PlayConsoleSound(IFST_WINDOW_CLOSE);
- win1.HideWindow();
- }
- else
- {
- PlayConsoleSound(IFST_WINDOW_OPEN);
- win1.ShowWindow();
- win1.SetFocus();
- }
- }
- else if( useNewPetition == PetitionMethod_Web )
- {
- if (win2.IsShowWindow())
- {
- PlayConsoleSound(IFST_WINDOW_CLOSE);
- win2.HideWindow();
- }
- else
- {
- PlayConsoleSound(IFST_WINDOW_OPEN);
- RequestShowPetitionAsMethod();
- }
- }
- }
- /**
- * PC№ж АМєҐЖ® ї±в
- */
- function HandleShowPCWnd()
- {
- local PCCafeEventWnd script;
- script = PCCafeEventWnd( GetScript("PCCafeEventWnd") );
- script.HandleToggleShowPCCafeEventWnd();
- PlayConsoleSound(IFST_WINDOW_OPEN);
- }
- /**
- * 24Hz ї±в
- function W24HzShowWnd()
- {
- local WindowHandle win;
- win = GetWindowHandle( "W24HzWnd" );
- //єёї©Бцёй ґЭ±в
- if( win.isShowWindow())
- {
- PlayConsoleSound(IFST_WINDOW_CLOSE);
- win.HideWindow();
- }
- //ѕЖґПёй ї±в
- else
- {
- PlayConsoleSound(IFST_WINDOW_OPEN);
- win.ShowWindow();
- win.SetFocus();
- }
- }
- */
- /**
- * µїїµ»у імИ Гў ї±в
- */
- function HandleShowMovieCaptureWnd()
- {
- local bool tmpBool;
- local WindowHandle win;
- local WindowHandle win1;
- win = GetWindowHandle( "MovieCaptureWnd_Expand" );
- win1 = GetWindowHandle( "MovieCaptureWnd" );
- tmpBool =IsNowMovieCapturing();
- //ДОГД µЗ°н АЦґЩёй
- if(tmpBool)
- {
- win.HideWindow();
- //И®Ае ГўАМ єёї© БшґЩёй
- if ( win.IsShowWindow() )
- {
- PlayConsoleSound(IFST_WINDOW_CLOSE);
- win.HideWindow();
- }
- else
- {
- PlayConsoleSound(IFST_WINDOW_OPEN);
- win.ShowWindow();
- win.SetFocus();
- }
- }
- //ѕЖґП¶уёй АП№Э Гў ї°н ґЭ±в
- else
- {
- if (win1.IsShowWindow())
- {
- PlayConsoleSound(IFST_WINDOW_CLOSE);
- win1.HideWindow();
- }
- else
- {
- PlayConsoleSound(IFST_WINDOW_OPEN);
- win1.ShowWindow();
- win1.SetFocus();
- }
- }
- }
- /**
- * ИЁЖдАМБц ї±в
- */
- function linkHomePage()
- {
- class'UICommonAPI'.static.DialogSetID( DIALOGID_Gohome );
- class'UICommonAPI'.static.DialogShow( DialogModalType_Modalless, DialogType_OKCancel, GetSystemMessage( 3208 ), string(Self));
- }
- //ИЁЖдАМБц ёµЕ©(10.1.18 №®ј±БШ ГЯ°Ў)
- function HandleDialogOK()
- {
- if( ! class'UICommonAPI'.static.DialogIsOwnedBy( string(Self) ) )
- return;
- switch( class'UICommonAPI'.static.DialogGetID() )
- {
- case DIALOGID_Gohome:
- OpenL2Home();
- break;
- }
- }
- //»уЗ° АОєҐЕдё® ї±в
- function HandleShowProductInventory()
- {
- local WindowHandle win;
- local WindowHandle win1;
- //local ShortcutAssignWnd sc;
- //sc = ShortcutAssignWnd( GetScript("ShortcutAssignWnd") );
- //debug( ">>>>>" $ sc.GetShortcutItemNameWithID(1) );
- win = GetWindowHandle( "ProductInventoryWnd" );
- win1 = GetWindowHandle( "ShopWnd" );
- //єёї©Бцёй ґЭ±в
- if( win.isShowWindow())
- {
- PlayConsoleSound(IFST_INVENWND_CLOSE);
- win.HideWindow();
- }
- //ѕЖґПёй ї±в
- else
- {
- util.ItemRelationWindowHide( "ProductInventoryWnd" );
- if( !win1.IsShowWindow() )
- {
- PlayConsoleSound(IFST_INVENWND_OPEN);
- win.ShowWindow();
- win.SetFocus();
- }
- }
- }
- //FlashїЎ ё¶їмЅє їА№цЅГ АМєҐЖ® №Я»э.
- event OnMouseOver( WindowHandle w )
- {
- }
- //FlashїЎ ё¶їмЅє ѕЖїфЅГ АМєҐЖ® №Я»э.
- event OnMouseOut( WindowHandle w )
- {
- //°Б¦·О ё¶їмЅє А§ДЎё¦ 0,0Аё·О.
- ForceToMoveMousePos( 0, 0 );
- }
- /**
- * А©µµїм ESC Е°·О ґЭ±в Гіё®
- * "Esc" Key
- **/
- function OnReceivedCloseUI()
- {
- local array<GFxValue> args;
- local GFxValue invokeResult;
- AllocGFxValues(args, 1);
- Invoke("_root.onReceivedCloseUI", args, invokeResult);
- DeallocGFxValue(invokeResult);
- DeallocGFxValues(args);
- }
- 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("list", argString );
- Invoke("_root.onEvent", args, invokeResult);
- DeallocGFxValue(invokeResult);
- DeallocGFxValues(args);
- }
- */
- //function changeEnterChat( string str )
- //{
- // //groupName = str;
- // //updateTooltip();
- //}
- //function updateTooltip()
- //{
- //}
- defaultproperties
- {
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement