#NEWLINE# def show_message( self , msg , callback = None ) : #NEWLINE# #INDENT# ( w , h ) = director . get_window_size ( ) #NEWLINE# self . msg = cocos . text . Label ( msg , font_size = 52 , font_name = consts [ 'view' ] [ 'font_name' ] , anchor_y = 'center' , anchor_x = 'center' ) #NEWLINE# self . msg . position = ( ( w / 2.0 ) , h ) #NEWLINE# self . add ( self . msg ) #NEWLINE# actions = ( ( ( ( ac . Show ( ) + ac . Accelerate ( ac . MoveBy ( ( 0 , ( ( - h ) / 2.0 ) ) , duration = 0.5 ) ) ) + ac . Delay ( 1 ) ) + ac . Accelerate ( ac . MoveBy ( ( 0 , ( ( - h ) / 2.0 ) ) , duration = 0.5 ) ) ) + ac . Hide ( ) ) #NEWLINE# if callback : #NEWLINE# #INDENT# actions += ac . CallFunc ( callback ) #NEWLINE# #UNINDENT# self . msg . do ( actions )