![]() ![]() st A float, the shown timebase, in seconds. width, height The amount of space available to this displayable, in The render object determines what, if anything, is Subclasses must override this, to return a renpy.Render ![]() _init_ ( ** properties ) render ( self, width, height, st, at ) link To use the creator-defined displayable, we can create an instance of it, event ( ev, x, y, st ) def visit ( self ): return redraw ( self, 0 ) # Pass the event to our child. opaque_distance ) # If the alpha has changed, trigger a redraw event. transparent_distance : alpha = 0.0 else : alpha = 1.0 - 1.0 * ( distance - self. height / 2 )) # Base on the distance, figure out an alpha. The mouse pointer is supplied in x and y, # relative to the upper-left corner of the displayable. return render def event ( self, ev, x, y, st ): # Compute the distance between the center of this displayable and # the mouse pointer. blit ( child_render, ( 0, 0 )) # Return the render. ![]() height ) # Blit (draw) the child's render to our render. get_size () # Create the render we will return. render ( t, width, height, st, at ) # Get the size of the child. alpha ) # Create a render from the child. height = 0 def render ( self, width, height, st, at ): # Create a transform, that can adjust the alpha channel of the # child. alpha = 0.0 # The width and height of us, and our child. transparent_distance = transparent_distance # The alpha channel of the child. The former must be less # than the latter. displayable ( child ) # The distance at which the child will become fully opaque, and # where it will become fully transparent. Displayable ): def _init_ ( self, child, opaque_distance, transparent_distance, ** kwargs ): # Pass additional properties on to the renpy.Displayable # constructor. Init python : import math class Appearing ( renpy. ![]()
0 Comments
Leave a Reply. |