Ejemplo n.º 1
0
	def update(self):
		mouse = MouseManager.mousePosRelative
		if self.pos[0] - self.size[0] / 2 < mouse[0]  < self.pos[0] + self.size[0] / 2:
			if self.pos[1] - self.size[1] / 2 < mouse[1] < self.pos[1] + self.size[1] / 2:
				self.isHover()
				if MouseManager.buttonPressed(0):
					self.func()
			else:
				self.isUnhover()
		else:
			self.isUnhover()
 def inputPressed(inpt):
     if InputManager.type[inpt] == 0:
         return kbm.keyPressed(InputManager.inputs[inpt])
     else:
         return mm.buttonPressed(InputManager.inputs[inpt])