o
    OZŽh  ã                   @   sö   d Z ddlZddlZejZejZejZ	e 
d¡Ze d¡ ej de¡Zej ej e¡¡d Zej edd¡Zej e¡Zej e ¡ d e ¡ d fe¡Zd	Zejjd
dgejjedddd¢R Ž ZejjZ dd„ Z!dd„ Z"e#dkrye"ƒ  dS dS )zÕ pygame.examples.cursors
Click a button and the cursor will change.
This example will show you:
*The different types of cursors that exist
*How to create a cursor
*How to set a cursor
*How to make a simple button
é    N)é(   r   )éx   é2   r   )é   r   Údataz
cursor.pngé   )zXX                      zXXX                     zXXXX                    zXX.XX                   zXX..XX                  zXX...XX                 zXX....XX                zXX.....XX               zXX......XX              zXX.......XX             zXX........XX            zXX........XXX           zXX......XXXXX           zXX.XXX..XX              zXXXX XX..XX             zXX   XX..XX             z     XX..XX             ú      XX..XX            r   z       XXXX             z       XX               ú                        r	   r	   )é   r
   )r   r   ÚXÚ.Úo)ÚblackÚwhiteÚxorc                 C   s    | | d || d  |d k S )Nr   © )Zmouse_pos_xZmouse_pos_yZcenter_xZcenter_yZradiusr   r   úF/var/www/auris/lib/python3.10/site-packages/pygame/examples/cursors.pyÚcheck_circleR   s    r   c            +   	   C   sˆ  t  ¡  t j d¡ t j ¡  t j d d¡} t j d d¡}t j d¡}| d¡ d}d}d}d}d}d}d}	d}
d}d	}d
}d}d}d}d}d}d}d}d}d}d}t j 	|d|
|f|¡}t j 	|d||f|¡}t j 	|d||f|¡}t j 	|d||f|¡}t j 	|d||f|¡}t j 	|d||f|¡}t j 	|d||f|	¡}| 
ddd¡}t j |ddd| ¡ d | ¡ d f¡} |j| jd}!| ||!¡ t j ¡  tttttttg}"d}#t j |"|# ¡ d}$t j ¡ }%	 |% d¡ t j ¡ \}&}'t|&|'|j |j!|ƒr
t j 	|d|
|f|¡}nt j 	|d|
|f|¡}t|&|'|j |j!|ƒr,t j 	|d||f|¡}nt j 	|d||f|¡}t|&|'|j |j!|ƒrNt j 	|d||f|¡}nt j 	|d||f|¡}t|&|'|j |j!|ƒrpt j 	|d||f|¡}nt j 	|d||f|¡}t|&|'|j |j!|ƒr’t j 	|d ||f|¡}nt j 	|d||f|¡}t|&|'|j |j!|ƒr´t j 	|d!||f|¡}nt j 	|d||f|¡}t|&|'|j |j!|	ƒrÖt j 	|d"||f|	¡}nt j 	|d||f|	¡}| ddd#| ¡ df¡ |  
d$t j "¡ j#› d%dd¡}(|(j| ¡ d& dfd})| |(|)¡ t j |d'dd| ¡ d | ¡ d f¡} | ||!¡ |  $|&|'¡rt j |d(dd| ¡ d | ¡ d f¡} | ||!¡ t j %¡ d d)kr|$du rt j |d*dd| ¡ d | ¡ d f¡} | ||!¡ |#d)7 }#|#t&|"ƒ; }#t j |"|# ¡ t j ¡  t j 'd¡ t j %¡ d d)krœd}$nt j %¡ d dkr¨d}$t j( )¡ D ]}*|*j#t j*kr¼t  +¡  t,‚q­t j ¡  qç)+NzCursors Exampleé   r
   )iô  i  )é·   éÉ   éâ   r   éR   éŠ   éÂ   éú   i2  ij  i¢  éŒ   éÜ   )éÿ   r   r   zClick here to change cursorT)r   r   r   )é´   r   r   é‹   i,  é   r   )Úcenterr   F)r   r   r   )r   é   r   )r   r   r   )r   r   r   )r   r   r   )éK   r   é‚   )é”   r   éÓ   é   z
This is a z cursorr   )éd   é•   éð   )é<   r)   r   é   )r   r   r    )-ÚpgÚinitÚdisplayZset_captionÚfontZFontÚset_modeÚfillZdrawÚcircleÚrenderÚrectÚ	get_widthÚ
get_heightZget_rectr"   ZblitÚupdateÚsystem_cursor1Úcolor_cursorÚsystem_cursor2Úimage_cursorÚsystem_cursor3Úbitmap_cursor1Úbitmap_cursor2ÚmouseZ
set_cursorÚtimeZClockZtickZget_posr   ZcenterxZcenteryZ
get_cursorÚtypeZcollidepointZget_pressedÚlenÚdelayÚeventÚgetZQUITÚquitÚ
SystemExit)+r1   Zfont1ÚbgZradius1Zradius2Zradius3Zradius4Zradius5Zradius6Zradius7Zpos_x1Zpos_x2Zpos_x3Zpos_x4Zpos_x5Zpos_x6Zpos_x7Zpos_y1Zpos_y2Zpos_y3Zpos_y4Zpos_y5Zpos_y6Zpos_y7Zcircle1Zcircle2Zcircle3Zcircle4Zcircle5Zcircle6Zcircle7Zbutton_textZbuttonZbutton_text_rectÚcursorsÚindexZpressedÚclockZmouse_xZmouse_yZtext1Z
text_rect1rF   r   r   r   ÚmainV   s  

ý
ù


ÿý

üý


üý

þ
ŸrN   Ú__main__)$Ú__doc__Zpygamer.   ÚosZSYSTEM_CURSOR_CROSSHAIRr:   ZSYSTEM_CURSOR_HANDr<   ZSYSTEM_CURSOR_IBEAMr>   ZSurfaceZsurfr3   rK   ZCursorr;   ÚpathÚsplitÚabspathÚ__file__Zmain_dirÚjoinZ
image_nameÚimageÚloadr7   r8   r=   Zthickarrow_stringsÚcompiler?   Zdiamondr@   r   rN   Ú__name__r   r   r   r   Ú<module>   s:   	

ÿþý	 -
ÿ