
    hd                        S SK r S SKJr  S SKJr  SSKJrJrJrJ	r	  SSK
Jr  \R                  " SSS	S
9r\R                  " SSS	S
9r\R                  " SSS	S
9r\R                  " SSS	S
9r\R                  " SSS	S
9r\R$                  " SS\\\\\/S9rS\R(                  4S\R*                  4S\R,                  4S\R.                  4S\R0                  4S\R2                  4S\R4                  4S\R6                  4S\R8                  4S\R:                  4S \R<                  4S!\R>                  4/r S"\S#\!S$S4S% jr"S"\S$S4S& jr#S"\S$S4S' jr$S"\S$S4S( jr%S$\4S) jr&g)*    N)Options)PostRenderCoroutine   )CanvasHorizontalAlignVerticalAlignrelative_to_screen_coordinates)FontszShow Examplesz,Display examples of the CanvasLIB functions.F)StartingValuez
Show FontszDisplay font examples.zShow AlignszDisplay examples of alignments.z
Show RectszDisplay examples of rectangles.z
Show LineszDisplay examples of lines.Examplesz%Examples for the CanvasLIB functions.)ChildrenDefault__FontDefault__MultiFontTinyFont	SmallFontFont_Hud_Mediumfont_xbox18font_ps3Font_Willowbody_18ptFont_Willowhead_8ptFont_Willowbody_18pt_KORFont_Willowbody_18pt_JPNFont_Willowbody_18pt_TWNc	some_textreturnc           
      J   Sn[          H  u  p4[        R                  U l        U R	                  U S3SU[
        R                  [        R                  SS9u  pVX@l        UnU R	                  XU[
        R                  [        R                  SS9u  pbX'-
  S:  d  M  US-  nM     g )N皙?z: r      r    r    r    horizontal_alignvertical_aligncolor   )	
_all_fontsr
   r   font	draw_textr   LEFTr   TOP)r   r   y	font_namefx_y_befores           ]Z:\mnt\Skyabridged\SteamLibrary\steamapps\common\Borderlands 2\sdk_mods\canvaslib\examples.py_show_fontsr2   #   s    A"	{{ka_5I5I(,,&  

 {{!o.B.BS`SdSd&  
 <"GA #    c                    [         R                  U l        U R                  SSSS5        U R	                  SSS[
        R                  [        R                  S9  U R	                  SSS[
        R                  [        R                  S9  U R	                  SSS[
        R                  [        R                  S9  U R	                  S	SS[
        R                  [        R                  S9  U R	                  S
SS[
        R                  [        R                  S9  U R	                  SSS[
        R                  [        R                  S9  U R	                  SSS[
        R                  [        R                  S9  U R	                  SSS[
        R                  [        R                  S9  U R	                  SSS[
        R                  [        R                  S9  g )Nr    r   zAlign TOP LEFT)r"   r#   zAlign TOP CENTER      ?zAlign TOP RIGHTr   zAlign CENTER LEFTzAlign CENTER CENTERzAlign CENTER RIGHTzAlign BOTTOM LEFTzAlign BOTTOM CENTERzAlign BOTTOM RIGHT)r
   r   r'   set_draw_colorr(   r   r)   r   r*   CENTERRIGHTBOTTOMr   s    r1   _show_alignsr;   6   s   ++AFS#q#&KK!Q1E1EVcVgVg   KKC_5K5K\i\m\m   KK1a/2G2GXeXiXi   KKQo6J6J[h[o[o   KKsC/:P:P$++   KKa7L7L$++   KKQO4H4HYfYmYm   KKsA8N8N$++   KKa_5J5J[h[o[o  r3   c           
      *   U R                  SSSS[        R                  [        R                  SS9  U R                  SSSS[        R                  [        R                  SS9  U R                  SSSS[        R                  [        R                  S	S9  g )
N皙?r5   r   )r    r   r   d   r!   g?)r   r    r   r>   333333?)r   r   r    r>   )	draw_rectr   r7   r   r:   s    r1   
_show_rectrA   Y   s    KKS#s_-C-CTaThTh   KKS#s_-C-CTaThTh   KKS#s_-C-CTaThTh  r3   c           	      R   U R                  SSSSSSS9  U R                  SSSSSSS9  U R                  SSSSSS9  U R                  SSSSSS9  [        U R                  SS5      u  pU R                  US	-
  US	-
  US	-   US	-   S
SS9  U R                  US	-
  US	-   US	-   US	-
  S
SS9  g )Nr=   r5   r?   
   r   )widthr$   )r    r    r   r    )r$   2      )r   r   r    r    )	draw_liner	   canvas)r   center_xcenter_ys      r1   _show_linesrK   h   s    KKS#s"4HKIKKS#s"4HKIKKS#s*<K=KKS#s*<K=7#sKHKK2x"}hmX]RS[kKlKK2x"}hmX]RS[kKlr3   c               #     #    [         R                  R                  SS5      R                  SS5      n  S v   S v n[        U5       n[        R
                  SL a  [        X 5        [        R
                  SL a  [        U5        [        R
                  SL a  [        U5        [        R
                  SL a  [        U5        S S S 5        [        R
                  SL a  g M  ! , (       d  f       N$= f7f)N
 TF)string	printablereplacer   
show_fontsCurrentValuer2   show_alignsr;   
show_rectsrA   
show_linesrK   show_examples)r   _cr   s      r1   examples_coroutinerZ   t   s       ((r2::4DI

BZ1&&$.A)''4/Q&&$.1&&$.A  %%.  Zs   AC/A9C C/
C,(C/)'rP   Mods.ModMenur   Mods.coroutinesr   rH   r   r   r   r	   fontsr
   BooleanrX   rS   rU   rV   rW   Nestedoptionsr   r   r   r   r   r   r   r   r   r   r   r   r&   strr2   r;   rA   rK   rZ    r3   r1   <module>rc      s      / Z Z 1_otu__\+CSXY
oom-N^cd__\+L\ab
__\+GW\]

..7Zj*M e))+5335!%//#--/E%%'!U779E557!?!?A!?!?A!?!?@
 6 c d & F  t  F& T 	m6 	md 	m/ r3   