#NEWLINE# def confirm_sell( self , keys , current_time ) : #NEWLINE# #INDENT# '\n        Confirm player wants to sell item.\n        ' #NEWLINE# dialogue = [ 'Are you sure?' ] #NEWLINE# choices = [ 'Yes' , 'No' ] #NEWLINE# self . dialogue_box = self . make_dialogue_box ( dialogue , 0 ) #NEWLINE# self . selection_box = self . make_selection_box ( keys ) #NEWLINE# self . selection_arrow . rect . topleft = self . two_arrow_pos_list [ self . arrow_index ] #NEWLINE# if ( keys [ pg . K_DOWN ] and self . allow_input ) : #NEWLINE# #INDENT# if ( self . arrow_index < ( len ( choices ) - 1 ) ) : #NEWLINE# #INDENT# self . arrow_index += 1 #NEWLINE# self . allow_input = False #NEWLINE# self . notify ( c . CLICK ) #NEWLINE# #UNINDENT# #UNINDENT# else : #NEWLINE# #INDENT# if ( keys [ pg . K_UP ] and self . allow_input ) : #NEWLINE# #INDENT# if ( self . arrow_index > 0 ) : #NEWLINE# #INDENT# self . arrow_index -= 1 #NEWLINE# self . allow_input = False #NEWLINE# self . notify ( c . CLICK ) #NEWLINE# #UNINDENT# #UNINDENT# else : #NEWLINE# #INDENT# if ( keys [ pg . K_SPACE ] and self . allow_input ) : #NEWLINE# #INDENT# if ( self . arrow_index == 0 ) : #NEWLINE# #INDENT# self . sell_item_from_inventory ( ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( self . arrow_index == 1 ) : #NEWLINE# #INDENT# self . state = self . begin_new_transaction ( ) #NEWLINE# self . notify ( c . CLICK2 ) #NEWLINE# #UNINDENT# #UNINDENT# self . allow_input = False #NEWLINE# self . arrow_index = 0 #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# if ( ( not keys [ pg . K_SPACE ] ) and ( not keys [ pg . K_UP ] ) and ( not keys [ pg . K_DOWN ] ) ) : #NEWLINE# #INDENT# self . allow_input = True