MCPcopy Create free account
hub / github.com/csev/py4e / getLastMouse

Method getLastMouse

code/graphics/graphics.py:335–342  ·  view source on GitHub ↗

Return last mouse click Point without waiting for the next click. Returns None if no mouse click since the call self.clearLastMouse().

(self)

Source from the content-addressed store, hash-verified

333 return Point(x,y)
334
335 def getLastMouse(self):
336 """Return last mouse click Point without waiting for the next click.
337 Returns None if no mouse click since the call self.clearLastMouse().
338 """
339 if self.mouseX == None or self.mouseY == None:
340 return None
341 x,y = self.toWorld(self.mouseX, self.mouseY)
342 return Point(x,y)
343
344 def clearLastMouse(self):
345 """Makes self.getLastMouse() return None until the next mouse click.

Callers

nothing calls this directly

Calls 2

toWorldMethod · 0.95
PointClass · 0.85

Tested by

no test coverage detected