#NEWLINE# def moveControl( self , mouse_x , mouse_y , first_move = False ) : #NEWLINE# #INDENT# height_range = 100.0 #NEWLINE# val_diff = ( self . max_value - self . min_value ) #NEWLINE# if first_move : #NEWLINE# #INDENT# value = self . value #NEWLINE# self . height_offset = ( ( mouse_y - height_range ) + ( ( height_range * ( value - self . min_value ) ) / val_diff ) ) #NEWLINE# #UNINDENT# relative_y = ( mouse_y - self . height_offset ) #NEWLINE# if ( relative_y < 0 ) : #NEWLINE# #INDENT# relative_y = 0 #NEWLINE# #UNINDENT# if ( relative_y >= height_range ) : #NEWLINE# #INDENT# relative_y = height_range #NEWLINE# #UNINDENT# relative_y = ( height_range - relative_y ) #NEWLINE# new_value = ( ( ( val_diff * relative_y ) / self ) + self . min_value ) #NEWLINE# new_value = self . processValue ( new_value ) #NEWLINE# self . setControlPos ( new_value ) #NEWLINE# self . setValue ( new_value )