Δημοσιεύτηκε: 07 Δεκ 2009, 02:31
από malos
Πως δεν βλέπεις;

Στη γραμμή 75, (μετά τον ορισμό του stop_button), έχω προσθέσει αυτά :
Κώδικας: Επιλογή όλων
record_button_x = 75
record_button_y = 125
record_button_width = 32
record_button_height = 24


που δεν υπάρχουν στο αρχικό.

Επίσης και αυτά, στη γραμμή 153
Κώδικας: Επιλογή όλων
self.add_option(IntOption('Screenlet', 'record_button_x',
self.record_button_x, 'Play button x position', 'record_button_x',
min=0, max=self.width,hidden= True))
self.add_option(IntOption('Screenlet', 'record_button_y',
self.record_button_y, 'Play button y position', 'record_button_y',
min=0, max=self.height,hidden= True))
self.add_option(IntOption('Screenlet', 'stop_button_width',
self.record_button_width, 'Play button width', 'record_button_width',
min=0, max=self.width,hidden= True))
self.add_option(IntOption('Screenlet', 'stop_button_height',
self.record_button_height, 'Play button height', 'record_button_height',
min=0, max=self.height,hidden= True))




Αυτά στην 421

Κώδικας: Επιλογή όλων
elif x <= self.record_button_width +self.record_button_x and x >= self.record_button_x and y <= self.stop_button_height +self.stop_button_y and y >= self.stop_button_y:
self.but3 = '_press'
self.record()
self.redraw_canvas()
return True


426 ...
Κώδικας: Επιλογή όλων
self.but3 = ''


451 ...

Κώδικας: Επιλογή όλων
self.draw_record_button(ctx)


και 468

Κώδικας: Επιλογή όλων
def draw_record_button(self,ctx):
ctx.save()
ctx.translate(self.record_button_x,self.record_button_y)
self.theme.render(ctx, 'record'+ self.but3)
ctx.restore()