def draw(self):
     self.figure = rectangle(self.x,
                             self.y,
                             self.w,
                             self.h,
                             filled=True,
                             color=self.color)
     self.figure.draw()
     self.heading.draw()
     self.desc.draw()
	def __init__(self, title, width, height, **kwargs):

		super().__init__(title, width, height, **kwargs)

		self.cText = ''
		self.negative = 0

		self.answerBox = draw.rectangle(self.width//2 - 100, self.description.y - 200, 200, 50, filled=True, color = draw.color2Array('95a799'))
		self.lblAnswer = pyglet.text.Label('', x = self.width//2, anchor_x = 'center', y = self.description.y - 200 - 10, anchor_y = 'top', font_size = 20)

		self.window.push_handlers(on_draw = self.template_on_draw)
		self.window.push_handlers(on_text = self.on_text, on_text_motion = self.on_text_motion, on_draw = self.on_draw)
Exemple #3
0
    def __init__(self, title, width, height, **kwargs):

        super().__init__(title, width, height, **kwargs)

        self.cText = ''
        self.negative = 0

        self.answerBox = draw.rectangle(self.width // 2 - 100,
                                        self.description.y - 200,
                                        200,
                                        50,
                                        filled=True,
                                        color=draw.color2Array('95a799'))
        self.lblAnswer = pyglet.text.Label('',
                                           x=self.width // 2,
                                           anchor_x='center',
                                           y=self.description.y - 200 - 10,
                                           anchor_y='top',
                                           font_size=20)

        self.window.push_handlers(on_draw=self.template_on_draw)
        self.window.push_handlers(on_text=self.on_text,
                                  on_text_motion=self.on_text_motion,
                                  on_draw=self.on_draw)
Exemple #4
0
	def draw(self):
		self.figure = rectangle(self.x, self.y, self.w, self.h, filled=True, color=self.color)
		self.figure.draw()
		self.heading.draw()
		self.desc.draw()