
66ic           @  sF  d  d l  m Z d  d l Z d  d l Z d  d l Z d  d l Z e j j d d e	 d e
 d e
 Z i  Z d e j j f d     YZ d	   Z e j e  Z d
 e f d     YZ e Z d   Z d e j j f d     YZ d Z d Z d Z d Z d Z d d d d d g Z d e j j j  f d     YZ! e" a# g  Z$ d   Z% d   Z& i  Z' e j e(  Z) e*   Z+ e" d  Z, d   Z- e
 a. e
 a/ g  a0 i  a1 d   Z2 d    Z3 d!   Z4 d"   Z5 d#   Z6 d$   Z7 e" d%  Z8 d&   Z9 d'   Z: d(   Z; e" d)  Z< d*   Z= d+   Z> e" d,  Z? e" e" d-  Z@ d.   ZA d/   ZB d S(0   i(   t   print_functionNt   profile_screent	   developert   appendt   flusht   ScreenProfilec           B  s,   e  Z d  Z e e e e e e e d  Z RS(   s?   
    :doc: profile_screen
    :name: renpy.profile_screen

    c	   	      C  s   | |  _  | |  _ | |  _ | |  _ | |  _ | |  _ | |  _ | d k	 r| t | t	  r| t
 | j    } |  t | <q| n  d S(   s  
        Requests screen profiling for the screen named `name`, which
        must be a string.

        Apart from `name`, all arguments must be supplied as keyword
        arguments. This function takes three groups of arguments.


        The first group of arguments determines when profiling occurs.

        `predict`
            If true, profiling occurs when the screen is being predicted.

        `show`
            If true, profiling occurs when the screen is first shown.

        `update`
            If true, profiling occurs when the screen is updated.

        `request`
            If true, profiling occurs when requested by pressing F8.

        The second group of arguments controls what profiling output is
        produced when profiling occurs.

        `time`
            If true, Ren'Py will log the amount of time it takes to evaluate
            the screen.

        `debug`
            If true, Ren'Py will log information as to how screens are
            evaluated, including:

            * Which displayables Ren'Py considers constant.
            * Which arguments, if any, needed to be evaluated.
            * Which displayables were reused.

            Producing and saving this debug information takes a noticeable
            amount of time, and so the `time` output should not be considered
            reliable if `debug` is set.

        The last group of arguments controls what output is produced once
        per Ren'Py run.

        `const`
            Displays the variables in the screen that are marked as const and
            not-const.

        All profiling output will be logged to profile_screen.txt in the game
        directory.
        N(   t   predictt   showt   updatet   requestt   timet   debugt   constt   Nonet
   isinstancet
   basestringt   tuplet   splitt   profile(	   t   selft   nameR   R   R   R	   R
   R   R   (    (    sc   Z:\home\souce\.local\share\Steam\steamapps\common\Doki Doki Literature Club\renpy\display\screen.pyt   __init__,   s    5							(   t   __name__t
   __module__t   __doc__t   FalseR   (    (    (    sc   Z:\home\souce\.local\share\Steam\steamapps\common\Doki Doki Literature Club\renpy\display\screen.pyR   %   s   c         C  sF   t  |  t  r$ t |  j    }  n  |  t k r8 t |  St d  Sd S(   s   
    Returns the profile object for the screen with `name`, or a default
    profile object if none exists.

    `name`
        A string or tuple.
    N(   R   R   R   R   R   R   R   (   R   (    (    sc   Z:\home\souce\.local\share\Steam\steamapps\common\Doki Doki Literature Club\renpy\display\screen.pyt   get_profileq   s
    	t   ScreenCachec           B  s   e  Z d  Z d   Z RS(   sh   
    Represents an entry in the screen cache. Upon creation, puts itself into
    the screen cache.
    c         C  sq   | j  d  k r d  S| |  _ | |  _ | |  _ t | } | j |   t |  t j	 j
 k rm | j d  n  d  S(   Ni    (   t   astR   t   argst   kwargst   cachet   predict_cacheR   t   lent   renpyt   configt   screen_cache_sizet   pop(   R   t   screenR   R   R   t   pc(    (    sc   Z:\home\souce\.local\share\Steam\steamapps\common\Doki Doki Literature Club\renpy\display\screen.pyR      s    			
(   R   R   R   R   (    (    (    sc   Z:\home\souce\.local\share\Steam\steamapps\common\Doki Doki Literature Club\renpy\display\screen.pyR      s   c         C  s}   |  j  d k r i  St |  } | s' i  SxL | D]5 } | j | k r. | j | k r. | j |  Pq. q. W| j d  } | j S(   sZ   
    Returns the cache to use when `screen` is accessed with `args` and
    `kwargs`.
    i    N(   R   R   R    R   t   removeR%   R   (   R&   R   R   R'   t   sc(    (    sc   Z:\home\souce\.local\share\Steam\steamapps\common\Doki Doki Literature Club\renpy\display\screen.pyt	   cache_get   s    
t   Screenc        	   B  s/   e  Z d  Z d d d d d e d d d  Z RS(   s~   
    A screen is a collection of widgets that are displayed together.
    This class stores information about the screen.
    R   t   0t   screensc         C  s5  t  | t  r$ t | j    } n  | |  _ | d  k sH t  | t  rT | g } n  x4 | D], } |  t | d | f <|  t | d | <q[ W| |  _ t  | t	 j
 j j  r | |  _ n	 d  |  _ | |  _ | |  _ | p | d |  _ | d  k rt	 j j } n  | |  _ | |  _ |	 |  _ |
 |  _ t a t a d  S(   Ni    (   R   R   R   R   R   R   R-   t   screens_by_namet   functionR"   t   sl2t   slastt   SLScreenR   t   modalt   zordert   tagR#   t   predict_screensR   t
   parameterst   locationt   layerR   t   preparedt   analyzed(   R   R   R/   R3   R4   R5   R   t   variantR7   R8   R9   t   v(    (    sc   Z:\home\souce\.local\share\Steam\steamapps\common\Doki Doki Literature Club\renpy\display\screen.pyR      s.    									N(   R   R   R   R   R   R   (    (    (    sc   Z:\home\souce\.local\share\Steam\steamapps\common\Doki Doki Literature Club\renpy\display\screen.pyR+      s   i    i   i   i   i   t   PREDICTt   SHOWt   UPDATEt   HIDEt   OLDt   ScreenDisplayablec           B  s   e  Z d  Z d d d d d d d d d	 d
 d d g Z e Z e Z d   Z i  i  d  Z d   Z	 d   Z
 d   Z d   Z d   Z d   Z d   Z d   Z d   Z d   Z d   Z d   Z d   Z d   Z RS(   s   
    A screen is a collection of widgets that are displayed together. This
    class is responsible for managing the display of a screen.
    R&   t   childt   childrent
   transformst   widgetst   old_widgetst   hidden_widgetst   old_transformsR   R   t   phaset	   use_cachec         C  s   t  |  j d  |  _ d  |  _ g  |  _ i  |  _ i  |  _ d  |  _ d  |  _	 i  |  _
 i  |  _ t |  _ i  |  _ t j |  j d   |  _ d  S(   Ni    (   t   get_screen_variantt   screen_nameR&   R   RD   RE   RF   RG   RH   RJ   RI   R   R@   RK   RL   R   t   get(   R   (    (    sc   Z:\home\souce\.local\share\Steam\steamapps\common\Doki Doki Literature Club\renpy\display\screen.pyt   after_setstate#  s    										c         K  s  t  t |   j |   | |  _ | |  _ | j |  _ |  j j |  _ t	 j
 |  j d   |  _	 | |  _ | |  _ t j j |  |  _ d  |  _ | |  _ i  |  _ i  |  _ | r | r t | |  } n d  } | d  k	 r | j |  _ n	 i  |  _ | d  k	 r	| j |  _ n	 i  |  _ d  |  _ d  |  _ | o9| j |  j k |  _ d  |  _ i  |  _ t |  _ t |  _  t j j! |  j j" d |  j |  _" t j j! |  j j# d |  j |  _# t$ |  _% d  S(   Nt   locals(&   t   superRC   R   t
   propertiesR&   R   RN   R8   t	   _locationR   RO   R   R5   R9   R"   t   pythont   RevertableDictt   scopeRD   t   widget_propertiesRG   R   t
   get_screenRF   RL   RH   RJ   t   old_transferst   current_transform_eventRI   R   t
   restartingt   hidingt   py_evalR3   R4   R>   RK   (   R   R&   R5   R9   RX   RW   RS   t
   old_screen(    (    sc   Z:\home\souce\.local\share\Steam\steamapps\common\Doki Doki Literature Club\renpy\display\screen.pyR   2  s@    																$$c         C  s   d j  d j |  j   S(   Ns	   Screen {}t    (   t   formatt   joinRN   (   R   (    (    sc   Z:\home\souce\.local\share\Steam\steamapps\common\Doki Doki Literature Club\renpy\display\screen.pyt   __unicode__  s    c         C  s
   |  j  g S(   N(   RD   (   R   (    (    sc   Z:\home\souce\.local\share\Steam\steamapps\common\Doki Doki Literature Club\renpy\display\screen.pyt   visit  s    c         C  s7   | |   z t  |   |  j j |  Wd  t   Xd  S(   N(   t   push_current_screenRD   t	   visit_allt   pop_current_screen(   R   t   callback(    (    sc   Z:\home\souce\.local\share\Steam\steamapps\common\Doki Doki Literature Club\renpy\display\screen.pyRf     s
    

c         C  s$   t  j j j |  d  |  j   d  S(   Ni    (   R"   t   displayt   rendert   redrawR   (   R   (    (    sc   Z:\home\souce\.local\share\Steam\steamapps\common\Doki Doki Literature Club\renpy\display\screen.pyt   per_interact  s    c         C  s#   t  t |   j |  | |  _ d  S(   N(   RR   RC   t   set_transform_eventR[   (   R   t   event(    (    sc   Z:\home\souce\.local\share\Steam\steamapps\common\Doki Doki Literature Club\renpy\display\screen.pyRm     s    c         C  sa   |  j  t k p |  j  t k } z4 t |   |  j rQ | rQ |  j j | |  n  Wd  t   Xd  S(   N(   RK   RB   RA   Re   RD   t   find_focusableRg   (   R   Rh   t
   focus_nameR]   (    (    sc   Z:\home\souce\.local\share\Steam\steamapps\common\Doki Doki Literature Club\renpy\display\screen.pyRo     s    
c         C  sj   t  |  j |  j |  j |  j |  j |  j  } |  j j   | _ |  j	 j   | _	 t
 | _ |  j | _ | S(   N(   RC   R&   R5   R9   RX   RW   RS   RF   t   copyRG   t   TrueRZ   RD   (   R   t   rv(    (    sc   Z:\home\souce\.local\share\Steam\steamapps\common\Doki Doki Literature Club\renpy\display\screen.pyRq     s    -	c   
      C  s  |  j  t k r |  } n t j |   |  j   |  j d  k rB d  S|  j d  k rU d  S|  j j d  k	 r |  j j j	 |  j
 j d i    n  |  j   } x! |  j j D] } | j |  q Wt | _  d  } | j } t | t j j j  s d  St j j   t j j d d d j |  j   | _ | j g | _ t j j   xa | j D]V } | j | | |  }	 |	 d  k	 rKt j j j |	 d  | j j |	  | } qKqKW| d  k	 rt j j j | d  n  | S(   Ni    t   focust   _screen_t   _(   RK   RA   t   updated_screenst   discardR   R&   R   RD   R   t   copy_on_changeR   RO   Rq   RE   Rm   R   R"   Ri   t   layoutt   MultiBoxt   uit   detachedt   fixedRb   RN   t   closet   _hideRj   Rk   t   add(
   R   t   stt   att   kindt   hidt   iRs   t	   old_childt   dt   c(    (    sc   Z:\home\souce\.local\share\Steam\steamapps\common\Doki Doki Literature Club\renpy\display\screen.pyR     s>    	
%		(c         C  s   |  j  d  k r |  S|  j d  k r& |  St j j s6 |  S|  j  j d  k	 rm |  j  j j |  j j	 d i    n  |  j
   } t | _ |  j j   | _ | S(   Ni    (   R&   R   RD   R"   R#   t   transition_screensR   Ry   R   RO   Rq   RB   RK   t   _in_current_store(   R   Rs   (    (    sc   Z:\home\souce\.local\share\Steam\steamapps\common\Doki Doki Literature Club\renpy\display\screen.pyR     s    %	c   	      C  s  |  t  k r d  St  j |   |  j d  k rE t j j j   |  _ i  S|  j	 sl |  j
 t k sl |  j
 t k r |  j s t j j j   |  _ n  |  j St } t } |  j r|  j
 t k r |  j j r t } nH |  j
 t k r |  j j r t } n$ |  j
 t k r|  j j rt } n  t j j j r9|  j j r9t } n  | rt j d t |  j
 d j |  j  t j j    j! d   t" j"   } |  j j# rt } qqn  |  j |  _$ |  j% |  _& i  |  _ i  |  _% t' |   t j( j } |  t j( _ d } |  j) j* | d   } z t j( j+   t j( j, d d d j |  j   |  _ |  j g |  _- |  j. |  j. d <| |  j. d	 <| |  j. d
 <|  j j/ |  j.   t j( j0   Wd  | t j( _ t1   Xd  |  _$ d  |  _& t |  _2 |  j) j* | d   | k	 r|  j3 d  k r|  j
 t k rd |  _3 n  |  j3 rMx$ |  j j- D] } | j4 |  j3  q'Wd  |  _3 n  | rt" j"   } |  j j" rt j d d | |  n  |  j j# rt j d  qn  |  j
 t k rt |  _
 n  |  j S(   Ns   %s %s %sR`   s   %H:%M:%S.%fi    Rt   Ru   Rv   t   _scopet   _namet   _debugR   s	   * %.2f msi  s   
(5   Rw   R   R&   R   R"   Ri   Rz   t   NullRD   R\   RK   RA   RB   RG   R   R   R@   R   Rr   R?   R   R>   R   t	   interfacet   profile_onceR	   t   profile_logt   writet
   phase_nameRb   RN   t   datetimet   nowt   strftimeR
   R   RH   RF   RJ   Re   R|   R   RO   R}   R~   RE   RW   R/   R   Rg   RZ   R[   Rm   (	   R   R   R   t   startt   old_ui_screent   NAMEt	   old_cacheR   t   end(    (    sc   Z:\home\souce\.local\share\Steam\steamapps\common\Doki Doki Literature Club\renpy\display\screen.pyR     s    '							
		
(			9	c         C  s   |  j  s |  j   n  z2 t |   t j j j |  j  | | | |  } Wd  t   Xt j j j | |  } |  | _ |  j	 t
 k p |  j	 t k } | j | d d | d | |  j o | | _ | S(   Ni    Rt   t   main(   i    i    (   RD   R   Re   R"   Ri   Rj   Rg   t   Rendert   focus_screenRK   RB   RA   t   blitR3   (   R   t   wt   hR   R   RD   Rs   R]   (    (    sc   Z:\home\souce\.local\share\Steam\steamapps\common\Doki Doki Literature Club\renpy\display\screen.pyRj   h  s    	
(	c         C  s#   |  j  s |  j   n  |  j  j   S(   N(   RD   R   t   get_placement(   R   (    (    sc   Z:\home\souce\.local\share\Steam\steamapps\common\Doki Doki Literature Club\renpy\display\screen.pyR   }  s    	c         C  s   |  j  t k s |  j  t k r" d  Sz) t |   |  j j | | | |  } Wd  t   X| d  k	 rf | S|  j r t	 j
 j j    n  d  S(   N(   RK   RB   RA   Re   RD   Rn   Rg   R   R3   R"   Ri   Rz   t   IgnoreLayers(   R   t   evt   xt   yR   Rs   (    (    sc   Z:\home\souce\.local\share\Steam\steamapps\common\Doki Doki Literature Club\renpy\display\screen.pyRn     s    
	c         C  s   t  |  j S(   N(   R   RK   (   R   (    (    sc   Z:\home\souce\.local\share\Steam\steamapps\common\Doki Doki Literature Club\renpy\display\screen.pyt   get_phase_name  s    (   R   R   R   t   nosaveR   R\   R]   RP   R   Rc   Rd   Rf   Rl   Rm   Ro   Rq   R   R   R   Rj   R   Rn   R   (    (    (    sc   Z:\home\souce\.local\share\Steam\steamapps\common\Doki Doki Literature Club\renpy\display\screen.pyRC     s(   *	V										3		m			c         C  s   t  j t  |  a d  S(   N(   t   current_screen_stackR   t   _current_screen(   R&   (    (    sc   Z:\home\souce\.local\share\Steam\steamapps\common\Doki Doki Literature Club\renpy\display\screen.pyRe     s    c          C  s   t  j   }  d  S(   N(   R   R%   (   R   (    (    sc   Z:\home\souce\.local\share\Steam\steamapps\common\Doki Doki Literature Club\renpy\display\screen.pyRg     s    c         C  sX   | d k r t j j } n  x6 | D]. } t j |  | f d  } | d k	 r" | Sq" Wd S(   si   
    Get a variant screen object for `name`.

    `candidates`
        A list of candidate variants.
    N(   R   R"   R#   t   variantsR-   RO   (   R   t
   candidatesR   Rs   (    (    sc   Z:\home\souce\.local\share\Steam\steamapps\common\Doki Doki Literature Club\renpy\display\screen.pyRM     s    c         C  sQ   g  } xD t  j   D]6 \ } } | d |  k r | j | d | f  q q W| S(   s   
    Gets all variants of the screen with `name`.

    Returns a list of (`variant`, `screen`) tuples, in no particular
    order.
    i    i   (   R-   t	   iteritemsR   (   R   Rs   t   kR=   (    (    sc   Z:\home\souce\.local\share\Steam\steamapps\common\Doki Doki Literature Club\renpy\display\screen.pyt   get_all_screen_variants  s
    c            s2  t  t k r t St j t    t j t   x` t j   D]R \ }  } |  d     | j sh q; n      f d   } | j j |  q; Wg  } d     j   D } xl | r| j	    | j
   x?   D]3 }   | } | j   | s | j |  q q W  =q W| a t t  a  | S(   sG   
    Produces a list of SL2 screens in topologically sorted order.
    i    c           s&      j  |    |  j    d  S(   N(   R   (   t   uses(   t   dependsR   t   reverse(    sc   Z:\home\souce\.local\share\Steam\steamapps\common\Doki Doki Literature Club\renpy\display\screen.pyRh     s    c         S  s(   h  |  ] \ } } t  |  s |  q S(    (   R!   (   t   .0R   R=   (    (    sc   Z:\home\souce\.local\share\Steam\steamapps\common\Doki Doki Literature Club\renpy\display\screen.pys	   <setcomp>  s   	 (   t   screens_at_sortR-   t   sorted_screenst   collectionst   defaultdictt   sett   itemsR   t   used_screensR%   R   R(   R   t   dict(   R   R=   Rh   Rs   t   worksetR   R   (    (   R   R   R   sc   Z:\home\souce\.local\share\Steam\steamapps\common\Doki Doki Literature Club\renpy\display\screen.pyt   sort_screens  s2    
		
c          C  s5   g  }  x( t    D] } |  j t | j    q W|  S(   sB   
    Produces a list of screen variants in topological order.
    (   R   t   extendR.   t   values(   Rs   R   (    (    sc   Z:\home\souce\.local\share\Steam\steamapps\common\Doki Doki Literature Club\renpy\display\screen.pyt   sorted_variants  s    c          C  sJ   t  r
 d Sx3 t   D]( }  |  j d k r/ q n  |  j j   q Wt a  d S(   s   
    Analyzes all screens.
    N(   R;   R   R   R   t   analyze_screenRr   (   t   s(    (    sc   Z:\home\souce\.local\share\Steam\steamapps\common\Doki Doki Literature Club\renpy\display\screen.pyt   analyze_screens)  s    c          C  sq   t  r
 d St j   t s$ t   n  x@ t   D]5 }  |  j d k rI q. n  |  j j   |  j j	   q. Wt
 a  d S(   s'   
    Prepares all screens for use.
    N(   R:   R    t   clearR;   R   R   R   R   t   unprepare_screent   prepare_screenRr   (   R   (    (    sc   Z:\home\souce\.local\share\Steam\steamapps\common\Doki Doki Literature Club\renpy\display\screen.pyt   prepare_screens<  s    

c          O  s   t  |  |   d S(   s  
    :doc: screens
    :args: (name, function, modal="False", zorder="0", tag=None, variant=None)

    Defines a screen with `name`, which should be a string.

    `function`
        The function that is called to display the screen. The
        function is called with the screen scope as keyword
        arguments. It should ignore additional keyword arguments.

        The function should call the ui functions to add things to the
        screen.

    `modal`
        A string that, when evaluated, determines of the created
        screen should be modal. A modal screen prevents screens
        underneath it from receiving input events.

    `zorder`
        A string that, when evaluated, should be an integer. The integer
        controls the order in which screens are displayed. A screen
        with a greater zorder number is displayed above screens with a
        lesser zorder number.

    `tag`
        The tag associated with this screen. When the screen is shown,
        it replaces any other screen with the same tag. The tag
        defaults to the name of the screen.

    `predict`
        If true, this screen can be loaded for image prediction. If false,
        it can't. Defaults to true.

    `variant`
        String. Gives the variant of the screen to use.

    N(   R+   (   R   R   (    (    sc   Z:\home\souce\.local\share\Steam\steamapps\common\Doki Doki Literature Club\renpy\display\screen.pyt   define_screenU  s    (c         C  sC   t  |  t  s |  d }  n  t |   } | d k r8 d S| j Sd S(   sC   
    Returns the layer that the screen with `name` is part of.
    i    R-   N(   R   R   RM   R   R9   (   R   R&   (    (    sc   Z:\home\souce\.local\share\Steam\steamapps\common\Doki Doki Literature Club\renpy\display\screen.pyt   get_screen_layer  s    c         C  s   | d k r t |   } n  t |  t  r6 |  f }  n  t j j   } xR |  D]J } | j | |  } | d k	 rt | S| j | |   } | d k	 rL | SqL Wd S(   s  
    :doc: screens

    Returns the ScreenDisplayable with the given `name` on layer. `name`
    is first interpreted as a tag name, and then a screen name. If the
    screen is not showing, returns None.

    This can also take a list of names, in which case the first screen
    that is showing is returned.

    This function can be used to check if a screen is showing, using code
    like::

        if renpy.get_screen("say"):
            text "The say screen is showing."
        else:
            text "The say screen is hidden."

    N(	   R   R   R   R   R"   t   exportst   scene_listst   get_displayable_by_tagt   get_displayable_by_name(   R   R9   t   slR5   t   sd(    (    sc   Z:\home\souce\.local\share\Steam\steamapps\common\Doki Doki Literature Club\renpy\display\screen.pyRY     s    c         C  sJ   t  |  t  s$ t |  j    }  n  |  s. t St |  d  rB t St Sd S(   s>   
    Returns true if a screen with the given name exists.
    i    N(   R   R   R   R   RM   Rr   (   R   (    (    sc   Z:\home\souce\.local\share\Steam\steamapps\common\Doki Doki Literature Club\renpy\display\screen.pyt
   has_screen  s    c         O  s  | j  d d  } | j  d d  } | j  d i   } | j  d t  } |  } t | t  sr t | j    } n  t | d  } | d k r t d | d f   n  | d k r t |  } n  | d k r | j	 } n  i  }	 | j
 r| |	 d <| |	 d <n |	 j |  t | | | | |	  }
 t | |  } | r\| j r\| j |
 _ t |
 _ n t | | |  |
 _ t |
 _ t j j j   } | j | |
 | d	 |
 j d
 | d t d | d S(   s  
    :doc: screens

    The programmatic equivalent of the show screen statement.

    Shows the named screen. This takes the following keyword arguments:

    `_screen_name`
        The name of the  screen to show.
    `_layer`
        The layer to show the screen on.
    `_tag`
        The tag to show the screen with. If not specified, defaults to
        the tag associated with the screen. It that's not specified,
        defaults to the name of the screen.,
    `_widget_properties`
        A map from the id of a widget to a property name -> property
        value map. When a widget with that id is shown by the screen,
        the specified properties are added to it.
    `_transient`
        If true, the screen will be automatically hidden at the end of
        the current interaction.

    Keyword arguments not beginning with underscore (_) are used to
    initialize the screen's scope.
    t   _layert   _tagt   _widget_propertiest
   _transienti    s   Screen %s is not known.
t   _kwargst   _argsR4   t	   transientt   keep_stR   N(   R%   R   R   R   R   R   RM   t	   ExceptionR   R5   R7   R   RC   RY   R   R@   RK   R*   R?   R"   Ri   t   coreR   R   R4   Rr   (   t   _screen_nameR   R   R   R   R   R   R   R&   RW   R   t   old_dt   sls(    (    sc   Z:\home\souce\.local\share\Steam\steamapps\common\Doki Doki Literature Club\renpy\display\screen.pyt   show_screen  s8    	
	c         O  s  | j  d d  } | j  d d  } | j  d i   } | j  d t  } |  } t j j rs t j j j d |  n  t	 | t
  s t
 | j    } n  t | d  } | d k r d S| d k r t |  } n  i  }	 |	 |	 d <| j r| |	 d	 <| |	 d
 <n |	 j |  y | d k r8t d | d f   n  | j sEd St | d d | |	  }
 t | | |  |
 _ |
 j   t | | | |
 j  t j j j |
  Wn9 t j j rd d l } t d |   | j   qn Xt j j   d S(   s  
    Predicts the displayables that make up the given screen.

    `_screen_name`
        The name of the  screen to show.
    `_widget_properties`
        A map from the id of a widget to a property name -> property
        value map. When a widget with that id is shown by the screen,
        the specified properties are added to it.

    Keyword arguments not beginning with underscore (_) are used to
    initialize the screen's scope.
    R   R   R   R   s   Predict screen %si    NR   R   R   s   Screen %s is not known.
is   While predicting screen(   R%   R   R   R"   R#   t   debug_image_cacheRi   t   ic_logR   R   R   R   RM   R   R7   R   R   R   RC   R*   R   t	   cache_putt   displayablet	   tracebackt   printt	   print_excR|   t   reset(   R   R   R   R   R   R   R   R   R&   RW   R   R   (    (    sc   Z:\home\souce\.local\share\Steam\steamapps\common\Doki Doki Literature Club\renpy\display\screen.pyt   predict_screen  sH    
	
	
c         C  sY   | d k r t |  f  } n  t |  |  } | d k	 rU t j j | j d | n  d S(   s   
    :doc: screens

    The programmatic equivalent of the hide screen statement.

    Hides the screen with `tag` on `layer`.
    R9   N(   R   R   RY   R"   R   t   hideR5   (   R5   R9   R&   (    (    sc   Z:\home\souce\.local\share\Steam\steamapps\common\Doki Doki Literature Club\renpy\display\screen.pyt   hide_screenZ  s
    	c   	      O  s  | j  d d  } | j  d i   } |  } t | t  sN t | j    } n  t | d  } | d  k r t d | f   n  t j } t	 t _ | j
 r i  } | | d <| | d <n | j   } | j |  | | d <| | f | d <| j |   | t _ d  S(   NR   R   i    s   Screen %r is not known.R   R   (    (   R%   R   R   R   RM   R   R   R   RZ   Rr   R7   Rq   R   R/   (	   R   R   R   R   R   R   R&   RZ   RW   (    (    sc   Z:\home\souce\.local\share\Steam\steamapps\common\Doki Doki Literature Club\renpy\display\screen.pyt
   use_screenl  s(    			

c           C  s   t  S(   N(   R   (    (    (    sc   Z:\home\souce\.local\share\Steam\steamapps\common\Doki Doki Literature Club\renpy\display\screen.pyt   current_screen  s    c         C  s   t  |  t  r |  j }  n  |  d k r3 t   }  n* | d k rN t |   } n  t |  |  }  t  |  t  sp d S|  j d k r |  j   n  |  j	 j
 | d  } | S(   s   
    :doc: screens

    From the `screen` on `layer`, returns the widget with
    `id`. Returns None if the screen doesn't exist, or there is no
    widget with that id on the screen.
    N(   R   RC   RN   R   R   R   RY   RD   R   RG   RO   (   R&   t   idR9   Rs   (    (    sc   Z:\home\souce\.local\share\Steam\steamapps\common\Doki Doki Literature Club\renpy\display\screen.pyt
   get_widget  s    	c         C  s   | d k r t   } n* | d k r3 t |  } n  t | |  } | d k rR i  S| j j |  d  } | d k r| i  } n  | S(   sR  
    :doc: screens

    Returns the properties for the widget with `id` in the `screen`
    on `layer`. If `screen` is None, returns the properties for the
    current screen.

    This can be used inside screen code.

    Note that this returns a dictionary containing the widget properties,
    and so to get an individual property
    N(   R   R   R   RY   RX   RO   (   R   R&   R9   R   Rs   (    (    sc   Z:\home\souce\.local\share\Steam\steamapps\common\Doki Doki Literature Club\renpy\display\screen.pyt   get_widget_properties  s    	c          C  sk   xd t  j j j j   D]M \ }  } |  d k r4 q n  x, | j D]! } t | t  r> t	 | _
 q> q> Wq Wd S(   s   
    This is called before Ren'Py restarts to put the screens into restart
    mode, which prevents crashes due to variables being used that are no
    longer defined.
    N(   R"   Ri   R   t	   old_sceneR   R   RE   R   RC   Rr   R\   (   R   R9   R   (    (    sc   Z:\home\souce\.local\share\Steam\steamapps\common\Doki Doki Literature Club\renpy\display\screen.pyt   before_restart  s    "c         C  s   |  } t  j j d k r" | } n! t  j j t k r= t } n t } | r xl t  j j D]% } t |  d k rV t	 |  qV qV Wn6 x3 t  j j D]% } t |  d k	 r t
 |  q q Wd S(   sC   
    Called from interact to show or hide the overlay screens.
    N(   R"   t   storet   _overlay_screensR   Rr   R   R#   t   overlay_screensRY   R   R   (   t   suppress_overlayR   R   (    (    sc   Z:\home\souce\.local\share\Steam\steamapps\common\Doki Doki Literature Club\renpy\display\screen.pyt   show_overlay_screens  s    		(C   t
   __future__R    t   renpy.displayR"   R
   R   R   t   logt   openRr   R   R   R   t   objectt   ObjectR   R   R   t   listR    R   R   R*   R+   R>   R?   R@   RA   RB   R   Ri   Rz   t	   ContainerRC   R   R   R   Re   Rg   R-   R   R.   R   Rw   RM   R   R;   R:   R   R   R   R   R   R   R   R   RY   R   R   R   R   R   R   R   R   R   R   (    (    (    sc   Z:\home\souce\.local\share\Steam\steamapps\common\Doki Doki Literature Club\renpy\display\screen.pyt   <module>   sn   $L		I	 					;				+	*		I	F	"	!	