#NEWLINE# def __init__( self , title , message , buttons = 255 ) : #NEWLINE# #INDENT# dialog . DialogView . __init__ ( self , pygame . Rect ( 0 , 0 , 1 , 1 ) ) #NEWLINE# self . title = title #NEWLINE# self . message = message #NEWLINE# self . buttons = buttons #NEWLINE# self . message_label = label . Label ( pygame . Rect ( 0 , 0 , 1 , 1 ) , message , wrap = label . WORD_WRAP ) #NEWLINE# self . message_label . valign = label . TOP #NEWLINE# self . add_child ( self . message_label ) #NEWLINE# self . title_label = label . Label ( pygame . Rect ( 0 , 0 , 1 , 1 ) , title ) #NEWLINE# self . add_child ( self . title_label ) #NEWLINE# self . ok = button . Button ( pygame . Rect ( 0 , 0 , 0 , 0 ) , 'OK' ) #NEWLINE# self . ok . on_clicked . connect ( self . _dismiss ) #NEWLINE# self . add_child ( message . ok ) #NEWLINE# self . cancel = button . Button ( pygame . Rect ( 0 , 0 , 0 , 0 ) , 'Cancel' ) #NEWLINE# self . cancel . on_clicked . connect ( self . _dismiss ) #NEWLINE# self . add_child ( self . cancel )