/ / - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
 / /   U T A G E :   U n i t y   T e x t   A d v e n t u r e   G a m e   E n g i n e 
 / /   C o p y r i g h t   2 0 1 4   R y o h e i   T o k i m u r a 
 / / - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
 
 u s i n g   U n i t y E d i t o r ; 
 u s i n g   U n i t y E n g i n e ; 
 u s i n g   S y s t e m . I O ; 
 u s i n g   S y s t e m . C o l l e c t i o n s ; 
 u s i n g   S y s t e m . C o l l e c t i o n s . G e n e r i c ; 
 u s i n g   l i v e 2 d ; 
 u s i n g   l i v e 2 d . f r a m e w o r k ; 
 
 n a m e s p a c e   U t a g e 
 { 
 	 / / L i v e 2 D n000000h:y00000
 	 p u b l i c   c l a s s   L i v e 2 D V i e w e r   :   C u s t o m E d i t o r W i n d o w 
 	 { 
 	 	 v o i d   O n E n a b l e ( ) 
 	 	 { 
 	 	 	 / / 000	Yfg0c;u0000000Y00
 	 	 	 t h i s . a u t o R e p a i n t O n S c e n e C h a n g e   =   t r u e ; 
 	 	 	 / / 000000	gRk0Y00
 	 	 	 t h i s . i s E n a b l e S c r o l l   =   t r u e ; 
 	 	 } 
 
 	 	 p r o t e c t e d   o v e r r i d e   v o i d   O n G U I S u b ( ) 
 	 	 { 
 	 	 	 A d v E n g i n e   e n g i n e   =   U t a g e E d i t o r T o o l K i t . F i n d C o m p o n e n t A l l I n T h e S c e n e < A d v E n g i n e > ( ) ; 
 	 	 	 i f   ( e n g i n e   = =   n u l l ) 
 	 	 	 { 
 	 	 	 	 U t a g e E d i t o r T o o l K i t . B o l d L a b e l ( " N o t   f o u n d   A d v E n g i n e " ) ; 
 	 	 	 	 r e t u r n ; 
 	 	 	 } 
 
 	 	 	 f o r e a c h ( L i v e 2 D O b j e c t   o b j   i n   e n g i n e . G e t C o m p o n e n t s I n C h i l d r e n < L i v e 2 D O b j e c t > ( t r u e ) ) 
 	 	 	 { 
 	 	 	 	 O n G u i O b j ( o b j ) ; 
 	 	 	 } 
 	 	 } 
 
 
 	 	 D i c t i o n a r y < s t r i n g ,   b o o l >   f o l d o u t T b l   =   n e w   D i c t i o n a r y < s t r i n g , b o o l > ( ) ; 
 	 	 / / 000000n0h:y
 	 	 v o i d   O n G u i O b j ( L i v e 2 D O b j e c t   o b j ) 
 	 	 { 
 	 	 	 i f   ( ! f o l d o u t T b l . C o n t a i n s K e y ( o b j . n a m e ) )   f o l d o u t T b l . A d d ( o b j . n a m e ,   t r u e ) ; 
 	 	 	 b o o l   f o l d o u t   =   f o l d o u t T b l [ o b j . n a m e ] ; 
 	 	 	 U t a g e E d i t o r T o o l K i t . F o l d o u t G r o u p ( r e f   f o l d o u t ,   o b j . n a m e ,   ( )   = > 
 	 	 	 { 
 	 	 	 	 E d i t o r G U I L a y o u t . L a b e l F i e l d ( " M o t i o n " ,   o b j . M o d e l D a t a . C u r r e n t M o t i o n S e t t i n g   = =   n u l l   ?   " N o M o t i o n "   :   o b j . M o d e l D a t a . C u r r e n t M o t i o n S e t t i n g . M o t i o n . N a m e ) ; 
 	 	 	 	 E d i t o r G U I L a y o u t . L a b e l F i e l d ( " E m o t i o n " ,   o b j . M o d e l D a t a . C u r r e n t E x p r e s s i o n N a m e ) ; 
 	 	 	 	 L i s t < P a r a m D e f F l o a t >   l i s t   =   o b j . L i v e 2 D M o d e l . g e t M o d e l I m p l ( ) . g e t P a r a m D e f S e t ( ) . g e t P a r a m D e f F l o a t L i s t ( ) ; 
 	 	 	 	 O n G u i P a r a m D a t a L i s t ( o b j . L i v e 2 D M o d e l ,   l i s t ) ; 
 	 	 	 } ) ; 
 	 	 	 f o l d o u t T b l [ o b j . n a m e ]   =   f o l d o u t ; 
 	 	 } 
 
 
 	 	 / / 000000n0h:y
 	 	 v o i d   O n G u i P a r a m D a t a L i s t ( L i v e 2 D M o d e l U n i t y   m o d e l ,   L i s t < P a r a m D e f F l o a t >   l i s t ) 
 	 	 { 
 	 	 	 i f   ( l i s t . C o u n t   < =   0 )   r e t u r n ; 
 
 	 	 	 G U I L a y o u t . B e g i n V e r t i c a l   ( ) ; 
 	 	 	 f l o a t   s c r o l l Y   =   t h i s . s c r o l l P o s i t i o n . y ; 
 	 	 	 f l o a t   w i n d o w H e i g h t   =   p o s i t i o n . h e i g h t ; 
 	 	 	 f l o a t   l i n e H e i g h t   =   1 8 ; 
 	 	 	 R e c t   r   =   E d i t o r G U I L a y o u t . G e t C o n t r o l R e c t   ( f a l s e ,   1 ) ; 
 	 	 	 f l o a t   c u r r e n t Y   =   r . y M a x   -   s c r o l l Y ; 
 	 	 	 i n t   i n d e x   =   0 ; 
 	 	 	 w h i l e   (   i n d e x   <   l i s t . C o u n t   ) 
 	 	 	 { 
 	 	 	 	 i f ( c u r r e n t Y > = - l i n e H e i g h t * 2 ) 
 	 	 	 	 { 
 	 	 	 	 	 b r e a k ; 
 	 	 	 	 } 
 	 	 	 	 e l s e 
 	 	 	 	 { 
 	 	 	 	 	 E d i t o r G U I L a y o u t . G e t C o n t r o l R e c t   ( f a l s e ,   1 6 ) ; 
 	 	 	 	 	 c u r r e n t Y   + =   l i n e H e i g h t ; 
 	 	 	 	 	 + + i n d e x ; 
 	 	 	 	 } 
 	 	 	 } 
 
 	 	 	 w h i l e   (   i n d e x   <   l i s t . C o u n t   ) 
 	 	 	 { 
 	 	 	 	 i f ( c u r r e n t Y   >   w i n d o w H e i g h t   +   l i n e H e i g h t * 2 ) 
 	 	 	 	 { 
 	 	 	 	 	 E d i t o r G U I L a y o u t . G e t C o n t r o l R e c t   ( f a l s e ,   1 6 ) ; 
 	 	 	 	 } 
 	 	 	 	 e l s e 
 	 	 	 	 { 
 	 	 	 	 	 O n G u i P a r a m D a t a   ( m o d e l , l i s t [ i n d e x ] ) ; 
 	 	 	 	 } 
 	 	 	 	 c u r r e n t Y   + =   l i n e H e i g h t ; 
 	 	 	 	 + + i n d e x ; 
 	 	 	 } 
 	 	 	 G U I L a y o u t . E n d V e r t i c a l ( ) ; 
 	 	 } 
 
 / / 	 	 G U I L a y o u t O p t i o n   p a r a m H e i g h t   =   G U I L a y o u t . H e i g h t   ( 1 6 ) ; 
 	 	 / / 000000n0h:y
 	 	 v o i d   O n G u i P a r a m D a t a ( L i v e 2 D M o d e l U n i t y   m o d e l ,   P a r a m D e f F l o a t   d a t a ) 
 	 	 { 
 	 	 	 s t r i n g   i d   =   d a t a . g e t P a r a m I D ( ) . T o S t r i n g ( ) ; 
 	 	 	 E d i t o r G U I L a y o u t . L a b e l F i e l d ( i d ,   m o d e l . g e t P a r a m F l o a t ( i d ) . T o S t r i n g ( ) ,   G U I L a y o u t . W i d t h ( 1 8 0 ) ) ; 
 
 / / 	 	 	 f l o a t   s i z e   =   G U I L a y o u t . W i d t h ( G U I . s k i n . l a b e l . C a l c S i z e ( i d ) . x ) ; 
 / / 	 	 	 E d i t o r G U I L a y o u t . L a b e l F i e l d ( i d ,   m o d e l . g e t P a r a m F l o a t ( i d ) . T o S t r i n g ( ) ,   G U I L a y o u t . W i d t h ( 2 0 0 ) ) ; 
 	 	 } 
 	 } 
 } 
 