
    i                     0    d Z ddlZd Zedk(  r e        yy)z pygame.examples.dropfile

Drag and drop an image on here.

Uses these events:

* DROPBEGIN
* DROPCOMPLETE
* DROPTEXT
* DROPFILE
    Nc                     t        j                          d} t         j                  j                  d      }t         j                  j                  dd      }t         j                  j                         }|j                  ddd      }|j                         }|j                         j                  |_
        d }d }| rt         j                  j                         D ]  }|j                  t         j                  k(  rd} $|j                  t         j                  k(  rt!        |       t!        d	       X|j                  t         j"                  k(  rt!        |       t!        d
       |j                  t         j$                  k(  rYt!        |       |j                  |j&                  dd      }|j                         }|j                         j                  |_
        |j                  t         j(                  k(  s!t!        |       |j                  |j*                  dd      }|j                         }|j                         j                  |_
        |j*                  dd  }	|	dv st         j,                  j/                  |j*                        j1                         }|j3                  d       |j                         }|j                         j                  |_
         |j5                  d       |j7                  ||       |r||j7                  ||       t         j                  j9                          |j;                  d       | rt        j<                          y )NT)i  i  Arial   zDrag and drop a file or image!   )   r   r   FzFile drop begin!zFile drop complete!)pngbmpjpg   )r   r   r      )pginitdisplayset_modefontSysFonttimeClockrenderget_rectcentereventgettypeQUIT	DROPBEGINprintDROPCOMPLETEDROPTEXTtextDROPFILEfileimageloadconvert	set_alphafillblitfliptickquit)
goingsurfr   clockspr_file_textspr_file_text_rectspr_file_imagespr_file_image_rectevfiletypes
             c/home/obispo/Crisostomo_bridge/mision_env/lib/python3.12/site-packages/pygame/examples/dropevent.pymainr7      si   GGIE::z*D77??7B'DGGMMOEKK @!_UM&//1 $ 6 6N
((,,. 	HBww"''!BLL(b	()BOO+b	+,BKK'b	 $BGGQ H%2%;%;%=",0MMO,B,B")BKK'b	 $BGGQ H%2%;%;%=",0MMO,B,B") 7723<44%'XX]]277%;%C%C%EN",,S1*8*A*A*C'151G1G'.5	H8 			)		-!341=IIn&9:




2G J GGI    __main__)__doc__pygamer   r7   __name__ r8   r6   <module>r>      s)   
 4n zF r8   