#NEWLINE# def __init__( self , rect = None , caption = '' , bgcolor = LIGHTGRAY , fgcolor = BLACK , font = None , normal = None , down = None , highlight = None ) : #NEWLINE# #INDENT# "Create a new button object. Parameters:\n            rect - The size and position of the button as a pygame.Rect object\n                or 4-tuple of integers.\n            caption - The text on the button (default is blank)\n            bgcolor - The background color of the button (default is a light\n                gray color)\n            fgcolor - The foreground color (i.e. the color of the text).\n                Default is black.\n            font - The pygame.font.Font object for the font of the text.\n                Default is freesansbold in point 14.\n            normal - A pygame.Surface object for the button's normal\n                appearance.\n            down - A pygame.Surface object for the button's pushed down\n                appearance.\n            highlight - A pygame.Surface object for the button's appearance\n                when the mouse is over it.\n\n            If the Surface objects are used, then the caption, bgcolor,\n            fgcolor, and font parameters are ignored (and vice versa).\n            Specifying the Surface objects lets the user use a custom image\n            for the button.\n            The normal, down, and highlight Surface objects must all be the\n            same size as each other. Only the normal Surface object needs to\n            be specified. The others, if left out, will default to the normal\n            surface.\n            " #NEWLINE# if ( rect is None ) : #NEWLINE# #INDENT# self . _rect = pygame . Rect ( 0 , 0 , 30 , 60 ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# self . _rect = pygame . Rect ( rect ) #NEWLINE# #UNINDENT# self . _caption = caption #NEWLINE# self . _bgcolor = bgcolor #NEWLINE# self . _fgcolor = fgcolor #NEWLINE# if ( font is None ) : #NEWLINE# #INDENT# self . _font = PYGBUTTON_FONT #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# self . _font = font #NEWLINE# #UNINDENT# self . buttonDown = False #NEWLINE# self . mouseOverButton = False #NEWLINE# self . lastMouseDownOverButton = False #NEWLINE# self . _visible = True #NEWLINE# self . customSurfaces = False #NEWLINE# if ( normal is None ) : #NEWLINE# #INDENT# self . surfaceNormal = pygame . Surface ( self . _rect . size ) #NEWLINE# self . surfaceDown = pygame . Surface ( self . _rect . size ) #NEWLINE# self . surfaceHighlight = pygame . Surface ( self . _rect . size ) #NEWLINE# self . _update ( ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# self . setSurfaces ( normal , down , highlight )