Exemplo n.º 1
0
 def move(self):
     Layer.move(self)
     x, y = self.get_position()
     #print x
     if 50 > x > 45:
         print 'change'
         self.set_background(color=RED)
Exemplo n.º 2
0
    def __init__(self, points=None):
        Layer.__init__(self)
        self.image.set_colorkey(TRANSPARENT)

        w, h = self.image.get_size()
        self.w = w
        self.h = h

        self.selected = 0
        self.button_held = 0
        self.display_fun = 1
        self.n_report = 10

        if points is None:
            points = [[30, 53], [265, 571], [462, 445], [695, 56], [781, 572]]
        self.points = points

        self.drawSpline()
        self.drawFun()