def __init__(self, *args, **kwargs): """ Draw a dummy actor for testing """ super(Dummy, self).__init__() self.batch = Batch() fos.lib.pyglet.text.Label( 'Hello, world', font_name='Times New Roman', font_size=36, dpi=250, # x=window.width//2, y=window.height//2, anchor_x='center', anchor_y='center', batch=self.batch) fos.lib.pyglet.text.Label( 'Hi', font_name='Times New Roman', font_size=26, dpi=100, # x=window.width//2, y=window.height//2, anchor_x='center', anchor_y='center', batch=self.batch)
class Dummy(Actor): def __init__(self, *args, **kwargs): """ Draw a dummy actor for testing """ super(Dummy, self).__init__() self.batch = Batch() fos.lib.pyglet.text.Label( 'Hello, world', font_name='Times New Roman', font_size=36, dpi=250, # x=window.width//2, y=window.height//2, anchor_x='center', anchor_y='center', batch=self.batch) fos.lib.pyglet.text.Label( 'Hi', font_name='Times New Roman', font_size=26, dpi=100, # x=window.width//2, y=window.height//2, anchor_x='center', anchor_y='center', batch=self.batch) def update(self, dt): pass def draw(self): pass glPushMatrix() #glRotatef(5.0, 0, 1, 0) glTranslatef(-100, 0, 0) self.batch.draw() glPopMatrix()
class Dummy(Actor): def __init__(self, *args, **kwargs): """ Draw a dummy actor for testing """ super(Dummy, self).__init__() self.batch = Batch() fos.lib.pyglet.text.Label('Hello, world', font_name='Times New Roman', font_size=36, dpi=250, # x=window.width//2, y=window.height//2, anchor_x='center', anchor_y='center', batch = self.batch) fos.lib.pyglet.text.Label('Hi', font_name='Times New Roman', font_size=26, dpi=100, # x=window.width//2, y=window.height//2, anchor_x='center', anchor_y='center', batch = self.batch) def update(self, dt): pass def draw(self): pass glPushMatrix() #glRotatef(5.0, 0, 1, 0) glTranslatef(-100,0,0) self.batch.draw() glPopMatrix()
def __init__(self, *args, **kwargs): """ Draw a dummy actor for testing """ super(Dummy, self).__init__() self.batch = Batch() fos.lib.pyglet.text.Label('Hello, world', font_name='Times New Roman', font_size=36, dpi=250, # x=window.width//2, y=window.height//2, anchor_x='center', anchor_y='center', batch = self.batch) fos.lib.pyglet.text.Label('Hi', font_name='Times New Roman', font_size=26, dpi=100, # x=window.width//2, y=window.height//2, anchor_x='center', anchor_y='center', batch = self.batch)