ó
;…6ic           @   s  d  d l  m Z m Z d  d l Z d „  Z d e j j j f d „  ƒ  YZ	 d e j j j f d „  ƒ  YZ
 d „  Z d	 e
 f d
 „  ƒ  YZ d e
 f d „  ƒ  YZ d e f d „  ƒ  YZ d e
 f d „  ƒ  YZ d „  Z d e j j f d „  ƒ  YZ e ƒ  Z d e
 f d „  ƒ  YZ d „  Z d e j j j f d „  ƒ  YZ i  Z d „  Z d „  Z d „  Z d „  Z d „  Z d e
 f d „  ƒ  YZ  d  „  Z! d! e
 f d" „  ƒ  YZ" d# e j j j f d$ „  ƒ  YZ# d% e
 f d& „  ƒ  YZ$ d' e
 f d( „  ƒ  YZ% d) e
 f d* „  ƒ  YZ& d+ e
 f d, „  ƒ  YZ' d S(-   iÿÿÿÿ(   t   rendert   RenderNc         C   s   t  |  t ƒ r |  | S|  Sd S(   sj   
    If num is a float, multiplies it by base and returns that. Otherwise,
    returns num unchanged.
    N(   t
   isinstancet   float(   t   numt   base(    (    sc   Z:\home\souce\.local\share\Steam\steamapps\common\Doki Doki Literature Club\renpy\display\layout.pyt   scale   s    t   Nullc           B   s&   e  Z d  Z d d d „ Z d „  Z RS(   sr  
    :doc: disp_imagelike
    :name: Null

    A displayable that creates an empty box on the screen. The size
    of the box is controlled by `width` and `height`. This can be used
    when a displayable requires a child, but no child is suitable, or
    as a spacer inside a box.

    ::

        image logo spaced = HBox("logo.png", Null(width=100), "logo.png")

    i    c         K   s,   t  t |  ƒ j |   | |  _ | |  _ d  S(   N(   t   superR   t   __init__t   widtht   height(   t   selfR
   R   t
   properties(    (    sc   Z:\home\souce\.local\share\Steam\steamapps\common\Doki Doki Literature Club\renpy\display\layout.pyR	   9   s    	c         C   sJ   t  j j j |  j |  j ƒ } |  j rF | j |  d  d  d  d  d  ƒ n  | S(   N(	   t   renpyt   displayR    R   R
   R   t	   focusablet	   add_focust   None(   R   R
   R   t   stt   att   rv(    (    sc   Z:\home\souce\.local\share\Steam\steamapps\common\Doki Doki Literature Club\renpy\display\layout.pyR    >   s    	(   t   __name__t
   __module__t   __doc__R	   R    (    (    (    sc   Z:\home\souce\.local\share\Steam\steamapps\common\Doki Doki Literature Club\renpy\display\layout.pyR   )   s   t	   Containerc           B   s‰   e  Z d  Z e 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‡  
    This is the base class for containers that can have one or more
    children.

    @ivar children: A list giving the children that have been added to
    this container, in the order that they were added in.

    @ivar child: The last child added to this container. This is also
    used to access the sole child in containers that can only hold
    one child.

    @ivar offsets: A list giving offsets for each of our children.
    It's expected that render will set this up each time it is called.

    @ivar sizes: A list giving sizes for each of our children. It's
    also expected that render will set this each time it is called.

    c         O   s_   |  j  ƒ  |  _ d  |  _ |  j  ƒ  |  _ x | D] } |  j | ƒ q. Wt t |  ƒ j |   d  S(   N(	   t
   _list_typet   childrenR   t   childt   offsetst   addR   R   R	   (   R   t   argsR   t   i(    (    sc   Z:\home\souce\.local\share\Steam\steamapps\common\Doki Doki Literature Club\renpy\display\layout.pyR	   _   s    	c         C   sA   t  t |  ƒ j | | ƒ x! |  j D] } | j | t ƒ q# Wd  S(   N(   R   R   t   set_style_prefixR   t   False(   R   t   prefixt   rootR    (    (    sc   Z:\home\souce\.local\share\Steam\steamapps\common\Doki Doki Literature Club\renpy\display\layout.pyR!   j   s    c         C   s    |  j  s |  S|  j | ƒ } g  |  j D] } | j | ƒ ^ q& | _ | j r` | j d | _ n  t | _  x0 | j D]% } | j ƒ  | j  rs t | _  qs qs W| S(   Niÿÿÿÿ(   t   _duplicatablet   _copyR   t
   _duplicateR   R"   t   _uniquet   True(   R   R   R   R    (    (    sc   Z:\home\souce\.local\share\Steam\steamapps\common\Doki Doki Literature Club\renpy\display\layout.pyR'   p   s    	(		
	c         C   sˆ   g  } t  } x: |  j D]/ } | j ƒ  } | | | k	 O} | j | ƒ q W| sS |  S|  j ƒ  } | | _ | j r„ | j d | _ n  | S(   Niÿÿÿÿ(   R"   R   t   _in_current_storet   appendR&   R   (   R   R   t   changedt   oldt   newR   (    (    sc   Z:\home\souce\.local\share\Steam\steamapps\common\Doki Doki Literature Club\renpy\display\layout.pyR*   …   s    		c         C   sS   t  j j | ƒ } |  j j | ƒ | |  _ |  j ƒ  |  _ | j rO t	 |  _ n  d S(   s1   
        Adds a child to this container.
        N(
   R   t   easyt   displayableR   R+   R   R   R   R%   R)   (   R   t   dR   (    (    sc   Z:\home\souce\.local\share\Steam\steamapps\common\Doki Doki Literature Club\renpy\display\layout.pyR   ›   s    		c         C   sA   d  |  _ |  j ƒ  |  _ |  j ƒ  |  _ t j j j |  d ƒ d  S(   Ni    (	   R   R   R   R   R   R   R   R    t   redraw(   R   (    (    sc   Z:\home\souce\.local\share\Steam\steamapps\common\Doki Doki Literature Club\renpy\display\layout.pyt   _clearª   s    	c         C   s|   x1 t  |  j ƒ D] \ } } | | k r Pq q Wd S|  j j | ƒ |  j ƒ  |  _ |  j ro |  j d |  _ n	 d |  _ d S(   st   
        Removes the first instance of child from this container. May
        not work with all containers.
        Niÿÿÿÿ(   t	   enumerateR   t   popR   R   R   R   (   R   R1   R    t   c(    (    sc   Z:\home\souce\.local\share\Steam\steamapps\common\Doki Doki Literature Club\renpy\display\layout.pyt   remove±   s    	c         C   s   t  j j j |  ƒ d S(   sw   
        This should be called if a child is added to this
        displayable outside of the render function.
        N(   R   R   R    t
   invalidate(   R   (    (    sc   Z:\home\souce\.local\share\Steam\steamapps\common\Doki Doki Literature Club\renpy\display\layout.pyt   updateÅ   s    c   	      C   s|   t  | | ƒ } |  j ƒ  |  _ xW |  j D]L } t | | | | | ƒ } | j | d d | | | ƒ } |  j j | ƒ q( W| S(   Ni    (   R   R   R   R   R    t   placeR+   (	   R   R
   R   R   R   R   R6   t   crt   offset(    (    sc   Z:\home\souce\.local\share\Steam\steamapps\common\Doki Doki Literature Club\renpy\display\layout.pyR    Í   s    c         C   s£   |  j  } |  j } t | ƒ t | ƒ k r. d  Sxn t t | ƒ d d d ƒ D]P } | | } | | \ }	 }
 | j | | |	 | |
 | ƒ } | d  k	 rK | SqK Wd  S(   Ni   iÿÿÿÿ(   R   R   t   lenR   t   xranget   event(   R   t   evt   xt   yR   R   R   R    R1   t   xot   yoR   (    (    sc   Z:\home\souce\.local\share\Steam\steamapps\common\Doki Doki Literature Club\renpy\display\layout.pyR?   Ù   s    		#
 c         C   s   |  j  S(   N(   R   (   R   (    (    sc   Z:\home\souce\.local\share\Steam\steamapps\common\Doki Doki Literature Club\renpy\display\layout.pyt   visitî   s    c         C   s   t  j j |  ƒ |  S(   N(   R   t   uit   context_enter(   R   (    (    sc   Z:\home\souce\.local\share\Steam\steamapps\common\Doki Doki Literature Club\renpy\display\layout.pyt	   __enter__ô   s    c         C   s   t  j j |  ƒ t S(   N(   R   RF   t   context_exitR"   (   R   t   exc_typet   exc_valt   exc_tb(    (    sc   Z:\home\souce\.local\share\Steam\steamapps\common\Doki Doki Literature Club\renpy\display\layout.pyt   __exit__ù   s    (   R   R   R   t   listR   R	   R!   R'   R*   R   R3   R7   R9   R    R?   RE   RH   RM   (    (    (    sc   Z:\home\souce\.local\share\Steam\steamapps\common\Doki Doki Literature Club\renpy\display\layout.pyR   G   s   												c   
      O   sÚ   | j  d d ƒ |  \ } } t d | d | d | d | |  } t | ƒ d d k re t d	 ƒ ‚ n  xn t | d d
 d … | d d
 d … ƒ D]C \ } } | \ } }	 | j t | d | d d d |	 d d ƒƒ q W| S(   s»  
    :doc: disp_imagelike

    This creates a new displayable of `size`, by compositing other
    displayables. `size` is a (width, height) tuple.

    The remaining positional arguments are used to place images inside
    the LiveComposite. The remaining positional arguments should come
    in groups of two, with the first member of each group an (x, y)
    tuple, and the second member of a group is a displayable that
    is composited at that position.

    Displayables are composited from back to front.

    ::

       image eileen composite = LiveComposite(
           (300, 600),
           (0, 0), "body.png",
           (0, 0), "clothes.png",
           (50, 50), "expression.png")
    t   stylet   image_placementt   xmaximumt   ymaximumt   xminimumt   yminimumi   i    s2   LiveComposite requires an odd number of arguments.Ni   t   xpost   xanchort   ypost   yanchor(   t
   setdefaultt   FixedR=   t	   Exceptiont   zipR   t   Position(
   t   sizeR   R   R
   R   R   t   post   widgetRU   RW   (    (    sc   Z:\home\souce\.local\share\Steam\steamapps\common\Doki Doki Literature Club\renpy\display\layout.pyt   LiveCompositeÿ   s    $6/R]   c           B   s,   e  Z d  Z d d „ Z d „  Z d „  Z RS(   s  
    Controls the placement of a displayable on the screen, using
    supplied position properties. This is the non-curried form of
    Position, which should be used when the user has directly created
    the displayable that will be shown on the screen.
    RP   c         K   s-   t  t |  ƒ j d | |  |  j | ƒ d S(   sè   
        @param child: The child that is being laid out.

        @param style: The base style of this position.

        @param properties: Position properties that control where the
        child of this widget is placed.
        RO   N(   R   R]   R	   R   (   R   R   RO   R   (    (    sc   Z:\home\souce\.local\share\Steam\steamapps\common\Doki Doki Literature Club\renpy\display\layout.pyR	   /  s    
c         C   sY   t  |  j | | | | ƒ } d g |  _ t j j  j | j | j ƒ } | j | d ƒ | S(   Ni    (   i    i    (   i    i    (	   R    R   R   R   R   R   R
   R   t   blit(   R   R
   R   R   R   t   surfR   (    (    sc   Z:\home\souce\.local\share\Steam\steamapps\common\Doki Doki Literature Club\renpy\display\layout.pyR    <  s
    c   	      C   s]  |  j  j ƒ  \ } } } } } } } | d  k r9 d } n  | d  k rN d } n  |  j j } | d  k	 ro | } n  |  j j } | d  k	 r | } n  |  j j } | d  k	 r± | } n  |  j j } | d  k	 rÒ | } n  |  j j } | d  k	 r÷ | | 7} n  |  j j	 } | d  k	 r| | 7} n  |  j j
 } | rD| d  k	 rD| } n  | | | | | | | f S(   Ni    (   R   t   get_placementR   RO   RU   RW   RV   RX   t   xoffsett   yoffsett   subpixel(	   R   RU   RW   RV   RX   Re   Rf   Rg   t   v(    (    sc   Z:\home\souce\.local\share\Steam\steamapps\common\Doki Doki Literature Club\renpy\display\layout.pyRd   G  s6    $							(   R   R   R   R	   R    Rd   (    (    (    sc   Z:\home\souce\.local\share\Steam\steamapps\common\Doki Doki Literature Club\renpy\display\layout.pyR]   '  s   	t   Gridc           B   s)   e  Z d  Z d e d d „ Z d „  Z RS(   sÊ   
    A grid is a widget that evenly allocates space to its children.
    The child widgets should not be greedy, but should instead be
    widgets that only use part of the space available to them.
    t   gridc         K   sr   | d k	 r | j d | ƒ n  t t |  ƒ j d | |  t | ƒ } t | ƒ } | |  _ | |  _ | |  _ d S(   sÁ   
        @param cols: The number of columns in this widget.

        @params rows: The number of rows in this widget.

        @params transpose: True if the grid should be transposed.
        t   spacingRO   N(	   R   RY   R   Ri   R	   t   intt   colst   rowst	   transpose(   R   Rm   Rn   t   paddingRo   RO   R   (    (    sc   Z:\home\souce\.local\share\Steam\steamapps\common\Doki Doki Literature Club\renpy\display\layout.pyR	   v  s    		c      	   C   s3  |  j  j } |  j } |  j } t |  j ƒ | | k rn t |  j ƒ | | k  r_ t d ƒ ‚ qn t d ƒ ‚ n  |  j rÊ g  } xS t | ƒ D]9 }	 x0 t | ƒ D]" }
 | j	 |  j |	 |
 | ƒ q WqŠ Wn	 |  j } | } | } |  j  j
 r| | d | | } n  |  j  j r)| | d | | } n  g  | D] } t | | | | | ƒ ^ q0} g  | D] } | j ƒ  ^ q[} d } d } x2 | D]* \ } } t | | ƒ } t | | ƒ } q†W|  j  j
 rÉ| } n  |  j  j rÞ| } n  | | | | d } | | | | d } t j j j | | ƒ } g  } xœ t d | ƒ D]‹ }	 x‚ t d | ƒ D]q }
 | |
 |	 | } | |
 |	 | } |
 | | } |	 | | } | j | | | | | | ƒ } | j	 | ƒ qNWq8W|  j r&g  |  _ xS t | ƒ D]9 }
 x0 t | ƒ D]" }	 |  j j	 | |	 | |
 ƒ qùWqæWn	 | |  _ | S(   Ns   Grid not completely full.s   Grid overfull.i   i    (   RO   Rk   Rm   Rn   R=   R   R[   Ro   t   rangeR+   t   xfillt   yfillR    t   get_sizet   maxR   R   R   R:   R   (   R   R
   R   R   R   Rp   Rm   Rn   R   RB   RA   t   renwidtht	   renheightR    t   renderst   sizest   cwidtht   cheightt   wt   hR   R   R   Rc   RU   RW   R<   (    (    sc   Z:\home\souce\.local\share\Steam\steamapps\common\Doki Doki Literature Club\renpy\display\layout.pyR    Ž  sb    			'	+				'	N(   R   R   R   R   R"   R	   R    (    (    (    sc   Z:\home\souce\.local\share\Steam\steamapps\common\Doki Doki Literature Club\renpy\display\layout.pyRi   o  s
   t   IgnoreLayersc           B   s   e  Z d  Z RS(   sU   
    Raise this to have the event ignored by layers, but reach the
    underlay.
    (   R   R   R   (    (    (    sc   Z:\home\souce\.local\share\Steam\steamapps\common\Doki Doki Literature Club\renpy\display\layout.pyR~   Ü  s   t   MultiBoxc           B   sq   e  Z e Z e Z e Z e e d  d „ Z d „  Z	 d „  Z
 d „  Z e e d „ Z d „  Z d „  Z d „  Z RS(	   t   defaultc         K   sf   | d  k	 r | | d <n  t t |  ƒ j d | |  | |  _ g  |  _ g  |  _ d  |  _ d  |  _ d  S(   NRk   RO   (	   R   R   R   R	   t   default_layoutt   start_timest
   anim_timest   layerst
   scene_list(   R   Rk   t   layoutRO   R   (    (    sc   Z:\home\souce\.local\share\Steam\steamapps\common\Doki Doki Literature Club\renpy\display\layout.pyR	   ë  s    				c         C   s;   t  t |  ƒ j ƒ  g  |  _ g  |  _ d  |  _ d  |  _ d  S(   N(   R   R   R3   R‚   Rƒ   R   R„   R…   (   R   (    (    sc   Z:\home\souce\.local\share\Steam\steamapps\common\Doki Doki Literature Club\renpy\display\layout.pyR3      s
    			c   
      C   sÊ  |  j  d  k	 rÃ |  j d  k r" |  Sg  } t } xZ |  j D]O } | j ƒ  } | j j ƒ  } | | j k	 rz | | _ t } n  | j | ƒ q8 W| s• |  St	 d |  j
 ƒ } |  j  | _  | j | ƒ n© |  j rYt	 d |  j
 ƒ } i  | _ t } x\ t j j D]N } |  j | } | j ƒ  }	 |	 | k	 r.t } n  | j |	 ƒ |	 | j | <qú W| sl|  Sn t t	 |  ƒ j ƒ  S|  j rŠt |  j ƒ | _ n  |  j r¨t |  j ƒ | _ n  |  j rÆt |  j ƒ | _ n  | S(   NR†   (   t
   layer_nameR   R…   R"   t   copyR0   R*   R)   R+   R   R   t   append_scene_listR„   R   t   configR   R   R   RN   R‚   Rƒ   (
   R   R…   R,   t   old_slet   new_sleR1   R   t   layert   old_dt   new_d(    (    sc   Z:\home\souce\.local\share\Steam\steamapps\common\Doki Doki Literature Club\renpy\display\layout.pyR*     sL    								c         C   s\   |  j  j } | d  k r$ |  j } n  | d k r4 d S| d k rD d S| d k rT d Sd Sd  S(   Nt   fixedRZ   t
   horizontalt   HBoxt   verticalt   VBoxR   (   RO   t
   box_layoutR   R   (   R   R†   (    (    sc   Z:\home\souce\.local\share\Steam\steamapps\common\Doki Doki Literature Club\renpy\display\layout.pyt   __unicode__D  s    c         C   s:   t  t |  ƒ j | ƒ |  j j | ƒ |  j j | ƒ d  S(   N(   R   R   R   R‚   R+   Rƒ   (   R   R`   t
   start_timet	   anim_time(    (    sc   Z:\home\souce\.local\share\Steam\steamapps\common\Doki Doki Literature Club\renpy\display\layout.pyR   S  s    c         C   s\   x* | D]" } |  j  | j | j | j ƒ q W|  j d  k rH g  |  _ n  |  j j | ƒ d  S(   N(   R   R0   t	   show_timet   animation_timeR…   R   t   extend(   R   t   lt   sle(    (    sc   Z:\home\souce\.local\share\Steam\steamapps\common\Doki Doki Literature Club\renpy\display\layout.pyR‰   X  s
     c   :         sÍ	  |  j  s |  j d  k	 r! t } n t } |  j j } | d  k	 rZ t | t | | ƒ ƒ } n  |  j j	 } | d  k	 r t | t | | ƒ ƒ } n  |  j
 r1t |  _
 | rt j j j } g  |  j D] }	 |	 pÍ | ^ q¾ |  _ g  |  j D] }	 |	 pò | ^ qã |  _ n  |  j j }
 |
 d  k r%|  j }
 n  |
 |  _ n	 |  j }
 | r’t j j j } g  |  j D] } | | ^ qY} g  |  j D] } | | ^ qy} n, | g t |  j ƒ } | g t |  j ƒ } g  } |
 d k rÃd  } |  j j rt t |  j ƒ t | ƒ t | ƒ ƒ } n t |  j | | ƒ } t j j j | | d |  j  ƒ} |  j j } |  j j } |  j j } | d k rt } t } n< | d k rœt } t } n! | r±t } t } n t } t } g  } xÉ | D]Á \ } } } t | | | | | ƒ } | j  ƒ  } | j! | ƒ | r*| d } | _" t } n  | rJ| d } | _# t } n  | r~| j$ | d d | | | ƒ } | j! | ƒ qÊ| j! d ƒ qÊW| rd } xB t | | ƒ D]1 \ } }  t | d |  d | ƒ } | r«Pq«q«W| | _" | t j% j& k rt' d j( | ƒ ƒ ‚ qn  | rd } xB t | | ƒ D]1 \ } }  t | d |  d | ƒ } | r2Pq2q2W| | _# | t j% j& k rt' d j( | ƒ ƒ ‚ qn  |  j j r¶| j) ƒ  n  | |  _* | S|  j j+ }! |  j j, }" |" d  k rð|! }" n  |" g |! g t |  j ƒ d }# |  j j- }$ |  j j. }% |  j j/ }& |  j j }' |  j j	 }( d ‰ d ‰  t0 |  j ƒ }) |  j j1 r‹|) j) ƒ  |# j) ƒ  n  g  ‰ d ‰ d ‰ d } d } ‡  ‡ ‡ ‡ ‡ f d †  }* d }+ d }, |
 d	 k rK|& rë| } n |( } d ‰  g  }- | }. |% r| }/ n |' }/ xt |) |# | | ƒ D]ú \ }0 }1 } } |$ rO| }2 n |. }2 t |0 |2 | |, | | ƒ } | j  ƒ  \ }3 }4 |$ rä|. |3 |1 d k  rä|- rä|* |- |/ |+ d ƒ \ ‰ ‰ |, ˆ  7}, d }+ d ‰  | }. g  }- n  |- j! |0 |+ |, | f ƒ t ˆ  |4 ƒ ‰  |+ |3 |1 7}+ |. |3 |1 8}. q.W|* |- |/ |+ d ƒ \ ‰ ‰ n…|
 d
 k rÀ|% rf| } n |' } d ‰ g  }- | }5 |& r| }6 n |( }6 xt |) |# | | ƒ D]ô \ }0 }1 } } |$ rÊ| }7 n |5 }7 t |0 | |+ |7 | | ƒ } | j  ƒ  \ }3 }4 |$ rY|5 |4 |1 d k  rY|* |- d |6 |, ƒ \ ‰ ‰ |+ ˆ 7}+ d }, d ‰ | }5 g  }- n  |- j! |0 |+ |, | f ƒ t ˆ |3 ƒ ‰ |, |4 |1 7}, |5 |4 |1 8}5 q©W|* |- d |6 |, ƒ \ ‰ ‰ n t' d |
 ƒ ‚ |% sèt |' ˆ ƒ } n  |& s 	t |( ˆ ƒ } n  t j j j | | ƒ } |  j j1 |  j j Ar;	ˆ j) ƒ  n  xi ˆ D]a \ } }+ }, }8 }9 } t | |8 ƒ }8 t | |9 ƒ }9 | j$ | |+ |, |8 |9 | ƒ } | j! | ƒ qB	W|  j j rÀ	| j) ƒ  n  | |  _* | S(   NR   R‡   R
   R   i    i   s"   Fixed fit width ({}) is too large.c            s7  t  d | ƒ } t  d | ƒ } |  rG | t |  ƒ } | t |  ƒ } n d } d } ˆ } ˆ } xË t |  ƒ D]½ \ } \ } }	 }
 } | j ƒ  \ } } t  ˆ | ƒ } t  ˆ  | ƒ } |	 | | 7}	 |
 | | 7}
 | | 7} | | 7} ˆ j | |	 |
 | | | f ƒ t  | |	 | ƒ } t  | |
 | ƒ } ql W| | f S(   sñ   
            Lays out a single line.

            `line` a list of (child, x, y, surf) tuples.
            `xfill` the amount of space to add in the x direction.
            `yfill` the amount of space to add in the y direction.
            i    (   Ru   R=   R4   Rt   R+   (   t   lineRr   Rs   t	   xperchildt	   yperchildt   maxxoutt   maxyoutR    R   RA   RB   Rc   t   swt   sh(   t   line_heightt
   line_widtht   maxxt   maxyt
   placements(    sc   Z:\home\souce\.local\share\Steam\steamapps\common\Doki Doki Literature Club\renpy\display\layout.pyt   layout_line  s*    	%

R‘   R“   s   Unknown box layout: %r(   i    i    (2   R‡   R„   R   R)   R"   RO   RS   Ru   R   RT   t   firstR   t   gamet	   interfacet   interact_timeR‚   Rƒ   R•   R   R†   t
   frame_timeR=   R   t   order_reverseR\   t   reversedR   R    R   t   xfitt   yfitt	   fit_firstRt   R+   R
   R   R:   RŠ   t   max_fit_sizeR[   t   formatt   reverseR   Rk   t   first_spacingt   box_wrapRr   Rs   RN   t   box_reverse(:   R   R
   R   R   R   t   adjust_timest   minxt   minyt   itR    R†   t   tt   startt   cstst   animt   catsR   R   t   iteratorR²   R³   R´   t   first_fit_widtht   first_fit_heightRy   R   t   cstt   catRc   R^   R<   t   ot   sRk   R¸   t   spacingsR¹   Rr   Rs   RS   RT   R   Rª   RA   RB   Rž   t   remwidtht   target_widthR1   Rp   t   rwR£   R¤   t	   remheightt   target_heightt   rhR|   R}   (    (   R¥   R¦   R§   R¨   R©   sc   Z:\home\souce\.local\share\Steam\steamapps\common\Doki Doki Literature Club\renpy\display\layout.pyR    b  sj   			%(	 #*!									!
(		(	 
			(	
		c         C   sØ   t  |  j |  j |  j ƒ } |  j j s4 | j ƒ  n  y| xu | D]m \ } \ } } }	 |	 d  k rh | }
 n t j	 j
 j |	 }
 | j | | | | | |
 ƒ } | d  k	 r> | Sq> WWn! t k
 rÓ |  j rÍ d  S‚  n Xd  S(   N(   R\   R   R   R‚   RO   R°   R·   R   R   R¬   R­   t
   event_timeR?   R~   R„   (   R   R@   RA   RB   R   t   children_offsetsR    RC   RD   R¿   RÇ   R   (    (    sc   Z:\home\souce\.local\share\Steam\steamapps\common\Doki Doki Literature Club\renpy\display\layout.pyR?   °  s     	 	(   R   R   R   R‡   R)   R«   R"   R°   R	   R3   R*   R–   R   R‰   R    R?   (    (    (    sc   Z:\home\souce\.local\share\Steam\steamapps\common\Doki Doki Literature Club\renpy\display\layout.pyR   å  s   		<		
	ÿ Oc          K   s   t  d d |   S(   NR†   R   (   R   (   R   (    (    sc   Z:\home\souce\.local\share\Steam\steamapps\common\Doki Doki Literature Club\renpy\display\layout.pyRZ   Í  s    t	   SizeGroupc           B   s   e  Z d  „  Z d „  Z RS(   c         C   s2   t  t |  ƒ j ƒ  g  |  _ d  |  _ t |  _ d  S(   N(   R   RÔ   R	   t   membersR   t   _widthR"   t   computing_width(   R   (    (    sc   Z:\home\souce\.local\share\Steam\steamapps\common\Doki Doki Literature Club\renpy\display\layout.pyR	   Ó  s    		c         C   s†   |  j  d  k	 r |  j  S|  j r# d St |  _ d } x; |  j D]0 } | j | | | | ƒ } t | j | ƒ } q< W| |  _  t |  _ | S(   Ni    (	   RÖ   R   R×   R)   RÕ   R    Ru   R
   R"   (   R   R
   R   R   R   t   maxwidthR    t   rend(    (    sc   Z:\home\souce\.local\share\Steam\steamapps\common\Doki Doki Literature Club\renpy\display\layout.pyR
   Û  s    				(   R   R   R	   R
   (    (    (    sc   Z:\home\souce\.local\share\Steam\steamapps\common\Doki Doki Literature Club\renpy\display\layout.pyRÔ   Ñ  s   	t   Windowc           B   sJ   e  Z d  Z d d d „ Z d „  Z d „  Z d „  Z d „  Z d „  Z	 RS(	   sæ   
    A window that has padding and margins, and can place a background
    behind its child. `child` is the child added to this
    displayable. All other properties are as for the :ref:`Window`
    screen language statement.
    t   windowc         K   s<   t  t |  ƒ j d | |  | d  k	 r8 |  j | ƒ n  d  S(   NRO   (   R   RÚ   R	   R   R   (   R   R   RO   R   (    (    sc   Z:\home\souce\.local\share\Steam\steamapps\common\Doki Doki Literature Club\renpy\display\layout.pyR	   û  s    c         C   s   |  j  j g |  j S(   N(   RO   t
   backgroundR   (   R   (    (    sc   Z:\home\souce\.local\share\Steam\steamapps\common\Doki Doki Literature Club\renpy\display\layout.pyRE      s    c         C   s   |  j  j p |  j S(   N(   RO   R   (   R   (    (    sc   Z:\home\souce\.local\share\Steam\steamapps\common\Doki Doki Literature Club\renpy\display\layout.pyt	   get_child  s    c         C   s[   |  j  j } | rW t j | d  ƒ } | d  k rD t ƒ  } t | <n  | j j |  ƒ n  d  S(   N(   RO   t
   size_groupt   size_groupst   getR   RÔ   RÕ   R+   (   R   RÞ   t   group(    (    sc   Z:\home\souce\.local\share\Steam\steamapps\common\Doki Doki Literature Club\renpy\display\layout.pyt   per_interact  s    c         C   s#   t  j j j } |  j j | ƒ d  S(   N(   R   R   t   predictR0   RO   t   _predict_window(   R   t   pd(    (    sc   Z:\home\souce\.local\share\Steam\steamapps\common\Doki Doki Literature Club\renpy\display\layout.pyt   predict_one  s    c      	   C   sG  |  j  } t | j | ƒ } t | j | ƒ } |  j  j } | rs | t k rs t | t | j | | | | ƒ ƒ } n  t | j | ƒ }	 t | j	 | ƒ }
 t | j
 | ƒ } t | j | ƒ } t | j | ƒ } t | j | ƒ } t | j | ƒ } t | j | ƒ } |	 | } | | } |
 | } | | } |  j ƒ  } t | | | | | | | | | ƒ } | j ƒ  \ } } | j s”t | | | | ƒ } n  | j s·t | | | | ƒ } n  t j j r| j d  k	 rçt | | j ƒ } n  | j d  k	 rt | | j ƒ } qn  t j j j | | ƒ } | j r†| | } | | } t | j | | | | ƒ } | j j | |	 | | | | d t  ƒn  | j | |	 |
 | | | | | | | | | ƒ } | j! r| | } | | } t | j! | | | | ƒ } | j! j | |	 | | | | d t  ƒn  |  j" r4| g |  _# n  | | f |  _$ | S(   Nt   main(%   RO   R   RS   RT   RÞ   Rß   Ru   R
   t   left_margint   left_paddingt   right_margint   right_paddingt
   top_margint   top_paddingt   bottom_margint   bottom_paddingRÝ   R    Rt   Rr   Rs   R   RŠ   t   enforce_window_max_sizeRQ   R   t   minRR   R   R   RÜ   R:   R"   t
   foregroundR   R   t   window_size(   R   R
   R   R   R   RO   RS   RT   RÞ   Rè   Ré   Rê   Rë   Rì   Rí   Rî   Rï   t   cxmargint   cymargint	   cxpaddingt	   cypaddingR   Rc   R£   R¤   R   t   bwt   bht   backR   (    (    sc   Z:\home\souce\.local\share\Steam\steamapps\common\Doki Doki Literature Club\renpy\display\layout.pyR      sl    	(



			

(			

(	N(
   R   R   R   R   R	   RE   RÝ   Râ   Ræ   R    (    (    (    sc   Z:\home\souce\.local\share\Steam\steamapps\common\Doki Doki Literature Club\renpy\display\layout.pyRÚ   ó  s   			
	c         C   s   t  j j | ƒ } | d  f S(   N(   R   t   pythont   py_evalR   (   R   R   t   exprR   (    (    sc   Z:\home\souce\.local\share\Steam\steamapps\common\Doki Doki Literature Club\renpy\display\layout.pyt   dynamic_displayable_compatr  s    t   DynamicDisplayablec           B   sh   e  Z d  Z d g Z d „  Z d „  Z d „  Z d „  Z d „  Z d „  Z	 d „  Z
 d	 „  Z d
 „  Z RS(   sU  
    :doc: disp_dynamic

    A displayable that can change its child based on a Python
    function, over the course of an interaction.

    `function`
        A function that is called with the arguments:

        * The amount of time the displayable has been shown for.
        * The amount of time any displayable with the same tag has been shown for.
        * Any positional or keyword arguments supplied to DynamicDisplayable.

        and should return a (d, redraw) tuple, where:

        * `d` is a displayable to show.
        * `redraw` is the amount of time to wait before calling the
          function again, or None to not call the function again
          before the start of the next interaction.

        `function` is called at the start of every interaction.

    As a special case, `function` may also be a python string that evaluates
    to a displayable. In that case, function is run once per interaction.

    ::

        # If tooltip is not empty, shows it in a text. Otherwise,
        # show Null. Checks every tenth of a second to see if the
        # tooltip has been updated.
        init python:
             def show_tooltip(st, at):
                 if tooltip:
                     return tooltip, .1
                 else:
                     return Null(), .1

        image tooltipper = DynamicDisplayable(show_tooltip)

    R   c         C   s   d  |  _ d  S(   N(   R   R   (   R   (    (    sc   Z:\home\souce\.local\share\Steam\steamapps\common\Doki Doki Literature Club\renpy\display\layout.pyt   after_setstate£  s    c         O   sw   t  t |  ƒ j ƒ  d  |  _ t | t ƒ rC | f } i  } t } n  | j d d  ƒ |  _	 | |  _
 | |  _ | |  _ d  S(   Nt   _predict_function(   R   Rÿ   R	   R   R   R   t
   basestringRþ   R5   t   predict_functiont   functionR   t   kwargs(   R   R  R   R  (    (    sc   Z:\home\souce\.local\share\Steam\steamapps\common\Doki Doki Literature Club\renpy\display\layout.pyR	   ¦  s    					c         C   s   g  S(   N(    (   R   (    (    sc   Z:\home\souce\.local\share\Steam\steamapps\common\Doki Doki Literature Club\renpy\display\layout.pyRE   µ  s    c         C   sx   |  j  | | |  j |  j Ž \ } } t j j | ƒ } | j d „  ƒ | |  _ | d  k	 rt t j	 j
 j |  | ƒ n  d  S(   Nc         S   s
   |  j  ƒ  S(   N(   Râ   (   R6   (    (    sc   Z:\home\souce\.local\share\Steam\steamapps\common\Doki Doki Literature Club\renpy\display\layout.pyt   <lambda>»  s    (   R  R   R  R   R/   R0   t	   visit_allR   R   R   R    R2   (   R   R   R   R   R2   (    (    sc   Z:\home\souce\.local\share\Steam\steamapps\common\Doki Doki Literature Club\renpy\display\layout.pyR9   ¸  s    $	c         C   s   t  j j j |  d ƒ d  S(   Ni    (   R   R   R    R2   (   R   (    (    sc   Z:\home\souce\.local\share\Steam\steamapps\common\Doki Doki Literature Club\renpy\display\layout.pyRâ   Â  s    c         C   s2   |  j  | | ƒ t j j j |  j | | | | ƒ S(   N(   R9   R   R   R    R   (   R   R|   R}   R   R   (    (    sc   Z:\home\souce\.local\share\Steam\steamapps\common\Doki Doki Literature Club\renpy\display\layout.pyR    Å  s    c         C   s|   yn |  j  r' |  j  |  j |  j Ž  } n$ |  j d d |  j |  j Ž \ } } | d  k	 rm t j j j | ƒ n  Wn n Xd  S(   Ni    (	   R  R   R  R  R   R   R   Rã   R0   (   R   R   t   _(    (    sc   Z:\home\souce\.local\share\Steam\steamapps\common\Doki Doki Literature Club\renpy\display\layout.pyRæ   Ê  s    	$c         C   s)   |  j  s |  j d d ƒ n  |  j  j ƒ  S(   Ni    (   R   R9   Rd   (   R   (    (    sc   Z:\home\souce\.local\share\Steam\steamapps\common\Doki Doki Literature Club\renpy\display\layout.pyRd   Ö  s    	c         C   s&   |  j  r" |  j  j | | | | ƒ Sd  S(   N(   R   R?   (   R   R@   RA   RB   R   (    (    sc   Z:\home\souce\.local\share\Steam\steamapps\common\Doki Doki Literature Club\renpy\display\layout.pyR?   Ü  s    	(   R   R   R   t   nosaveR   R	   RE   R9   Râ   R    Ræ   Rd   R?   (    (    (    sc   Z:\home\souce\.local\share\Steam\steamapps\common\Doki Doki Literature Club\renpy\display\layout.pyRÿ   w  s   (					
				c         C   s…   xr |  D]j \ } } | d  k r# | S| t k r< t | } n t j j | d ƒ } | t | <t j j | ƒ r | Sq Wt d ƒ ‚ d  S(   Nt   evals&   Switch could not choose a displayable.(   R   t
   cond_cacheR   Rû   t
   py_compilet   py_eval_bytecodeR[   (   t   switcht   condR1   t   code(    (    sc   Z:\home\souce\.local\share\Steam\steamapps\common\Doki Doki Literature Club\renpy\display\layout.pyt   condition_switch_pickç  s    
c         C   s   t  | ƒ d  f S(   N(   R  R   (   R   R   R  (    (    sc   Z:\home\souce\.local\share\Steam\steamapps\common\Doki Doki Literature Club\renpy\display\layout.pyt   condition_switch_showù  s    c         C   s6   t  j j r) g  |  D] \ } } | ^ q St |  ƒ g S(   N(   R   R¬   t   lintR  (   R  t   _condR1   (    (    sc   Z:\home\souce\.local\share\Steam\steamapps\common\Doki Doki Literature Club\renpy\display\layout.pyt   condition_switch_predictý  s    c          O   sê   | j  d d ƒ g  } t |  ƒ d d k r; t d ƒ ‚ n  xŠ t |  d d d … |  d d d … ƒ D]_ \ } } | t k rŸ t j j | d ƒ } | t | <n  t j j	 | ƒ } | j
 | | f ƒ qe Wt t | d	 t ƒ} t | |  S(
   s'  
    :doc: disp_dynamic

    This is a displayable that changes what it is showing based on
    python conditions. The positional argument should be given in
    groups of two, where each group consists of:

    * A string containing a python condition.
    * A displayable to use if the condition is true.

    The first true condition has its displayable shown, at least
    one condition should always be true.

    ::

        image jill = ConditionSwitch(
            "jill_beers > 4", "jill_drunk.png",
            "True", "jill_sober.png")
    RO   R€   i   i    s1   ConditionSwitch takes an even number of argumentsNi   R
  R  (   RY   R=   R[   R\   R  R   Rû   R  R/   R0   R+   Rÿ   R  R  R]   (   R   R  R  R  R1   R  R   (    (    sc   Z:\home\souce\.local\share\Steam\steamapps\common\Doki Doki Literature Club\renpy\display\layout.pyt   ConditionSwitch  s    6	c          O   sç   | j  d d ƒ } t |  ƒ d d k r7 t d ƒ ‚ n  g  } xš t |  d d d … |  d d d … ƒ D]o \ } } | d k	 r¶ t | t ƒ s£ t | j ƒ  ƒ } n  d | | f } n d } | j | ƒ | j | ƒ qg Wt	 | | Ž  S(	   sz  
    :doc: disp_dynamic

    This is a displayable that changes what it is showing based on the
    images are showing on the screen. The positional argument should
    be given in groups of two, where each group consists of:

    * A string giving an image name, or None to indicate the default.
    * A displayable to use if the condition is true.

    A default image should be specified.

    One use of ShowingSwitch is to have side images change depending on
    the current emotion of a character. For example::

       define e = Character("Eileen",
           show_side_image=ShowingSwitch(
               "eileen happy", Image("eileen_happy_side.png", xalign=1.0, yalign=1.0),
               "eileen vhappy", Image("eileen_vhappy_side.png", xalign=1.0, yalign=1.0),
               None, Image("eileen_happy_default.png", xalign=1.0, yalign=1.0),
               )
           )
    R   t   masteri   i    s:   ShowingSwitch takes an even number of positional argumentsNi   s   renpy.showing(%r, layer=%r)(
   R5   R=   R[   R\   R   R   t   tuplet   splitR+   R  (   R   R  R   t   condargst   nameR1   R  (    (    sc   Z:\home\souce\.local\share\Steam\steamapps\common\Doki Doki Literature Club\renpy\display\layout.pyt   ShowingSwitch1  s    6t   IgnoresEventsc           B   s,   e  Z d  „  Z d „  Z d „  Z d „  Z RS(   c         K   s'   t  t |  ƒ j |   |  j | ƒ d  S(   N(   R   R  R	   R   (   R   R   R   (    (    sc   Z:\home\souce\.local\share\Steam\steamapps\common\Doki Doki Literature Club\renpy\display\layout.pyR	   a  s    c   	      C   sh   t  j j j |  j | | | | ƒ } | j ƒ  \ } } t  j j j | | ƒ } | j | d d t ƒ| S(   Ni    t   focus(   i    i    (   R   R   R    R   Rt   R   Rb   R"   (	   R   R|   R}   R   R   R;   t   cwt   chR   (    (    sc   Z:\home\souce\.local\share\Steam\steamapps\common\Doki Doki Literature Club\renpy\display\layout.pyR    e  s
    $c         C   s   |  j  j ƒ  S(   N(   R   Rd   (   R   (    (    sc   Z:\home\souce\.local\share\Steam\steamapps\common\Doki Doki Literature Club\renpy\display\layout.pyRd   m  s    c         C   s   d  S(   N(   R   (   R   R@   RA   RB   R   (    (    sc   Z:\home\souce\.local\share\Steam\steamapps\common\Doki Doki Literature Club\renpy\display\layout.pyR?   q  s    (   R   R   R	   R    Rd   R?   (    (    (    sc   Z:\home\souce\.local\share\Steam\steamapps\common\Doki Doki Literature Club\renpy\display\layout.pyR  _  s   			c         K   s   t  j j j | d |  | S(   sß   
    :doc: disp_imagelike

    This created a displayable by cropping `child` to `rect`, where
    `rect` is an (x, y, width, height) tuple. ::

        image eileen cropped = LiveCrop((0, 0, 300, 300), "eileen happy")
    t   crop(   R   R   t   motiont	   Transform(   t   rectR   R   (    (    sc   Z:\home\souce\.local\share\Steam\steamapps\common\Doki Doki Literature Club\renpy\display\layout.pyt   LiveCropu  s    
t   Sidec        
   B   s_   e  Z e d  d d d d d d d d g	 ƒ Z d	 „  Z d
 d „ Z d „  Z d „  Z d „  Z RS(   t   tlR¿   t   trt   rt   brt   bt   blRœ   R6   c         C   s   t  |  _ d  S(   N(   R"   t   sized(   R   (    (    sc   Z:\home\souce\.local\share\Steam\steamapps\common\Doki Doki Literature Club\renpy\display\layout.pyR   †  s    t   sidec         K   sÄ   t  t |  ƒ j d | |  t | t ƒ r: | j ƒ  } n  t ƒ  } xb | D]Z } | t j k ru t d | f ƒ ‚ n  | | k r— t d | f ƒ ‚ n  | j	 | ƒ qJ Wt
 | ƒ |  _ t |  _ d  S(   NRO   s(   Side used with impossible position '%s'.s'   Side used with duplicate position '%s'.(   R   R&  R	   R   R  R  t   sett   possible_positionsR[   R   R  t	   positionsR"   R-  (   R   R1  RO   R   t   seenR    (    (    sc   Z:\home\souce\.local\share\Steam\steamapps\common\Doki Doki Literature Club\renpy\display\layout.pyR	   ‰  s    	c         C   sG   t  |  j ƒ t  |  j ƒ k r- t d ƒ ‚ n  t t |  ƒ j | ƒ d  S(   Ns'   Side has been given too many arguments.(   R=   R   R1  R[   R   R&  R   (   R   R1   (    (    sc   Z:\home\souce\.local\share\Steam\steamapps\common\Doki Doki Literature Club\renpy\display\layout.pyR   ž  s    c         C   s    t  t |  ƒ j ƒ  t |  _ d  S(   N(   R   R&  R3   R"   R-  (   R   (    (    sc   Z:\home\souce\.local\share\Steam\steamapps\common\Doki Doki Literature Club\renpy\display\layout.pyR3   ¤  s    c            sÑ  i  ‰ i  ‰ xC t  t ˆ j ˆ j ƒ ƒ D]& \ } \ } } | ˆ | <| ˆ | <q( W| } | }	 ˆ j s†t ˆ _ ˆ j j ‰ ‡ ‡ f d †  }
 |
 d d d | ƒ \ ˆ _ } |
 d d d | ƒ \ ˆ _	 } |
 d d d | ƒ \ ˆ _
 } |
 d d	 d | ƒ \ ˆ _ } d
 } d
 } d
 } d
 } d
 } d
 } ‡  ‡ ‡ f d †  } | d | | d
 d
 ƒ \ } } | d | | | | ƒ \ } } | d	 | | | | ƒ \ } } | d | | | | ƒ \ } } | d | | | | ƒ \ } } | d | | | | ƒ \ } } | d | | | | ƒ \ } } | d | | | | ƒ \ } } | d | | | | ƒ \ } } | ˆ _ | ˆ _ | ˆ _ | ˆ _ | ˆ _ | ˆ _ n6 ˆ j } ˆ j } ˆ j } ˆ j } ˆ j } ˆ j } | } |	 } d  g t ˆ j ƒ ˆ _ ˆ j } ˆ j	 } ˆ j
 } ˆ j } ˆ j j r| } n  ˆ j j r/| } n  t | | | | | | ƒ } t | | | | | | ƒ } t j j j | | | | | | | | | | ƒ ‰ ‡  ‡ ‡ ‡ ‡ ‡ f d †  } d
 } | | } | | | | } d
 } | | } | | | | } | d | | | | ƒ | d | | | | ƒ | d | | | | ƒ | d	 | | | | ƒ | d | | | | ƒ | d | | | | ƒ | d | | | | ƒ | d | | | | ƒ | d | | | | ƒ ˆ S(   Nc            s@   |  ˆ  k s$ | ˆ  k s$ | ˆ  k r2 ˆ | ˆ f Sd | f Sd  S(   Ni    (    (   t   aR+  R6   t   axis(   t   pos_dRk   (    sc   Z:\home\souce\.local\share\Steam\steamapps\common\Doki Doki Literature Club\renpy\display\layout.pyt   spacer½  s    $R'  Rœ   R,  R(  R)  R*  R¿   R+  i    c            sd   |  ˆ k r | | f St  ˆ |  | | ˆ ˆ  ƒ } t | | j ƒ t | | j ƒ f } | j ƒ  | S(   N(   R    Ru   R
   R   t   kill(   R_   R
   R   t   owidtht   oheightRÙ   R   (   R   R5  R   (    sc   Z:\home\souce\.local\share\Steam\steamapps\common\Doki Doki Literature Club\renpy\display\layout.pyt   sizeitÐ  s    
$
R6   c            si   |  ˆ k r d  Sˆ |  } ˆ |  } t  | | | ˆ ˆ  ƒ } ˆ |  j ˆ | | | | | ƒ ˆ j | <d  S(   N(   R    R:   R   (   R_   RA   RB   R|   R}   R1   R    RÙ   (   R   R5  t   pos_iR   R   R   (    sc   Z:\home\souce\.local\share\Steam\steamapps\common\Doki Doki Literature Club\renpy\display\layout.pyR:     s    

(   R4   R\   R1  R   R-  R)   RO   Rk   t
   left_spacet   right_spacet	   top_spacet   bottom_spaceRz   R{   t   topt   bottomt   leftt   rightR   R=   R   Rr   Rs   Rñ   R   R   R    R   (   R   R
   R   R   R   R    R_   R1   t	   old_widtht
   old_heightR6  RB  RC  R@  RA  Rz   R{   R:  t   leftst   rightst   topst   bottomsR:   t   col1t   col2t   col3t   row1t   row2t   row3(    (   R   R5  R;  R   R   Rk   R   sc   Z:\home\souce\.local\share\Steam\steamapps\common\Doki Doki Literature Club\renpy\display\layout.pyR    ¨  s–    .
																				


(	   R   R   R/  R0  R   R	   R   R3   R    (    (    (    sc   Z:\home\souce\.local\share\Steam\steamapps\common\Doki Doki Literature Club\renpy\display\layout.pyR&  ‚  s   '			t   Alphac           B   s2   e  Z d e e e d d  „ Z d „  Z d „  Z RS(   c	   
      K   se   t  t |  ƒ j |	   | |  _ | |  _ | |  _ t j j | ƒ |  _	 | |  _
 | |  _ | |  _ d  S(   N(   R   RP  R	   RÀ   t   endt   timeR   R/   R0   R   t   repeatt   anim_timebaset	   time_warp(
   R   RÀ   RQ  RR  R   RS  t   bounceRT  RU  R   (    (    sc   Z:\home\souce\.local\share\Steam\steamapps\common\Doki Doki Literature Club\renpy\display\layout.pyR	   /  s    					c         C   s
   |  j  g S(   N(   R   (   R   (    (    sc   Z:\home\souce\.local\share\Steam\steamapps\common\Doki Doki Literature Club\renpy\display\layout.pyRE   <  s    c         C   sG  |  j  r | } n | } |  j r: t | |  j d ƒ } n d } t j j rU d } nQ |  j r | d } t j j j	 |  d ƒ n% | d k r¦ t j j j	 |  d ƒ n  |  j
 rÁ |  j
 | ƒ } n  |  j | |  j |  j } t j j j |  j | | | | ƒ } | j ƒ  \ }	 }
 t j j j |	 |
 ƒ } | j | d ƒ | | _ | S(   Ng      ð?i    (   i    i    (   RT  RR  Rñ   R   R¬   t   less_updatesRS  R   R    R2   RU  RÀ   RQ  R   Rt   R   Rb   t   alpha(   R   R   R
   R   R   R¿   t   doneRX  RÙ   R|   R}   R   (    (    sc   Z:\home\souce\.local\share\Steam\steamapps\common\Doki Doki Literature Club\renpy\display\layout.pyR    ?  s,    					
	$	N(   R   R   R   R"   R	   RE   R    (    (    (    sc   Z:\home\souce\.local\share\Steam\steamapps\common\Doki Doki Literature Club\renpy\display\layout.pyRP  -  s   		t   AdjustTimesc           B   s#   e  Z d  „  Z d „  Z d „  Z RS(   c         K   s9   t  t |  ƒ j |   | |  _ | |  _ |  j | ƒ d  S(   N(   R   RZ  R	   R—   R˜   R   (   R   R   R—   R˜   R   (    (    sc   Z:\home\souce\.local\share\Steam\steamapps\common\Doki Doki Literature Club\renpy\display\layout.pyR	   c  s    		c   	      C   sâ   |  j  d  k r$ t j j j |  _  n  |  j d  k rH t j j j |  _ n  t j j j |  j  } t j j j |  j } t j j j |  j	 | | | | ƒ } | j
 ƒ  \ } } t j j j | | ƒ } | j | d ƒ d g |  _ | S(   Ni    (   i    i    (   i    i    (   R—   R   R   R¬   R­   R¯   R˜   R   R    R   Rt   R   Rb   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\layout.pyR    k  s    $c         C   s   |  j  j ƒ  S(   N(   R   Rd   (   R   (    (    sc   Z:\home\souce\.local\share\Steam\steamapps\common\Doki Doki Literature Club\renpy\display\layout.pyRd     s    (   R   R   R	   R    Rd   (    (    (    sc   Z:\home\souce\.local\share\Steam\steamapps\common\Doki Doki Literature Club\renpy\display\layout.pyRZ  a  s   		t   LiveTilec           B   s#   e  Z d  Z d d „ Z d „  Z RS(   s   
    :doc: disp_imagelike

    Tiles `child` until it fills the area allocated to this displayable.

    ::

        image bg tile = LiveTile("bg.png")

    t   tilec         K   s-   t  t |  ƒ j d | |  |  j | ƒ d  S(   NRO   (   R   R[  R	   R   (   R   R   RO   R   (    (    sc   Z:\home\souce\.local\share\Steam\steamapps\common\Doki Doki Literature Club\renpy\display\layout.pyR	     s    c         C   s:  t  j j j |  j | | | | ƒ } | j ƒ  \ } } t  j j j | | ƒ } t | ƒ } t | ƒ } t | ƒ } t | ƒ } xµ t d | | ƒ D]¡ }	 x˜ t d | | ƒ D]„ }
 t | | |
 ƒ } t | | |	 ƒ } | | k  sî | | k  r| j	 d d | | f ƒ } n | } | j
 | |
 |	 f d t ƒqª Wq‘ W| S(   Ni    R  (   R   R   R    R   Rt   R   Rl   Rq   Rñ   t
   subsurfaceRb   R"   (   R   R
   R   R   R   R;   R  R   R   RB   RA   t   ccwt   ccht   ccr(    (    sc   Z:\home\souce\.local\share\Steam\steamapps\common\Doki Doki Literature Club\renpy\display\layout.pyR    ”  s     $$(   R   R   R   R	   R    (    (    (    sc   Z:\home\souce\.local\share\Steam\steamapps\common\Doki Doki Literature Club\renpy\display\layout.pyR[  ƒ  s   
t   Flattenc           B   s    e  Z d  Z d „  Z d „  Z RS(   s  
    :doc: disp_imagelike

    This flattens `child`, which may be made up of multiple textures, into
    a single texture.

    Certain operations, like the alpha transform property, apply to every
    texture making up a displayable, which can yield incorrect results
    when the textures overlap on screen. Flatten creates a single texture
    from multiple textures, which can prevent this problem.

    Flatten is a relatively expensive operation, and so should only be used
    when absolutely required.
    c         K   s'   t  t |  ƒ j |   |  j | ƒ d  S(   N(   R   Ra  R	   R   (   R   R   R   (    (    sc   Z:\home\souce\.local\share\Steam\steamapps\common\Doki Doki Literature Club\renpy\display\layout.pyR	   ¿  s    c   
      C   s´   t  j j j |  j | | | | ƒ } | j ƒ  \ } } | j t ƒ } t  j j j | | ƒ }	 |	 j | d ƒ |	 j	 | d t ƒt  j j
 j |	 _ t  j j j |	 _ d g |  _ |	 S(   Ni    R  (   i    i    (   i    i    (   R   R   R    R   Rt   t   render_to_textureR)   R   Rb   t
   depends_ont   drawt   draw_to_virtR·   t   IDENTITYt   forwardR   (
   R   R
   R   R   R   R;   R  R   t   texR   (    (    sc   Z:\home\souce\.local\share\Steam\steamapps\common\Doki Doki Literature Club\renpy\display\layout.pyR    Ä  s    $(   R   R   R   R	   R    (    (    (    sc   Z:\home\souce\.local\share\Steam\steamapps\common\Doki Doki Literature Club\renpy\display\layout.pyRa  ¯  s   	t	   AlphaMaskc           B   s    e  Z d  Z d „  Z d „  Z RS(   s†  
    :doc: disp_imagelike

    This displayable takes its colors from `child`, and its alpha channel
    from the multiplication of the alpha channels of `child` and `mask`.
    The result is a displayable that has the same colors as `child`, is
    transparent where either `child` or `mask` is transparent, and is
    opaque where `child` and `mask` are both opaque.

    The `child` and `mask` parameters may be arbitrary displayables. The
    size of the AlphaMask is the size of the overlap between `child` and
    `mask`.

    Note that this takes different arguments from :func:`im.AlphaMask`,
    which uses the mask's color channel.
    c         K   sN   t  t |  ƒ j |   |  j | ƒ t j j | ƒ |  _ d  |  _	 d  |  _
 d  S(   N(   R   Ri  R	   R   R   R/   R0   t   maskR   t   nullR^   (   R   R   Rj  R   (    (    sc   Z:\home\souce\.local\share\Steam\steamapps\common\Doki Doki Literature Club\renpy\display\layout.pyR	   è  s
    	c         C   sy  t  j j j |  j | | | | ƒ } t  j j j |  j | | | | ƒ } | j ƒ  \ } } | j ƒ  \ }	 }
 t | |	 ƒ } t | |
 ƒ } | | f } |  j | k rº t | | ƒ |  _	 n  t  j j j |  j	 | | | | ƒ } t  j j j
 | | d t ƒ} t  j j j | _ d | _ d d | _ d | _ | j | d	 d t d t ƒ| j | d
 d t d t ƒ| j | d ƒ | S(   Nt   opaqueg      ð?g      p@i   i    R  Rç   g      €@(   i    i    (   i    i    (   i    i    (   R   R   R    R   Rj  Rt   Rñ   R^   R   Rk  R   R"   t   IMAGEDISSOLVEt	   operationt   operation_alphat   operation_completet   operation_parameterRb   (   R   R
   R   R   R   R;   t   mrR  R   t   mwt   mhR|   R}   R^   t   nrR   (    (    sc   Z:\home\souce\.local\share\Steam\steamapps\common\Doki Doki Literature Club\renpy\display\layout.pyR    ð  s&    $$$		(   R   R   R   R	   R    (    (    (    sc   Z:\home\souce\.local\share\Steam\steamapps\common\Doki Doki Literature Club\renpy\display\layout.pyRi  Ö  s   	((   t   renpy.display.renderR    R   t   renpy.displayR   R   R   t   coret   DisplayableR   R   Ra   R]   Ri   R[   R~   R   RZ   t   objectt   ObjectRÔ   t   dictRß   RÚ   Rþ   Rÿ   R  R  R  R  R  R  R  R%  R&  RP  RZ  R[  Ra  Ri  (    (    (    sc   Z:\home\souce\.local\share\Steam\steamapps\common\Doki Doki Literature Club\renpy\display\layout.pyt   <module>   s<   	¸	(Hm	ÿ é			j				,	.	«4",'