Advertisement
AlisaCodeDragon

ShortcutWnd

Feb 24th, 2019
393
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 33.63 KB | None | 0 0
  1. class ShortcutWnd extends UICommonAPI;
  2.  
  3. const MAX_Page = 20; //branch EP3.0 2016.7.27 luciper3 - ???? ???????? ?????? 10 -> 20 ???? ????
  4. const MAX_ShortcutPerPage = 12;
  5. const MAX_ShortcutPerPage2 = 24;
  6. const MAX_ShortcutPerPage3 = 36;
  7. const MAX_ShortcutPerPage4 = 48;
  8. enum EJoyShortcut
  9. {
  10.     JOYSHORTCUT_Left,
  11.     JOYSHORTCUT_Center,
  12.     JOYSHORTCUT_Right,
  13. };
  14. var WindowHandle Me;
  15. var int CurrentShortcutPage;
  16. var int CurrentShortcutPage2;
  17. var int CurrentShortcutPage3;
  18. var bool m_IsLocked;
  19. var bool m_IsVertical;
  20. var bool m_IsJoypad;
  21. var bool m_IsJoypadExpand;
  22. var bool m_IsJoypadOn;
  23. //var bool m_IsExpand1;
  24. //var bool m_IsExpand2;
  25. //????(10.02.25)
  26. var int CurrentShortcutPage4;
  27. var int CurrentShortcutPage5;
  28. //var bool m_IsExpand3;
  29.  
  30. var int m_Expand;
  31.  
  32. var bool m_IsShortcutExpand;
  33. var String m_ShortcutWndName;
  34.  
  35. var AutoShotItemWnd AutoShotItemWndScript;
  36.  
  37. function OnRegisterEvent()
  38. {
  39.     RegisterEvent( EV_ShortcutUpdate );
  40.     RegisterEvent( EV_ShortcutPageUpdate );
  41.     RegisterEvent( EV_ShortcutJoypad );
  42.     RegisterEvent( EV_ShortcutClear );
  43.     RegisterEvent( EV_JoypadLButtonDown );
  44.     RegisterEvent( EV_JoypadLButtonUp );
  45.     RegisterEvent( EV_JoypadRButtonDown );
  46.     RegisterEvent( EV_JoypadRButtonUp );
  47.     RegisterEvent( EV_ShortcutCommandSlot );
  48.  
  49.     RegisterEvent( EV_ShortcutkeyassignChanged );
  50.    
  51.     RegisterEvent( EV_SetEnterChatting );
  52.     RegisterEvent( EV_UnSetEnterChatting );
  53.     RegisterEvent(EV_Restart);
  54. }
  55.  
  56. function onShow ( )
  57. {
  58.     LoadINIValues();   
  59.  
  60.     if ( m_IsLocked ) Lock(); else UnLock();
  61.  
  62.     class'UIAPI_WINDOW'.static.HideWindow("ShortcutWnd.ShortcutWndVertical_1");
  63.     class'UIAPI_WINDOW'.static.HideWindow("ShortcutWnd.ShortcutWndHorizontal_1");
  64.     class'UIAPI_WINDOW'.static.HideWindow("ShortcutWnd.ShortcutWndVertical_2");
  65.     class'UIAPI_WINDOW'.static.HideWindow("ShortcutWnd.ShortcutWndHorizontal_2");  
  66.     class'UIAPI_WINDOW'.static.HideWindow("ShortcutWnd.ShortcutWndVertical_3");
  67.     class'UIAPI_WINDOW'.static.HideWindow("ShortcutWnd.ShortcutWndHorizontal_3");
  68.  
  69.     class'UIAPI_WINDOW'.static.HideWindow("ShortcutWnd.ShortcutWndVertical_4");
  70.     class'UIAPI_WINDOW'.static.HideWindow("ShortcutWnd.ShortcutWndHorizontal_4");
  71.  
  72.  
  73.     ExpandByNum( m_Expand );
  74.     SetVertical( m_IsVertical );
  75. }
  76.  
  77. function LoadINIValues()
  78. {
  79.     local Int tmpInt;
  80.     GetINIInt ( "ShortcutWnd", "e",  m_Expand, "WindowsInfo.ini"); 
  81.     GetInIBool ( "ShortcutWnd", "l", tmpInt, "windowsInfo.ini");
  82.     m_IsLocked = GetOptionBool( "Game", "IsLockShortcutWnd" );
  83.     if ( bool( tmpInt ) )
  84.     {
  85.         OnMaxBtn();
  86.     }
  87.     else
  88.     {
  89.         OnMinBtn();
  90.     }
  91.  
  92.    
  93. /*
  94.     GetINIInt ( "ShortcutWnd", "l",  tmpInt, "WindowsInfo.ini");
  95.     m_IsLocked = bool ( tmpInt );
  96. */
  97.    
  98.     GetINIInt ( "ShortcutWnd", "v",  tmpInt, "WindowsInfo.ini");
  99.     m_IsVertical = bool ( tmpInt );
  100. }
  101.  
  102. function OnLoad()
  103. {
  104.     local bool bMinTooltip;
  105.     local Tooltip Script;
  106.     local int minTooltip;
  107.    
  108.     if ( getInstanceUIData().getIsArenaServer() ) return;
  109.  
  110.     Me = GetWindowHandle( "ShortcutWnd" );
  111.  
  112.     // ???? ????
  113.     AutoShotItemWndScript = AutoShotItemWnd(GetScript("AutoShotItemWnd")); 
  114.    
  115.     //Load Ini 
  116.     LoadINIValues();
  117.  
  118.     /*
  119.     m_IsLocked = GetOptionBool( "Game", "IsLockShortcutWnd" );
  120.     m_IsExpand1 = GetOptionBool( "Game", "Is1ExpandShortcutWnd" );
  121.     m_IsExpand2 = GetOptionBool( "Game", "Is2ExpandShortcutWnd" );
  122.     m_IsExpand3 = GetOptionBool( "Game", "Is3ExpandShortcutWnd" );
  123.     m_IsVertical = GetOptionBool( "Game", "IsShortcutWndVertical" );*/
  124.     //????(10.02.25)
  125.    
  126.     InitShortPageNum();
  127.  
  128.     // ???? ???? ????/???? ???????? ??????(TTP#41925) 2010.8.23 - winkey
  129.     // Option.ini?? ?????? ????????(TTP#46732) 2011.4.21 - winkey
  130.  
  131.     //bMinTooltip = GetOptionBool( "Game", "IsShortcutWndMinTooltip" );
  132.     GetInIBool ( "ShortcutWnd", "l", minTooltip, "windowsInfo.ini");
  133.     bMinTooltip = bool ( minTooltip ); 
  134.     Script = Tooltip( GetScript( "Tooltip" ) );
  135.     Script.setBoolSelect( !bMinTooltip );
  136.    
  137.     if( bMinTooltip )
  138.     {
  139.         HideWindow( "ShortcutWnd.ShortcutWndHorizontal.TooltipMaxBtn" );
  140.         ShowWindow( "ShortcutWnd.ShortcutWndHorizontal.TooltipMinBtn" );
  141.         HideWindow( "ShortcutWnd.ShortcutWndVertical.TooltipMaxBtn" );
  142.         ShowWindow( "ShortcutWnd.ShortcutWndVertical.TooltipMinBtn" );
  143.     }
  144.     else
  145.     {
  146.         ShowWindow( "ShortcutWnd.ShortcutWndHorizontal.TooltipMaxBtn" );
  147.         HideWindow( "ShortcutWnd.ShortcutWndHorizontal.TooltipMinBtn" );
  148.         ShowWindow( "ShortcutWnd.ShortcutWndVertical.TooltipMaxBtn" );
  149.         HideWindow( "ShortcutWnd.ShortcutWndVertical.TooltipMinBtn" );
  150.     }
  151. }
  152.  
  153. //~ function OnDefaultPosition()
  154. //~ {
  155.     //~ m_IsExpand1 = false;
  156.     //~ m_IsExpand2 = false;
  157.     //~ SetVertical(true);
  158.    
  159.     //~ InitShortPageNum();
  160.     //~ ArrangeWnd();
  161.     //~ ExpandWnd();
  162. //~ }
  163.  
  164. function OnDefaultPosition()
  165. {
  166.     if ( getInstanceUIData().getIsArenaServer() ) return;
  167.  
  168.     if (GetOptionInt( "Game", "LayoutDF" ) == 1)
  169.     {
  170.         /*
  171.         m_IsExpand1 = true;
  172.         m_IsExpand2 = true;
  173.         //????(10.02.25)
  174.         m_IsExpand3 = true;
  175.         */
  176.         m_Expand = 4;
  177.     }
  178.     else
  179.     {
  180.     //~ class'UIAPI_WINDOW'.static.ClearAnchor( "ShortcutWnd.ShortcutWndVertical" );
  181.     //~ class'UIAPI_WINDOW'.static.SetAnchor( "ShortcutWnd.ShortcutWndHorizontal", "ShortcutWnd.ShortcutWndVertical", "BottomRight", "BottomRight", 0, 0 );
  182.     }
  183.     ArrangeWnd();
  184.     expandWnd();
  185.     if (GetOptionInt( "Game", "LayoutDF" ) == 1)
  186.     {
  187.         SetVertical(false);
  188.     }
  189. }
  190.  
  191. function OnEnterState( name a_CurrentStateName )
  192. {
  193.     if ( getInstanceUIData().getIsArenaServer() ) return;
  194.  
  195.     ArrangeWnd();
  196.     ExpandWnd();
  197. }
  198.  
  199. function OnExitState( name a_CurrentStateName )
  200. {
  201.     if( a_CurrentStateName == 'LoadingState' )
  202.         InitShortPageNum();
  203. }
  204.  
  205. function OnEvent( int a_EventID, String a_Param )
  206. {  
  207.     //local array<String> IDNum;
  208.     //local ShortcutCommandItem commandItem;
  209.     //local int shortcutID;
  210.     //local String Command;
  211.    
  212.     // ???????????? ???? ???? ????
  213.     if ( getInstanceUIData().getIsArenaServer() ) return;
  214.  
  215.     //Debug("a_EventID" @ a_EventID);
  216.     //Debug("a_Param" @ a_Param);
  217.  
  218.     switch( a_EventID )
  219.     {
  220.     case EV_ShortcutCommandSlot:
  221.         ExecuteShortcutCommandBySlot(a_Param);
  222.         break;
  223.  
  224.     case EV_ShortcutPageUpdate:                 //?????????????? ???????? ???? ?????????? ?? ???????? ??????
  225.         HandleShortcutPageUpdate( a_Param );
  226.        
  227.         break;
  228.     case EV_ShortcutJoypad:
  229.         HandleShortcutJoypad( a_Param );
  230.         break;
  231.     case EV_JoypadLButtonDown:
  232.         HandleJoypadLButtonDown( a_Param );
  233.         break;
  234.     case EV_JoypadLButtonUp:
  235.         HandleJoypadLButtonUp( a_Param );
  236.         break;
  237.     case EV_JoypadRButtonDown:
  238.         HandleJoypadRButtonDown( a_Param );
  239.         break;
  240.     case EV_JoypadRButtonUp:
  241.         HandleJoypadRButtonUp( a_Param );
  242.         break;
  243.     case EV_ShortcutUpdate:
  244.         HandleShortcutUpdate( a_Param );
  245.         break;
  246.     case EV_ShortcutClear:
  247.         HandleShortcutClear();
  248.         //InitShortPageNum();
  249.         ArrangeWnd();
  250.         ExpandWnd();
  251.         break;
  252.  
  253.     case EV_ShortcutkeyassignChanged:      
  254.     case EV_SetEnterChatting:
  255.     case EV_UnSetEnterChatting:
  256.         ClearAllShortcutItemTooltip();
  257.         break; 
  258.  
  259.     case EV_Restart:
  260.         InitShortPageNum();
  261.         break;
  262.     }
  263. }
  264. function ClearAllShortcutItemTooltip()
  265. {
  266.     Me.ClearAllChildShortcutItemTooltip();
  267. }
  268.  
  269. function InitShortPageNum()
  270. {
  271.     CurrentShortcutPage = 0;
  272.     CurrentShortcutPage2 = 1;
  273.     CurrentShortcutPage3 = 2;
  274.     //????(10.02.25)
  275.     CurrentShortcutPage4 = 3;
  276.     CurrentShortcutPage5 = 4;
  277. }
  278.  
  279. function HandleShortcutPageUpdate(string param)
  280. {
  281.     local int i;
  282.     local int nShortcutID;
  283.     local int ShortcutPage;
  284.    
  285.     if( ParseInt(param, "ShortcutPage", ShortcutPage) )
  286.     {
  287.         if( 0 > ShortcutPage || MAX_Page <= ShortcutPage )
  288.             return;
  289.            
  290.         CurrentShortcutPage = ShortcutPage;
  291.         class'UIAPI_TEXTBOX'.static.SetText( "ShortcutWnd." $ m_ShortcutWndName $ ".PageNumTextBox", string( CurrentShortcutPage + 1 ) );
  292.         nShortcutID = CurrentShortcutPage * MAX_ShortcutPerPage;
  293.         for( i = 0; i < MAX_ShortcutPerPage; ++i )
  294.         {
  295.             class'UIAPI_SHORTCUTITEMWINDOW'.static.UpdateShortcut( "ShortcutWnd." $ m_ShortcutWndName $ ".Shortcut" $ ( i + 1 ), nShortcutID );
  296.             nShortcutID++;
  297.         }
  298.     }
  299. }
  300.  
  301. function HandleShortcutUpdate(string param)
  302. {
  303.     local int nShortcutID;
  304.     local int nShortcutNum;
  305.    
  306.     ParseInt(param, "ShortcutID", nShortcutID);
  307.     nShortcutNum = ( nShortcutID % MAX_ShortcutPerPage ) + 1;
  308.    
  309.     if( IsShortcutIDInCurPage( CurrentShortcutPage, nShortcutID ) )
  310.     {
  311.         class'UIAPI_SHORTCUTITEMWINDOW'.static.UpdateShortcut( "ShortcutWnd." $ m_ShortcutWndName $ ".Shortcut" $ nShortcutNum, nShortcutID );
  312.     }
  313.     if( IsShortcutIDInCurPage( CurrentShortcutPage2, nShortcutID ) )
  314.     {
  315.         class'UIAPI_SHORTCUTITEMWINDOW'.static.UpdateShortcut( "ShortcutWnd." $ m_ShortcutWndName $ "_1.Shortcut" $ nShortcutNum, nShortcutID );
  316.     }
  317.     if( IsShortcutIDInCurPage( CurrentShortcutPage3, nShortcutID ) )
  318.     {
  319.         class'UIAPI_SHORTCUTITEMWINDOW'.static.UpdateShortcut( "ShortcutWnd." $ m_ShortcutWndName $ "_2.Shortcut" $ nShortcutNum, nShortcutID );
  320.     }
  321.     if( IsShortcutIDInCurPage( CurrentShortcutPage4, nShortcutID ) )
  322.     {
  323.         class'UIAPI_SHORTCUTITEMWINDOW'.static.UpdateShortcut( "ShortcutWnd." $ m_ShortcutWndName $ "_3.Shortcut" $ nShortcutNum, nShortcutID );
  324.     }
  325.     if(IsShortcutIDInCurPage(CurrentShortcutPage5,nShortcutID))
  326.     {
  327.         class'UIAPI_SHORTCUTITEMWINDOW'.static.UpdateShortcut( "ShortcutWnd." $ m_ShortcutWndName $ "_4.Shortcut" $ nShortcutNum, nShortcutID);
  328.     }
  329. }
  330.  
  331. function HandleShortcutClear()
  332. {
  333.     local int i;
  334.    
  335.     for( i=0 ; i < MAX_ShortcutPerPage ; ++i )
  336.     {
  337.         class'UIAPI_SHORTCUTITEMWINDOW'.static.Clear( "ShortcutWnd.ShortcutWndVertical.Shortcut" $ (i+1) );
  338.         class'UIAPI_SHORTCUTITEMWINDOW'.static.Clear( "ShortcutWnd.ShortcutWndVertical_1.Shortcut" $ (i+1) );
  339.         class'UIAPI_SHORTCUTITEMWINDOW'.static.Clear( "ShortcutWnd.ShortcutWndVertical_2.Shortcut" $ (i+1) );
  340.         class'UIAPI_SHORTCUTITEMWINDOW'.static.Clear( "ShortcutWnd.ShortcutWndVertical_3.Shortcut" $ (i+1) );
  341.         class'UIAPI_SHORTCUTITEMWINDOW'.static.Clear( "ShortcutWnd.ShortcutWndHorizontal.Shortcut" $ (i+1) );
  342.         class'UIAPI_SHORTCUTITEMWINDOW'.static.Clear( "ShortcutWnd.ShortcutWndHorizontal_1.Shortcut" $ (i+1) );
  343.         class'UIAPI_SHORTCUTITEMWINDOW'.static.Clear( "ShortcutWnd.ShortcutWndHorizontal_2.Shortcut" $ (i+1) );
  344.         class'UIAPI_SHORTCUTITEMWINDOW'.static.Clear( "ShortcutWnd.ShortcutWndHorizontal_3.Shortcut" $ (i+1) );
  345.  
  346.         class'UIAPI_SHORTCUTITEMWINDOW'.static.Clear( "ShortcutWnd.ShortcutWndJoypadExpand.Shortcut" $ (i+1) );
  347.     }
  348.     for( i=0; i< 4 ; ++i )
  349.     {
  350.         class'UIAPI_SHORTCUTITEMWINDOW'.static.Clear( "ShortcutWnd.ShortcutWndJoypad.Shortcut" $ (i+1) );
  351.     }
  352. }
  353.  
  354. function HandleShortcutJoypad( String a_Param )
  355. {
  356.     local int OnOff;
  357.  
  358.     if( ParseInt( a_Param, "OnOff", OnOff ) )
  359.     {
  360.         if( 1 == OnOff )
  361.         {
  362.             m_IsJoypadOn = true;
  363.             if( Len(m_ShortcutWndName) > 0 )
  364.                 ShowWindow( "ShortcutWnd." $ m_ShortcutWndName $ ".JoypadBtn" );
  365.         }
  366.         else if( 0 == OnOff )
  367.         {
  368.             m_IsJoypadOn = false;
  369.             if( Len(m_ShortcutWndName) > 0 )
  370.                 HideWindow( "ShortcutWnd." $ m_ShortcutWndName $ ".JoypadBtn" );
  371.         }
  372.     }
  373. }
  374.  
  375. function HandleJoypadLButtonUp( String a_Param )
  376. {
  377.     SetJoypadShortcut( JOYSHORTCUT_Center );
  378. }
  379.  
  380. function HandleJoypadLButtonDown( String a_Param )
  381. {
  382.     SetJoypadShortcut( JOYSHORTCUT_Left );
  383. }
  384.  
  385. function HandleJoypadRButtonUp( String a_Param )
  386. {
  387.     SetJoypadShortcut( JOYSHORTCUT_Center );
  388. }
  389.  
  390. function HandleJoypadRButtonDown( String a_Param )
  391. {
  392.     SetJoypadShortcut( JOYSHORTCUT_Right );
  393. }
  394.  
  395. function SetJoypadShortcut( EJoyShortcut a_JoyShortcut )
  396. {
  397.     local int i;
  398.     local int nShortcutID;
  399.  
  400.     switch( a_JoyShortcut )
  401.     {
  402.     case JOYSHORTCUT_Left:
  403.         class'UIAPI_TEXTURECTRL'.static.SetTexture( "ShortcutWnd.ShortcutWndJoypadExpand.JoypadButtonBackTex", "L2UI_CH3.ShortcutWnd.joypad2_back_over1" );
  404.         class'UIAPI_TEXTURECTRL'.static.SetAnchor( "ShortcutWnd.ShortcutWndJoypadExpand.JoypadButtonBackTex", "ShortcutWnd.ShortcutWndJoypadExpand", "TopLeft", "TopLeft", 28, 0 );
  405.         class'UIAPI_TEXTURECTRL'.static.SetTexture( "ShortcutWnd.ShortcutWndJoypad.JoypadLButtonTex", "L2UI_ch3.Joypad.joypad_L_HOLD" );
  406.         class'UIAPI_TEXTURECTRL'.static.SetTexture( "ShortcutWnd.ShortcutWndJoypad.JoypadRButtonTex", "L2UI_ch3.Joypad.joypad_R" );
  407.         nShortcutID = CurrentShortcutPage * MAX_ShortcutPerPage + 4;
  408.         for( i = 0; i < 4; ++i )
  409.         {
  410.             class'UIAPI_SHORTCUTITEMWINDOW'.static.UpdateShortcut( "ShortcutWnd.ShortcutWndJoypad.Shortcut" $ ( i + 1 ), nShortcutID );
  411.             nShortcutID++;
  412.         }
  413.         break;
  414.     case JOYSHORTCUT_Center:
  415.         class'UIAPI_TEXTURECTRL'.static.SetTexture( "ShortcutWnd.ShortcutWndJoypadExpand.JoypadButtonBackTex", "L2UI_CH3.ShortcutWnd.joypad2_back_over2" );
  416.         class'UIAPI_TEXTURECTRL'.static.SetAnchor( "ShortcutWnd.ShortcutWndJoypadExpand.JoypadButtonBackTex", "ShortcutWnd.ShortcutWndJoypadExpand", "TopLeft", "TopLeft", 158, 0 );
  417.         class'UIAPI_TEXTURECTRL'.static.SetTexture( "ShortcutWnd.ShortcutWndJoypad.JoypadLButtonTex", "L2UI_ch3.Joypad.joypad_L" );
  418.         class'UIAPI_TEXTURECTRL'.static.SetTexture( "ShortcutWnd.ShortcutWndJoypad.JoypadRButtonTex", "L2UI_ch3.Joypad.joypad_R" );
  419.         nShortcutID = CurrentShortcutPage * MAX_ShortcutPerPage;
  420.         for( i = 0; i < 4; ++i )
  421.         {
  422.             class'UIAPI_SHORTCUTITEMWINDOW'.static.UpdateShortcut( "ShortcutWnd.ShortcutWndJoypad.Shortcut" $ ( i + 1 ), nShortcutID );
  423.             nShortcutID++;
  424.         }
  425.         break;
  426.     case JOYSHORTCUT_Right:
  427.         class'UIAPI_TEXTURECTRL'.static.SetTexture( "ShortcutWnd.ShortcutWndJoypadExpand.JoypadButtonBackTex", "L2UI_CH3.ShortcutWnd.joypad2_back_over3" );
  428.         class'UIAPI_TEXTURECTRL'.static.SetAnchor( "ShortcutWnd.ShortcutWndJoypadExpand.JoypadButtonBackTex", "ShortcutWnd.ShortcutWndJoypadExpand", "TopLeft", "TopLeft", 288, 0 );
  429.         class'UIAPI_TEXTURECTRL'.static.SetTexture( "ShortcutWnd.ShortcutWndJoypad.JoypadLButtonTex", "L2UI_ch3.Joypad.joypad_L" );
  430.         class'UIAPI_TEXTURECTRL'.static.SetTexture( "ShortcutWnd.ShortcutWndJoypad.JoypadRButtonTex", "L2UI_ch3.Joypad.joypad_R_HOLD" );
  431.         nShortcutID = CurrentShortcutPage * MAX_ShortcutPerPage + 8;
  432.         for( i = 0; i < 4; ++i )
  433.         {
  434.             class'UIAPI_SHORTCUTITEMWINDOW'.static.UpdateShortcut( "ShortcutWnd.ShortcutWndJoypad.Shortcut" $ ( i + 1 ), nShortcutID );
  435.             nShortcutID++;
  436.         }
  437.         break;
  438.     }
  439. }
  440.  
  441. function OnClickButton( string a_strID )
  442. {
  443.     switch( a_strID )
  444.     {
  445.     case "PrevBtn":
  446.         OnPrevBtn();
  447.         break;
  448.     case "NextBtn":
  449.         OnNextBtn();
  450.         break;
  451.     case "PrevBtn2":
  452.         OnPrevBtn2();
  453.         break;
  454.     case "NextBtn2":
  455.         OnNextBtn2();
  456.         break;
  457.     case "PrevBtn3":
  458.         OnPrevBtn3();
  459.         break;
  460.     case "NextBtn3":
  461.         OnNextBtn3();
  462.         break;
  463.     case "LockBtn":
  464.         OnClickLockBtn();
  465.         break;
  466.     case "UnlockBtn":
  467.         OnClickUnlockBtn();
  468.         break;
  469.     case "RotateBtn":
  470.         OnRotateBtn();
  471.         // ???? ???? ???? ????
  472.         AutoShotPositionAutoMove();
  473.         break;
  474.     case "JoypadBtn":
  475.         OnJoypadBtn();
  476.         break;
  477.     case "ExpandBtn":
  478.         OnExpandBtn();
  479.         break;
  480.     case "ExpandButton":
  481.         OnClickExpandShortcutButton();
  482.         // ???? ???? ???? ????
  483.         //AutoShotItemWndScript.windowPositionAutoMove();
  484.         //AutoShotItemWndScript.checkSlotShowState();
  485.         break;
  486.     case "ReduceButton":
  487.         OnClickExpandShortcutButton();
  488.         // ???? ???? ???? ????
  489.         //AutoShotItemWndScript.windowPositionAutoMove();
  490.         //AutoShotItemWndScript.checkSlotShowState();
  491.         break;
  492.     //????(10.02.25)
  493.     case "PrevBtn4":
  494.         OnPrevBtn4();
  495.         break;
  496.     case "NextBtn4":
  497.         OnNextBtn4();
  498.         break;
  499.  
  500.     case "PrevBtn5":
  501.         OnPrevBtn5();
  502.         break;
  503.     case "NextBtn5":
  504.         OnNextBtn5();
  505.         break;
  506.  
  507.     //????(10.05.07)
  508.     case "TooltipMinBtn":
  509.         OnMinBtn();
  510.         break;
  511.     case "TooltipMaxBtn":
  512.         OnMaxBtn();
  513.         break;
  514.     }
  515. }
  516.  
  517. function OnMinBtn()
  518. {
  519.     local Tooltip Script;
  520.    
  521.     HandleShortcutClear();
  522.     ArrangeWnd();
  523.     ExpandWnd();
  524.  
  525.     Script = Tooltip( GetScript( "Tooltip" ) );
  526.     Script.setBoolSelect( true );
  527.  
  528.     // 2010.8.23 - winkey
  529.     ShowWindow( "ShortcutWnd.ShortcutWndHorizontal.TooltipMaxBtn" );
  530.     HideWindow( "ShortcutWnd.ShortcutWndHorizontal.TooltipMinBtn" );
  531.     ShowWindow( "ShortcutWnd.ShortcutWndVertical.TooltipMaxBtn" );
  532.     HideWindow( "ShortcutWnd.ShortcutWndVertical.TooltipMinBtn" );
  533.    
  534.     SetInIBool ( "ShortcutWnd", "l", false, "windowsInfo.ini");
  535.     //SetOptionBool( "Game", "IsShortcutWndMinTooltip", false );
  536. }
  537.  
  538. function OnMaxBtn()
  539. {
  540.     local Tooltip Script;
  541.    
  542.     HandleShortcutClear();
  543.     ArrangeWnd();
  544.     ExpandWnd();
  545.  
  546.     Script = Tooltip( GetScript( "Tooltip" ) );
  547.     Script.setBoolSelect( false );
  548.  
  549.     // 2010.8.23 - winkey
  550.     ShowWindow( "ShortcutWnd.ShortcutWndHorizontal.TooltipMinBtn" );
  551.     HideWindow( "ShortcutWnd.ShortcutWndHorizontal.TooltipMaxBtn" );
  552.     ShowWindow( "ShortcutWnd.ShortcutWndVertical.TooltipMinBtn" );
  553.     HideWindow( "ShortcutWnd.ShortcutWndVertical.TooltipMaxBtn" );
  554.    
  555.     SetInIBool ( "ShortcutWnd", "l", true, "windowsInfo.ini");
  556.     //SetOptionBool( "Game", "IsShortcutWndMinTooltip", true );
  557. }
  558.  
  559. function OnPrevBtn()
  560. {
  561.     local int nNewPage;
  562.  
  563.     nNewPage = CurrentShortcutPage - 1;
  564.     if( 0 > nNewPage )
  565.         nNewPage = MAX_Page - 1;
  566.  
  567.     SetCurPage( nNewPage );
  568. }
  569.  
  570. function OnPrevBtn2()
  571. {
  572.     local int nNewPage;
  573.  
  574.     nNewPage = CurrentShortcutPage2 - 1;
  575.     if( 0 > nNewPage )
  576.         nNewPage = MAX_Page - 1;
  577.  
  578.     SetCurPage2( nNewPage );
  579. }
  580.  
  581. function OnPrevBtn3()
  582. {
  583.     local int nNewPage;
  584.  
  585.     nNewPage = CurrentShortcutPage3 - 1;
  586.     if( 0 > nNewPage )
  587.         nNewPage = MAX_Page - 1;
  588.  
  589.     SetCurPage3( nNewPage );
  590. }
  591.  
  592. function OnNextBtn()
  593. {
  594.     local int nNewPage;
  595.  
  596.     nNewPage = CurrentShortcutPage + 1;
  597.     if( MAX_Page <= nNewPage )
  598.         nNewPage = 0;
  599.  
  600.     SetCurPage( nNewPage );
  601. }
  602.  
  603. function OnNextBtn2()
  604. {
  605.     local int nNewPage;
  606.  
  607.     nNewPage = CurrentShortcutPage2 + 1;
  608.     if( MAX_Page <= nNewPage )
  609.         nNewPage = 0;
  610.  
  611.     SetCurPage2( nNewPage );
  612. }
  613.  
  614. function OnNextBtn3()
  615. {
  616.     local int nNewPage;
  617.  
  618.     nNewPage = CurrentShortcutPage3 + 1;
  619.     if( MAX_Page <= nNewPage )
  620.         nNewPage = 0;
  621.  
  622.     SetCurPage3( nNewPage );
  623. }
  624.  
  625.  
  626. function OnPrevBtn4()
  627. {
  628.     local int nNewPage;
  629.  
  630.     nNewPage = CurrentShortcutPage4 - 1;
  631.     if( 0 > nNewPage )
  632.         nNewPage = MAX_Page - 1;
  633.  
  634.     SetCurPage4( nNewPage );
  635. }
  636.  
  637. function OnNextBtn4()
  638. {
  639.     local int nNewPage;
  640.  
  641.     nNewPage = CurrentShortcutPage4 + 1;
  642.     if( MAX_Page <= nNewPage )
  643.         nNewPage = 0;
  644.  
  645.     SetCurPage4( nNewPage );
  646. }
  647.  
  648.  
  649. function OnPrevBtn5()
  650. {
  651.     local int nNewPage;
  652.  
  653.     nNewPage = CurrentShortcutPage5 - 1;
  654.     if( 0 > nNewPage )
  655.         nNewPage = MAX_Page - 1;
  656.  
  657.     SetCurPage5( nNewPage );
  658. }
  659.  
  660. function OnNextBtn5()
  661. {
  662.     local int nNewPage;
  663.  
  664.     nNewPage = CurrentShortcutPage5 + 1;
  665.     if( MAX_Page <= nNewPage )
  666.         nNewPage = 0;
  667.  
  668.     SetCurPage5( nNewPage );
  669. }
  670.  
  671. function OnClickLockBtn()
  672. {
  673.     UnLock();
  674. }
  675.  
  676. function OnClickUnlockBtn()
  677. {
  678.     Lock();
  679. }
  680.  
  681. function OnRotateBtn()
  682. {
  683.     SetVertical( !m_IsVertical );
  684.    
  685.     if( m_IsVertical )
  686.     {
  687.         class'UIAPI_WINDOW'.static.SetAnchor( "ShortcutWnd.ShortcutWndVertical", "ShortcutWnd.ShortcutWndHorizontal", "BottomRight", "BottomRight", 0, 0 );
  688.         class'UIAPI_WINDOW'.static.ClearAnchor( "ShortcutWnd.ShortcutWndVertical" );
  689.         class'UIAPI_WINDOW'.static.SetAnchor( "ShortcutWnd.ShortcutWndHorizontal", "ShortcutWnd.ShortcutWndVertical", "BottomRight", "BottomRight", 0, 0 );
  690.     }
  691.     else
  692.     {
  693.         class'UIAPI_WINDOW'.static.SetAnchor( "ShortcutWnd.ShortcutWndHorizontal", "ShortcutWnd.ShortcutWndVertical", "BottomRight", "BottomRight", 0, 0 );                                
  694.         class'UIAPI_WINDOW'.static.ClearAnchor( "ShortcutWnd.ShortcutWndHorizontal" );                                                                                                    
  695.         class'UIAPI_WINDOW'.static.SetAnchor( "ShortcutWnd.ShortcutWndVertical", "ShortcutWnd.ShortcutWndHorizontal", "BottomRight", "BottomRight", 0, 0 );                                
  696.     }
  697.  
  698.     // ???? ???? ???? ????
  699.     NoticeWnd(GetScript("NoticeWnd")).checkMultiLayOut();  
  700.  
  701.     /*
  702.     //????(10.02.25)
  703.     if(m_IsExpand3 == true)
  704.     {
  705.         Expand1();
  706.         Expand2();
  707.         Expand3();
  708.     }
  709.     if(m_IsExpand2 == true)
  710.     {
  711.         Expand1();
  712.         Expand2();
  713.     }
  714.     if(m_IsExpand1 == true)
  715.     {
  716.         Expand1();
  717.     }*/
  718.    
  719.     ExpandByNum( m_Expand ) ;
  720.  
  721.     class'UIAPI_WINDOW'.static.SetFocus( "ShortcutWnd." $ m_ShortcutWndName );
  722. }
  723.  
  724. function OnJoypadBtn()
  725. {
  726.     SetJoypad( !m_IsJoypad );
  727.     class'UIAPI_WINDOW'.static.SetFocus( "ShortcutWnd." $ m_ShortcutWndName );
  728. }
  729.  
  730. function OnExpandBtn()
  731. {
  732.     SetJoypadExpand( !m_IsJoypadExpand );
  733.     class'UIAPI_WINDOW'.static.SetFocus( "ShortcutWnd." $ m_ShortcutWndName );
  734. }
  735.  
  736. function SetCurPage( int a_nCurPage )
  737. {
  738.     if( 0 > a_nCurPage || MAX_Page <= a_nCurPage )
  739.         return;
  740.        
  741.     //Set Current ShortcutKey(F1,F2,F3...) ShortcutWnd Num
  742.     //???????? ?????????????? ??????????..
  743.     class'ShortcutAPI'.static.SetShortcutPage( a_nCurPage );
  744.    
  745.     //->EV_ShortcutPageUpdate ?? ????????.
  746. }
  747.  
  748. function SetCurPage2( int a_nCurPage )
  749. {
  750.     local int i;
  751.     local int nShortcutID;
  752.    
  753.     if( 0 > a_nCurPage || MAX_Page <= a_nCurPage )
  754.         return;
  755.        
  756.     CurrentShortcutPage2 = a_nCurPage;
  757.     class'UIAPI_TEXTBOX'.static.SetText( "ShortcutWnd." $ m_ShortcutWndName $ "." $ m_ShortcutWndName $ "_1" $ ".PageNumTextBox", string( CurrentShortcutPage2 + 1 ) );
  758.     nShortcutID = CurrentShortcutPage2 * MAX_ShortcutPerPage;
  759.     for( i = 0; i < MAX_ShortcutPerPage; ++i )
  760.     {
  761.         class'UIAPI_SHORTCUTITEMWINDOW'.static.UpdateShortcut( "ShortcutWnd." $ m_ShortcutWndName $ "." $ m_ShortcutWndName $ "_1" $".Shortcut" $ ( i + 1 ), nShortcutID );
  762.         nShortcutID++;
  763.     }
  764. }
  765.  
  766. function SetCurPage3( int a_nCurPage )
  767. {
  768.     local int i;
  769.     local int nShortcutID;
  770.    
  771.     if( 0 > a_nCurPage || MAX_Page <= a_nCurPage )
  772.         return;
  773.        
  774.     CurrentShortcutPage3 = a_nCurPage;
  775.     class'UIAPI_TEXTBOX'.static.SetText( "ShortcutWnd." $ m_ShortcutWndName $ "." $ m_ShortcutWndName $ "_1." $ m_ShortcutWndName $"_2" $ ".PageNumTextBox", string( CurrentShortcutPage3 + 1 ) ); 
  776.     nShortcutID = CurrentShortcutPage3 * MAX_ShortcutPerPage;
  777.     for( i = 0; i < MAX_ShortcutPerPage; ++i )
  778.     {
  779.         class'UIAPI_SHORTCUTITEMWINDOW'.static.UpdateShortcut( "ShortcutWnd." $ m_ShortcutWndName $ "." $ m_ShortcutWndName $ "_1." $ m_ShortcutWndName $"_2" $ ".Shortcut" $ ( i + 1 ), nShortcutID );
  780.         nShortcutID++;
  781.     }
  782. }
  783.  
  784. //????(10.02.25)
  785. function SetCurPage4( int a_nCurPage )
  786. {
  787.     local int i;
  788.     local int nShortcutID;
  789.    
  790.     if( 0 > a_nCurPage || MAX_Page <= a_nCurPage )
  791.         return;
  792.        
  793.     CurrentShortcutPage4 = a_nCurPage;
  794.     class'UIAPI_TEXTBOX'.static.SetText( "ShortcutWnd." $ m_ShortcutWndName $ "." $ m_ShortcutWndName $ "_1." $ m_ShortcutWndName $"_3" $ ".PageNumTextBox", string( CurrentShortcutPage4 + 1 ) ); 
  795.     nShortcutID = CurrentShortcutPage4 * MAX_ShortcutPerPage;
  796.     for( i = 0; i < MAX_ShortcutPerPage; ++i )
  797.     {
  798.         //debug( "ShortcutWnd." $ m_ShortcutWndName $ "." $ m_ShortcutWndName $ "_1." $ m_ShortcutWndName $"_3" $ ".Shortcut" $ ( i + 1 ) @ nShortcutID );
  799.  
  800.         class'UIAPI_SHORTCUTITEMWINDOW'.static.UpdateShortcut( "ShortcutWnd." $ m_ShortcutWndName $ "." $ m_ShortcutWndName $ "_1." $ m_ShortcutWndName $"_3" $ ".Shortcut" $ ( i + 1 ), nShortcutID );
  801.         nShortcutID++;
  802.     }
  803. }
  804.  
  805. // 2016.07.20
  806. // ???? 5?? ???? ????
  807. function SetCurPage5( int a_nCurPage )
  808. {
  809.     local int i;
  810.     local int nShortcutID;
  811.    
  812.     if( 0 > a_nCurPage || MAX_Page <= a_nCurPage )
  813.         return;
  814.        
  815.     CurrentShortcutPage5 = a_nCurPage;
  816.     class'UIAPI_TEXTBOX'.static.SetText( "ShortcutWnd." $ m_ShortcutWndName $ "." $ m_ShortcutWndName $ "_1." $ m_ShortcutWndName $"_4" $ ".PageNumTextBox", string( CurrentShortcutPage5 + 1 ) ); 
  817.     nShortcutID = CurrentShortcutPage5 * MAX_ShortcutPerPage;
  818.     for( i = 0; i < MAX_ShortcutPerPage; ++i )
  819.     {
  820.         //debug( "ShortcutWnd." $ m_ShortcutWndName $ "." $ m_ShortcutWndName $ "_1." $ m_ShortcutWndName $"_3" $ ".Shortcut" $ ( i + 1 ) @ nShortcutID );
  821.  
  822.         class'UIAPI_SHORTCUTITEMWINDOW'.static.UpdateShortcut( "ShortcutWnd." $ m_ShortcutWndName $ "." $ m_ShortcutWndName $ "_1." $ m_ShortcutWndName $"_4" $ ".Shortcut" $ ( i + 1 ), nShortcutID );
  823.         nShortcutID++;
  824.     }
  825. }
  826.  
  827. function bool IsShortcutIDInCurPage( int PageNum, int a_nShortcutID )
  828. {
  829.     if( PageNum * MAX_ShortcutPerPage > a_nShortcutID )
  830.         return false;
  831.     if( ( PageNum + 1 ) * MAX_ShortcutPerPage <= a_nShortcutID )
  832.         return false;
  833.     return true;
  834. }
  835.  
  836. function Lock()
  837. {
  838.     m_IsLocked = true;
  839.     SetOptionBool( "Game", "IsLockShortcutWnd", true );
  840.     //SetINIInt ( "ShortcutWnd", "l",  1, "WindowsInfo.ini");
  841.  
  842.     //if( IsShowWindow( "ShortcutWnd" ) )
  843.     //{
  844.         ShowWindow( "ShortcutWnd." $ m_ShortcutWndName $ ".LockBtn" );
  845.         HideWindow( "ShortcutWnd." $ m_ShortcutWndName $ ".UnlockBtn" );
  846.     //}
  847. }
  848.  
  849. function UnLock()
  850. {
  851.     m_IsLocked = false;
  852.     //SetINIInt ( "ShortcutWnd", "l",  0, "WindowsInfo.ini");
  853.     SetOptionBool( "Game", "IsLockShortcutWnd", false );
  854.  
  855.     //if( IsShowWindow( "ShortcutWnd" ) )
  856.     //{
  857.         ShowWindow( "ShortcutWnd." $ m_ShortcutWndName $ ".UnlockBtn" );
  858.         HideWindow( "ShortcutWnd." $ m_ShortcutWndName $ ".LockBtn" );
  859.     //}
  860. }
  861.  
  862. function SetVertical( bool a_IsVertical )
  863. {
  864.     m_IsVertical = a_IsVertical;
  865.     SetINIInt ( "ShortcutWnd", "v",  int ( m_IsVertical ) , "WindowsInfo.ini");
  866.     //SetOptionBool( "Game", "IsShortcutWndVertical", m_IsVertical );
  867.  
  868.     ArrangeWnd();
  869.     ExpandWnd();
  870. }
  871.  
  872. function SetJoypad( bool a_IsJoypad )
  873. {
  874.     m_IsJoypad = a_IsJoypad;
  875.  
  876.     ArrangeWnd();
  877. }
  878.  
  879. function SetJoypadExpand( bool a_IsJoypadExpand )
  880. {
  881.     m_IsJoypadExpand = a_IsJoypadExpand;
  882.  
  883.     if( m_IsJoypadExpand )
  884.     {
  885.         class'UIAPI_WINDOW'.static.SetAnchor( "ShortcutWnd.ShortcutWndJoypadExpand", "ShortcutWnd.ShortcutWndJoypad", "TopLeft", "TopLeft", 0, 0 );
  886.         class'UIAPI_WINDOW'.static.ClearAnchor( "ShortcutWnd.ShortcutWndJoypadExpand" );
  887.     }
  888.     else
  889.     {
  890.         class'UIAPI_WINDOW'.static.SetAnchor( "ShortcutWnd.ShortcutWndJoypad", "ShortcutWnd.ShortcutWndJoypadExpand", "TopLeft", "TopLeft", 0, 0 );
  891.         class'UIAPI_WINDOW'.static.ClearAnchor( "ShortcutWnd.ShortcutWndJoypad" );
  892.     }
  893.  
  894.     ArrangeWnd();
  895. }
  896.  
  897. function ArrangeWnd()
  898. {
  899.     local Rect WindowRect;
  900.     //local int tmpInt;
  901.  
  902.     if( m_IsJoypad )
  903.     {
  904.         HideWindow( "ShortcutWnd.ShortcutWndVertical" );
  905.         HideWindow( "ShortcutWnd.ShortcutWndHorizontal" );
  906.         if( m_IsJoypadExpand )
  907.         {
  908.             HideWindow( "ShortcutWnd.ShortcutWndJoypad" );
  909.             ShowWindow( "ShortcutWnd.ShortcutWndJoypadExpand" );
  910.  
  911.             m_ShortcutWndName = "ShortcutWndJoypadExpand";
  912.         }
  913.         else
  914.         {
  915.             HideWindow( "ShortcutWnd.ShortcutWndJoypadExpand" );
  916.             ShowWindow( "ShortcutWnd.ShortcutWndJoypad" );
  917.  
  918.             m_ShortcutWndName = "ShortcutWndJoypad";
  919.         }
  920.     }
  921.     else
  922.     {
  923.         HideWindow( "ShortcutWnd.ShortcutWndJoypadExpand" );
  924.         HideWindow( "ShortcutWnd.ShortcutWndJoypad" );
  925.         if( m_IsVertical )
  926.         {
  927.             m_ShortcutWndName = "ShortcutWndVertical";
  928.             WindowRect = class'UIAPI_WINDOW'.static.GetRect( "ShortcutWnd.ShortcutWndVertical" );
  929.             if( WindowRect.nY < 0 )
  930.                 class'UIAPI_WINDOW'.static.MoveTo( "ShortcutWnd.ShortcutWndVertical", WindowRect.nX, 0 );
  931.             HideWindow( "ShortcutWnd.ShortcutWndHorizontal" );
  932.             ShowWindow( "ShortcutWnd.ShortcutWndVertical" );
  933.         }
  934.         else
  935.         {
  936.             m_ShortcutWndName = "ShortcutWndHorizontal";
  937.             WindowRect = class'UIAPI_WINDOW'.static.GetRect( "ShortcutWnd.ShortcutWndHorizontal" );
  938.             if( WindowRect.nX < 0 )
  939.                 class'UIAPI_WINDOW'.static.MoveTo( "ShortcutWnd.ShortcutWndHorizontal", 0, WindowRect.nY );
  940.             HideWindow( "ShortcutWnd.ShortcutWndVertical" );
  941.             ShowWindow( "ShortcutWnd.ShortcutWndHorizontal" );
  942.         }
  943.  
  944.         if( m_IsJoypadOn )
  945.             ShowWindow( "ShortcutWnd." $ m_ShortcutWndName $ ".JoypadBtn" );
  946.         else
  947.             HideWindow( "ShortcutWnd." $ m_ShortcutWndName $ ".JoypadBtn" );
  948.     }
  949.    
  950.     /*GetINIInt ( "ShortcutWnd", "l",  tmpInt, "WindowsInfo.ini");
  951.     m_IsLocked = bool ( tmpInt ) ;*/
  952.     //m_IsLocked = GetOptionBool( "Game", "IsLockShortcutWnd" );   
  953.     if( m_IsLocked )
  954.         Lock();
  955.     else
  956.         UnLock();
  957.  
  958.     SetCurPage( CurrentShortcutPage );
  959.     SetCurPage2( CurrentShortcutPage2 );
  960.     SetCurPage3( CurrentShortcutPage3 );
  961.     SetCurPage4( CurrentShortcutPage4 );
  962.     SetCurPage5( CurrentShortcutPage5 );
  963.    
  964.     /*
  965.     if(m_IsExpand1 == true)
  966.     {
  967.         m_IsShortcutExpand = true;
  968.         HandleExpandButton();
  969.     }
  970.     else if(m_IsExpand2 == true)
  971.     {
  972.         m_IsShortcutExpand = true;
  973.         HandleExpandButton();
  974.     }
  975.     else if(m_IsExpand3 == true)
  976.     {
  977.         m_IsShortcutExpand = false;
  978.         HandleExpandButton();
  979.     }
  980.     else
  981.     {
  982.         m_IsShortcutExpand = true;
  983.         HandleExpandButton();
  984.     }
  985. */
  986.    
  987.     m_IsShortcutExpand = ( m_Expand != 4 ) ;
  988.     HandleExpandButton();
  989. }
  990.  
  991. function ExpandWnd()
  992. {
  993.     //????(10.02.25)
  994.     //if( m_IsExpand1 == true || m_IsExpand2 == true || m_IsExpand3 == true )
  995.     if ( m_Expand > 0 )
  996.     {
  997.         //debug( m_IsExpand1 @ "&&&&&" @ m_IsExpand2 @ "&&&&&" @ m_IsExpand3 );
  998.         m_IsShortcutExpand = false;
  999.         /*
  1000.         if(m_IsExpand3 == true)
  1001.         {          
  1002.             Expand3();
  1003.         }
  1004.         if(m_IsExpand2 == true)
  1005.         {          
  1006.             Expand2();
  1007.         }
  1008.         if(m_IsExpand1 == true)
  1009.         {      
  1010.             Expand1();
  1011.         }*/
  1012.         ExpandByNum( m_Expand ) ;
  1013.     }
  1014.     else
  1015.     {
  1016.         m_IsShortcutExpand = true;
  1017.         Reduce();
  1018.     }
  1019. }
  1020.  
  1021. function ExpandByNum ( int expandNum )
  1022. {
  1023.     m_IsShortcutExpand = true;
  1024.     m_Expand = expandNum;
  1025.     switch ( expandNum )
  1026.     {
  1027.         case 4:    
  1028.             class'UIAPI_WINDOW'.static.ShowWindow("ShortcutWnd.ShortcutWndVertical_4");
  1029.             class'UIAPI_WINDOW'.static.ShowWindow("ShortcutWnd.ShortcutWndHorizontal_4");
  1030.  
  1031.         case 3:    
  1032.             class'UIAPI_WINDOW'.static.ShowWindow("ShortcutWnd.ShortcutWndVertical_3");
  1033.             class'UIAPI_WINDOW'.static.ShowWindow("ShortcutWnd.ShortcutWndHorizontal_3");
  1034.  
  1035.         case 2:    
  1036.             class'UIAPI_WINDOW'.static.ShowWindow("ShortcutWnd.ShortcutWndVertical_2");
  1037.             class'UIAPI_WINDOW'.static.ShowWindow("ShortcutWnd.ShortcutWndHorizontal_2");
  1038.  
  1039.         case 1:    
  1040.             class'UIAPI_WINDOW'.static.ShowWindow("ShortcutWnd.ShortcutWndVertical_1");
  1041.             class'UIAPI_WINDOW'.static.ShowWindow("ShortcutWnd.ShortcutWndHorizontal_1");
  1042.             break;
  1043.     }
  1044.  
  1045.     SetINIInt ( "ShortcutWnd", "e", m_Expand, "WindowsInfo.ini") ;
  1046.     HandleExpandButton();
  1047.  
  1048.     AutoShotItemWndScript.windowPositionAutoMove();
  1049.     AutoShotItemWndScript.checkSlotShowState();
  1050. }
  1051.  
  1052. /*
  1053. function Expand1()
  1054. {
  1055.     m_IsShortcutExpand = true;
  1056.     m_IsExpand1 = true;
  1057.     SetOptionBool( "Game", "Is1ExpandShortcutWnd", m_IsExpand1 );
  1058.    
  1059.     class'UIAPI_WINDOW'.static.ShowWindow("ShortcutWnd.ShortcutWndVertical_1");
  1060.     class'UIAPI_WINDOW'.static.ShowWindow("ShortcutWnd.ShortcutWndHorizontal_1");
  1061.    
  1062.     HandleExpandButton();
  1063. }
  1064.  
  1065. function Expand2()
  1066. {
  1067.     m_IsShortcutExpand = true; 
  1068.     m_IsExpand2 = true;
  1069.     SetOptionBool( "Game", "Is2ExpandShortcutWnd", m_IsExpand2 );
  1070.    
  1071.     class'UIAPI_WINDOW'.static.ShowWindow("ShortcutWnd.ShortcutWndVertical_2");
  1072.     class'UIAPI_WINDOW'.static.ShowWindow("ShortcutWnd.ShortcutWndHorizontal_2");
  1073.    
  1074.     HandleExpandButton();
  1075. }
  1076.  
  1077. //????(10.02.25)
  1078. function Expand3()
  1079. {
  1080.     m_IsShortcutExpand = true; 
  1081.     m_IsExpand3 = true;
  1082.     SetOptionBool( "Game", "Is3ExpandShortcutWnd", m_IsExpand3 );
  1083.    
  1084.     class'UIAPI_WINDOW'.static.ShowWindow("ShortcutWnd.ShortcutWndVertical_3");
  1085.     class'UIAPI_WINDOW'.static.ShowWindow("ShortcutWnd.ShortcutWndHorizontal_3");
  1086.    
  1087.     HandleExpandButton();
  1088. }
  1089. */
  1090.  
  1091. function Reduce()
  1092. {
  1093.     m_IsShortcutExpand = true;
  1094.    
  1095.     //m_IsExpand1 = false;
  1096.     //m_IsExpand2 = false;
  1097.    
  1098.     //SetOptionBool( "Game", "Is1ExpandShortcutWnd", m_IsExpand1 );
  1099.     //SetOptionBool( "Game", "Is2ExpandShortcutWnd", m_IsExpand2 );
  1100.  
  1101.     class'UIAPI_WINDOW'.static.HideWindow("ShortcutWnd.ShortcutWndVertical_1");
  1102.     class'UIAPI_WINDOW'.static.HideWindow("ShortcutWnd.ShortcutWndVertical_2");
  1103.     class'UIAPI_WINDOW'.static.HideWindow("ShortcutWnd.ShortcutWndHorizontal_1");
  1104.     class'UIAPI_WINDOW'.static.HideWindow("ShortcutWnd.ShortcutWndHorizontal_2");
  1105.    
  1106.     //????(10.02.25)
  1107.     //m_IsExpand3 = false;
  1108.     //SetOptionBool( "Game", "Is3ExpandShortcutWnd", m_IsExpand3 );
  1109.     class'UIAPI_WINDOW'.static.HideWindow("ShortcutWnd.ShortcutWndVertical_3");
  1110.     class'UIAPI_WINDOW'.static.HideWindow("ShortcutWnd.ShortcutWndHorizontal_3");
  1111.  
  1112.     class'UIAPI_WINDOW'.static.HideWindow("ShortcutWnd.ShortcutWndVertical_4");
  1113.     class'UIAPI_WINDOW'.static.HideWindow("ShortcutWnd.ShortcutWndHorizontal_4");
  1114.  
  1115.     m_Expand = 0;
  1116.     SetINIInt ( "ShortcutWnd", "e", m_Expand, "WindowsInfo.ini") ;
  1117.  
  1118.     HandleExpandButton();
  1119.  
  1120.     AutoShotItemWndScript.windowPositionAutoMove();
  1121.     AutoShotItemWndScript.checkSlotShowState();
  1122. }
  1123.  
  1124. function OnClickExpandShortcutButton()
  1125. {
  1126.     //????(10.02.25)
  1127.     //debug( "m_IsExpand3------->" @  m_IsExpand3 );
  1128.     //debug( "m_IsExpand2------->" @  m_IsExpand2 );
  1129.     //debug( "m_IsExpand1------->" @  m_IsExpand1 );
  1130.  
  1131.     //Debug("m_Expand:::: "@ m_Expand);
  1132.  
  1133.     if ( m_Expand == 4 )
  1134.     {
  1135.         Reduce();
  1136.     }
  1137.     else
  1138.     {
  1139.         ExpandByNum ( m_Expand + 1) ;
  1140.     }
  1141.     AutoShotPositionAutoMove();
  1142.     /*
  1143.     if (m_IsExpand3)
  1144.     {
  1145.         //debug( "Reduce" );
  1146.         Reduce();
  1147.     }
  1148.     else if (m_IsExpand2)
  1149.     {
  1150.         //debug( "Expand3" );
  1151.         Expand3();
  1152.     }
  1153.     else if (m_IsExpand1)
  1154.     {
  1155.         //debug( "Expand2" );
  1156.         Expand2();
  1157.     }
  1158.     else
  1159.     {
  1160.         //debug( "Expand1" );
  1161.         Expand1();
  1162.     }  
  1163.     */
  1164. }
  1165.  
  1166. function ExecuteShortcutCommandBySlot(string param)
  1167. {
  1168.     local int slot;
  1169.     ParseInt(param, "Slot", slot);
  1170.     //debug ("???? ????????" @ slot);
  1171.     //Log("CurrentShortcutPage 1 " $ CurrentShortcutPage $ ", 2 " $ CurrentShortcutPage2 $ ", 3 " $ CurrentShortcutPage3);
  1172.    
  1173.     if(Me.isShowwindow())       // ???? ?????? ???? ?????????? ????.
  1174.     {  
  1175.         if( slot >=0 && slot < MAX_ShortcutPerPage )            // bottom
  1176.         {
  1177.             class'ShortcutAPI'.static.ExecuteShortcutBySlot(CurrentShortcutPage*MAX_ShortcutPerPage + slot);
  1178.         }
  1179.         else if( slot >= MAX_ShortcutPerPage && slot < MAX_ShortcutPerPage*2 )      // middle
  1180.         {
  1181.             //debug ("??????????2");
  1182.             class'ShortcutAPI'.static.ExecuteShortcutBySlot(CurrentShortcutPage2*MAX_ShortcutPerPage + slot - MAX_ShortcutPerPage);
  1183.         }
  1184.         else if( slot >= MAX_ShortcutPerPage*2 && slot < MAX_ShortcutPerPage*3 )        // last
  1185.         {
  1186.             //debug ("??????????3");
  1187.             class'ShortcutAPI'.static.ExecuteShortcutBySlot(CurrentShortcutPage3*MAX_ShortcutPerPage + slot - MAX_ShortcutPerPage2);
  1188.         }
  1189.         else if( slot >= MAX_ShortcutPerPage*3 && slot < MAX_ShortcutPerPage*4 )        // last
  1190.         {
  1191.             //debug ("??????????4");
  1192.             class'ShortcutAPI'.static.ExecuteShortcutBySlot(CurrentShortcutPage4*MAX_ShortcutPerPage + slot - MAX_ShortcutPerPage3);
  1193.         }
  1194.  
  1195.     }
  1196. }
  1197.  
  1198. function HandleExpandButton()
  1199. {
  1200.     if( m_IsShortcutExpand )
  1201.     {
  1202.         ShowWindow( "ShortcutWnd." $ m_ShortcutWndName $ ".ExpandButton" );
  1203.         HideWindow( "ShortcutWnd." $ m_ShortcutWndName $ ".ReduceButton" );
  1204.     }
  1205.     else
  1206.     {
  1207.         HideWindow( "ShortcutWnd." $ m_ShortcutWndName $ ".ExpandButton" );
  1208.         ShowWindow( "ShortcutWnd." $ m_ShortcutWndName $ ".ReduceButton" );
  1209.     }
  1210. }
  1211.  
  1212. function bool IsVertical()
  1213. {
  1214.     return m_IsVertical;
  1215. }
  1216.  
  1217. // ???? ???????? ???? 0~4
  1218. function int getExpandNum()
  1219. {
  1220.     //Debug("m_Expand" @ m_Expand);
  1221.     return m_Expand;
  1222. }
  1223.  
  1224. // ???? ???? ???? ???? TT#72738
  1225. function AutoShotPositionAutoMove()
  1226. {  
  1227.     AutoShotItemWndScript.windowPositionAutoMove();
  1228.     AutoShotItemWndScript.checkSlotShowState();
  1229. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement