Example #1
0
	def mousepos(self):
		if pylon.mouse_ispressed():
			if pylon.mouse_getbutton() == 2:
				self.radus = float(pylon.mouse_pos_sy() - pylon.mouse_pos_y()) / float(pylon.window_height()) * -100 + self.pradus
				self.setforcenter(self.center,self.radus,self.anglex-90+180,360-(self.angley+180))
		else:
			self.pradus = self.radus
Example #2
0
	def mouserot(self):
		if pylon.mouse_ispressed():
			if pylon.mouse_getbutton() == 0:
				difx = ( pylon.mouse_pos_sx() - pylon.mouse_pos_x() ) * -1
				dify = ( pylon.mouse_pos_sy() - pylon.mouse_pos_y() ) * -1
				self.anglex = ( ( float(dify) / float(pylon.window_height()) ) * 180.0 ) + self.panglex
				self.angley = ( ( float(difx) / float(pylon.window_width())  ) * 360.0 ) + self.pangley
				self.setforcenter(self.center,self.radus,self.anglex-90+180,360-(self.angley+180))
		else:
			self.panglex = self.anglex
			self.pangley = self.angley