
    ,_                     B    S SK r S SKJrJrJr  SSKJr   " S S\5      rg)    N)ClassVarOptionalTuple   )GFxMoviec                       \ rS rSr% Sr\\S'   \\S'   \\S'   \\S'   \	\S'   \	\S'   \
\R                     \S	'   S
r\\\S4      \S'        SS\S\S\S\S\	S\	SS4S jjrSS jrS\4S jrSS jrSS jrSrg)TrainingBox   a  
Class representing a training dialog box, like those used for the special edition items message
 (or most training messages but who looks at those).

Attributes:
    Title: The title text to display at the top of the training box.
    Message: The message to display in the main caption of the training box.
    MinDuration:
        The amount of time the training box should display for before the user may close it.
    PausesGame: If the training box should pause the game while it is displayed.
    MenuHint:
        If to display a hint to open your menu, and what menu should be opened when you do.
         Defaults to 0, no hint. 1-5 represent the different the different menu tabs, in the
         same order as the game: Missions; Map; Inventory; Skills; BAR.
    Priority:
        A byte representing the priority of the training box in reference to the game's other
         `GfxMovie`s. Higher values display above lower ones.
TitleMessageMinDuration
PausesGameMenuHintPriority_TrainingBox)EnterEscapeLeftMouseButtonXboxTypeS_AXboxTypeS_BXboxTypeS_Start.	_ExitKeysreturnNc                 Z    Xl         X l        X0l        X@l        XPl        X`l        SU l        g)a  
Creates a training box.

Args:
    Title: The title text to display at the top of the training box.
    Message:
        The message to display in the main caption of the training box. Defaults to the
         empty string.
    MinDuration:
        The amount of time the training box should display for before the user may close it.
         Defaults to 0.
    PausesGame:
        If the training box should pause the game while it is displayed. Defaults to False.
    MenuHint:
        If to display a hint to open your menu, and what menu should be opened when you do.
         Defaults to 0, no hint. 1-5 represent the different the different menu tabs, in the
         same order as the game: Missions; Map; Inventory; Skills; BAR. Defaults to 0.
    Priority:
        A byte representing the priority of the training box in reference to the game's
         other `GfxMovie`s. Higher values display above lower ones. Defaults to 254, the
          same as the game's default.
N)r   r   r   r   r   r   r   )selfr   r   r   r   r   r   s          cZ:\mnt\Skyabridged\SteamLibrary\steamapps\common\Borderlands 2\sdk_mods\UserFeedback\TrainingBox.py__init__TrainingBox.__init__,   s+    > 
&$       c                 :  ^  [         R                  " 5       R                  S   R                  R                  R                  T R                  T R                  T R                  T R                  T R                  (       + 5      T l        T R                  R                  T R                  5        T R                  R                  5         S[         R                  S[         R                   S[         R"                  S[$        4U 4S jjn[         R&                  " SSU5        g	)
zDisplays the training box. r   callerfunctionparamsr   c                   > U TR                   :X  a  TR                  UR                  UR                  5        TR                   b  TR                   R                  S:  a  UR                  S:X  a  SnU R                  5       R                  b*  U R                  5       R                  R                  SS5      nUR                  TR                  ;   d  UR                  U:X  a.  [        R                  " SS5        S Tl         TR                  5         g)Nr   r   FAKEUseT4WillowGame.WillowGFxTrainingDialogBox.HandleInputKeyCustomTrainingBox)r   OnInputukeyueventDelayUntilShowOkGetPCPlayerInputGetKeyForActionr   	unrealsdk
RemoveHookOnExit)r!   r"   r#   use_keyr   s       r   HandleInputKey(TrainingBox.Show.<locals>.HandleInputKey`   s    ***V[[&--8 $$0T5F5F5W5WZ[5[`f`m`mqr`r$G||~11="(,,."<"<"L"LUTX"Y{{dnn4w8N!,,-cexy,0)r   r'   r(   N)r0   	GetEngineGamePlayersActorGFxUIManagerShowTrainingDialogr   r   r   r   r   r   SetPriorityr   ApplyLayoutUObject	UFunctionFStructboolRegisterHook)r   r4   s   ` r   ShowTrainingBox.ShowT   s    %//1==a@FFSSffLLJJMM
 	%%dmm4%%'	9#4#4 		@S@S 	]f]n]n 	sw 	  	UWjlz{r   c                     U R                   SL$ )z
Gets if the training box is currently being displayed.

Returns:
    True if the training box is currently being displayed, False otherwise.
N)r   r   s    r   	IsShowingTrainingBox.IsShowingr   s       ,,r   c                     U R                   c  [        R                  " S5        g[        R                  " SS5        U R                   R	                  5         SU l         g)z
Hides the training box, without running any callbacks.

Displays a warning but does nothing if the training box is not currently being displayed.
NzL[UserFeedback] Warning: tried to hide a training box that was already closedr'   r(   )r   r0   Logr1   CloserE   s    r   HideTrainingBox.Hide{   sR     $MM^ SUhi 	! r   c                     g)zSCallback function intended to be overwritten. Called when the training box closes. N rE   s    r   r2   TrainingBox.OnExit   s    r   )r   r   r   r   r   r   r   ) r   Fr      )r   N)__name__
__module____qualname____firstlineno____doc__str__annotations__floatr@   intr   r0   r=   r   r   r   r   rB   rF   rK   r2   __static_attributes__rN   r   r   r	   r	      s    & JLMM9,,--,Ixc3h(   &!&! &! 	&!
 &! &! &! 
&!P|<-4 -!$r   r	   )r0   typingr   r   r   r   r	   rN   r   r   <module>r]      s     , , H( Hr   