
     f$                         S SK JrJrJrJrJrJrJrJrJ	r	J
r
Jr  SSKJrJrJrJrJrJr  S\S\S\	4S jrS\S\S\	4S jrSS	 jrS
\4S jrS\S\S\	4S jrS\S\S\	S
\4S jr " S S\5      r\" 5       r\" \5        g)    )Log	GetEngineRegisterHook
RemoveHook	FindClass
FindObjectUObject	UFunctionFStructLoadPackage	KeepAlive   )RegisterModSDKModOptionsEnabledSaveTypeModTypesKeybindcallerfunctionparamsc                    [         R                  R                  (       GaC  UR                  S:X  Ga2  UR                  S:X  a#  [         R
                  =R                  S-  sl        UR                  S:X  a#  [         R
                  =R                  S-  sl        UR                  S:X  a#  [         R                  =R                  S-  sl        UR                  S:X  a#  [         R                  =R                  S-  sl        UR                  S:X  a#  [         R                  =R                  S-  sl        UR                  S:X  a#  [         R                  =R                  S-  sl        g	)
Nr   Up   DownLeftRightMouseScrollUpMouseScrollDownT)CountDownInstEnableMovementCurrentValueEventKey
yPosSlider
xPosSlider
SizeSliderr   r   r   s      hZ:\mnt\Skyabridged\SteamLibrary\steamapps\common\Borderlands 2\sdk_mods\ActionSkillCountdown\__init__.pyMoveKeysr*      s    ##000V\\Q5F::$$11Q61::$$11Q61::$$11Q61:: $$11Q61::($$11Q61::**$$11Q61    c                     [        [        [        U R                  5      5      5      [        l        [        SS[        5        [        SS[        5        g)N.WillowGame.WillowGameViewportClient.PostRender
Postrender,WillowGame.WillowPlayerController.PlayerTickPlayerTicksT)	introundGetCooldownTime
MyWillowPCr    TimeRemainingr   onPostRenderr0   r(   s      r)   EndActionSkillr7      s>    "%eOF<M<M,N&O"PMA<Q]^?P[\r+   c                 6    [        U [        U 5      -
  5      U:  $ N)absr2   )value	thresholds     r)   is_closer=      s    uuU|#$y00r+   returnc                 H    [         R                  R                  U 5      u  pU$ r9   )r    SkillAttrDefGetValue)PCcooldown_time_s      r)   r3   r3   !   s!    $11::2>Mr+   c                    [        U 5      nUS:  a^  [        U5      (       d  [        R                  U-
  S:  a6  [	        [        U5      5      [        l        [        R                  [        l        g[        SS5        [        SS5        g)Nr   r   r/   r0   r-   r.   T)r3   r=   r    	LastCheckr1   r2   r5   r   )r   r   r   rC   s       r)   r0   r0   '   sr    #F+MqM""}'>'>'NST&T*-eM.B*CM'&3&A&AM#  	A=QC\Rr+   c                 .    [         R                  U5        g)NT)r    displayFeedbackr(   s      r)   r6   r6   3   s    !!&)r+   c                       \ rS rSr% Sr\\S'   Sr\\S'   Sr\\S'   Sr	\\S	'   \
R                  r\
\S
'   \R                  r\\S'   Sr\\S'   SS jrSS jrS rS rS rSrg)ActionSkillCountdown7   zAction Skill CountdownNameu   ZetaDæmon and RedxYetiAuthorz9Adds a countdown timer to your hud for your action skill.Descriptionz1.0VersionTypesSaveEnabledStater   r5   Nc           
          SU l         / U l        [        R                  " SSSSSSSS9U l        [        R                  " SS	SSSSSS9U l        [        R                  " S
SSSSSSS9U l        [        R                  " SSSSSSSS9U l        [        R                  " SSU R                  U R                  U R
                  U R                  /SS9U l        [        R                  " SSSSSSSS9U l	        [        R                  " SSSSSSSS9U l
        [        R                  " SSSSSSSS9U l        [        R                  " SSU R                  U R                  /SS9U l        [        R                  " SSS / S!QS"9U l        [        R                  " S#S$SS%9U l        [        R                  " S&S'SS%9U l        U R                  U R                  U R                  U R                  U R"                  U R                   /U l        g )(Nr   RedzRed value for the text colour.   r   F)CaptionrN   StartingValueMinValueMaxValue	IncrementIsHiddenGreenz Green value for the text colour.BluezBlue value for the text colour.Alphaz Alpha value for the text colour.   zText Colourz$Text colour for the countdown timer.)rU   rN   ChildrenrZ   zCounter Sizez Counter scaling as a percentage.n   2   i  z
X Positionz?X position for the counter as a percentage of the total screen.  z
Y Positionz?Y position for the counter as a percentage of the total screen.zCounter Positionz&Text position for the countdown timer.FontzUse this to pick your font.
WillowBody)rd   
WillowHeadHUDzEngine 1zEngine 2)rU   rN   rV   ChoiceszShow in Pause MenuzTWhen enabled, the timer will show in the pause menu for changing position and color.)rU   rN   rV   zEnable Movement KeyszbWhen enabled, you can use the arrow keys to move the timer and the scrollwheel to change the size.)rF   r   Slider	RedSliderGreenSlider
BlueSliderAlphaSliderNested
TextColourr'   r&   r%   
CounterPosSpinner
FontChoiceBoolean
ShowInMenur!   selfs    r)   __init__ActionSkillCountdown.__init__C   s    8
 #>>:
 "..9
 #>>:
 "..#@(8(8$//4K[K[\	
 "..":
 ".. Y
 ".. Y
 "..(B9	
 "//5&!		
 "//(n

 &oo*|
 OOOOOOOOOO
r+   c                    U R                   R                  R                  U R                   R                  5      n[	        SU R
                  U   5      Ul        UR                  U-  n	UR                  U-  n
UR                  XS5        US n UR                  U5        UR                  [        U5      SXg5        g !    N!= f)Nrc   r   02F)rq   rg   indexr"   r   Fontsrc   SizeXSetPosSetDrawColorStructDrawTextstr)ru   canvastextxycolorscalexscaley	fontindextrueXtrueYCenteredTexts               r)   DisplayText ActionSkillCountdown.DisplayText   s    OO++11$//2N2NO	 I)>?q q eA&r	%%e, 	L)5&A	s   B; ;B?c           
      h   [        5       R                  S   R                  nUR                  (       d  gUR	                  5       b  UR
                  (       aI  UR                  R                  UR                  5      (       a  U R                  R                  (       a  SnOgUR                  R                  5       (       d  UR                  R                  b  gUR                  nU R                  UU R                  U R                   R                  S-  U R"                  R                  S-  U R$                  R                  U R&                  R                  U R(                  R                  U R*                  R                  4U R,                  R                  S-  U R,                  R                  S-  5        g)Nr   Tzis for player configurationrb   d   )r   GamePlayersActorCanvasGetHUDMoviebViewingThirdPersonMenuGFxUIManagerIsMoviePlayingPauseMenuDefinitionrs   r"   MyWillowPawn	IsInjuredDrivenVehicler   r5   r&   r%   rk   rj   ri   rl   r'   )ru   r   rB   thisr   s        r)   rH   $ActionSkillCountdown.displayFeedback   s<   [$$Q'--}}>>#r'A'Aoo,,R-C-CDDIeIe4??$$&&"//*G*G*SOO((4/OO((4/,,  --++  --	 OO((3.OO((3.	
 r+   c                     [        SS[        5        [        SS[        5        [        SS5      U l        / SQU l        SU l        g )	N)WillowGame.ActionSkill.OnActionSkillEndedr7   z'WillowGame.WillowUIInteraction.InputKeyr*   AttributeDefinitionzHD_Attributes.ActiveSkillCooldownResource.ActiveSkillCooldownCurrentValue)zUI_Fonts.Font_Willowbody_18ptzUI_Fonts.Font_Willowhead_8ptzUI_Fonts.Font_Hud_MediumzEngineFonts.SmallFontzEngineFonts.TinyFontF)r   r7   r*   r   r@   r{   
AltPressedrt   s    r)   EnableActionSkillCountdown.Enable   sG    @BRTbc>
HU&'<  ?I  J

  r+   c                 4    [        SS5        [        SS5        g )Nr-   r.   r   r7   )r   rt   s    r)   DisableActionSkillCountdown.Disable   s    C\R>@PQr+   )rl   r   rk   ro   r!   rq   r{   rj   rF   r   ri   rs   r'   r@   rn   r&   r%   )r>   N)__name__
__module____qualname____firstlineno__rL   r   __annotations__rM   rN   rO   r   UtilityrP   r   LoadWithSettingsrQ   r5   r1   rv   r   rH   r   r   __static_attributes__ r+   r)   rJ   rJ   7   sy    (D#(+FC+C   GS&&E8&(7(H(HoHM3i
XB&> Rr+   rJ   N)g{Gz?)	unrealsdkr   r   r   r   r   r   r	   r
   r   r   r   ModMenur   r   r   r   r   r   r*   r7   r=   floatr3   r0   boolr6   rJ   r    r   r+   r)   <module>r      s    L  L  L  L V VW 	 7 "7 i  15 	 	9 	g 	 I w 4 xR6 xRt %& M r+   