parameters: (self, device)
docstring: Event handler that is called when a device is removed.
docstring_summary: Event handler that is called when a device is removed.
docstring_tokens: Event handler that is called when a device is removed .
function: def disconnect(self, device):
          """Event handler that is called when a device is removed."""
  
          if self.wheel != device:
              # We don't care since it's not our wheel.
              return
  
          # Tell ShowBase that the device is no longer needed.
          print("Disconnected %s" % (device))
          self.detachInputDevice(device)
          self.wheel = None
  
          # Do we have any steering wheels?  Attach the first other steering wheel.
          devices = self.devices.getDevices(InputDevice.DeviceClass.steering_wheel)
          if devices:
              self.connect(devices[0])
          else:
              # No devices.  Show the warning.
              self.lblWarning.show()
function_tokens: def disconnect ( self , device ) : if self . wheel != device : # We don't care since it's not our wheel. return # Tell ShowBase that the device is no longer needed. print ( "Disconnected %s" % ( device ) ) self . detachInputDevice ( device ) self . wheel = None # Do we have any steering wheels?  Attach the first other steering wheel. devices = self . devices . getDevices ( InputDevice . DeviceClass . steering_wheel ) if devices : self . connect ( devices [ 0 ] ) else : # No devices.  Show the warning. self . lblWarning . show ( )