#NEWLINE# def __init__( self , model , text , accept , cancel = None ) : #NEWLINE# #INDENT# self . accept = accept #NEWLINE# self . cancel = cancel #NEWLINE# self . buttons = ui . ButtonGrid ( model . width , model . height , 4 , 5 ) #NEWLINE# self . buttons . add ( 3 , 4 , 'OK' , click = self . accept_click , bg_color = freqshow . ACCEPT_BG ) #NEWLINE# if ( cancel is not None ) : #NEWLINE# #INDENT# self . buttons . add ( 0 , 4 , 'CANCEL' , click = self . cancel_click , bg_color = freqshow . CANCEL_BG ) #NEWLINE# #UNINDENT# self . label = ui . render_text ( text , size = freqshow . NUM_FONT , fg = freqshow . BUTTON_FG , bg = freqshow . MAIN_BG ) #NEWLINE# self . label_rect = ui . align ( self . label . get_rect ( ) , ( 0 , 0 , model . width , model . height ) )