示例#1
0
	def hotkeysEnabled(self):
		point = Tc2Win32.mouseGetPos()
		hwndUnderMouse = Tc2Win32.windowFromPoint(point)
		className = Tc2Win32.windowGetClassName(hwndUnderMouse)
		if className in (self.ClassChat, self.ClassNoteEditor, self.ClassChatEditor, self.ClassNoteEditorBox, self.ClassInfoBox):
			return False
		return True
示例#2
0
 def hotkeysEnabled(self):
     point = Tc2Win32.mouseGetPos()
     hwndUnderMouse = Tc2Win32.windowFromPoint(point)
     className = Tc2Win32.windowGetClassName(hwndUnderMouse)
     if className in (self.ClassChat, self.ClassNoteEditor,
                      self.ClassChatEditor, self.ClassNoteEditorBox,
                      self.ClassInfoBox):
         return False
     return True
示例#3
0
	def handleGainedForeground(self):
		template = self.template()
		if template is not None:
			Tc2Config.globalObject.feedbackMessage.emit(template.name() )
			if Tc2Config.globalObject.settingsPokerStars.moveMouseToActiveTable():
				if not Tc2Win32.mouseButtonsDown():
					point = Tc2Win32.mouseGetPos()
					rect = Tc2Win32.windowGetRect(self.hwnd)
					if not rect.contains(point):
						point = template.points['EmptySpace']
						point = Tc2Win32.windowClientPointToScreenPoint(self.hwnd, point)
						Tc2Win32.mouseSetPos(point)
			return True
		return False
示例#4
0
 def handleGainedForeground(self):
     template = self.template()
     if template is not None:
         Tc2Config.globalObject.feedbackMessage.emit(template.name())
         if Tc2Config.globalObject.settingsPokerStars.moveMouseToActiveTable(
         ):
             if not Tc2Win32.mouseButtonsDown():
                 point = Tc2Win32.mouseGetPos()
                 rect = Tc2Win32.windowGetRect(self.hwnd)
                 if not rect.contains(point):
                     point = template.points['EmptySpace']
                     point = Tc2Win32.windowClientPointToScreenPoint(
                         self.hwnd, point)
                     Tc2Win32.mouseSetPos(point)
         return True
     return False