예제 #1
0
    def on_mouse_pressed(self, x, y, buttons, modifiers):
        # Make a rectangle of the absolute position of our marker
        rectangle = AABox()
        rectangle.position = self.marker.absolute_position
        rectangle.size = self.marker.size

        if rectangle.contains_point(Vector(x, y)):
            logging.debug('Slider Actively Dragging')
            self.actively_dragging = True
예제 #2
0
 def on_mouse_pressed(self, x, y, buttons, modifiers):
     rectangle = AABox()
     rectangle.position = self.absolute_position
     rectangle.size = self.size
     if rectangle.contains(x,y):
         self.checked = not self.checked