Initial code commit

This commit is contained in:
2025-08-05 01:10:28 +01:00
parent 8052597e84
commit 8fa467cb93
7 changed files with 1073 additions and 1 deletions

31
display.py Executable file
View File

@@ -0,0 +1,31 @@
# display.py
import pyglet
class DisplayContent:
def __init__(self):
pass
def create(self, obj, width, height, x, y):
obj.audiencebatch = pyglet.graphics.Batch()
obj.audiencecontent = []
class DisplayLyrics(DisplayContent):
def __init__(self, text):
self._text = text
def create(self, obj, width, height, x, y):
scale = height / 600
super().create(obj, width, height, x, y)
obj.audiencecontent.append(pyglet.text.Label(self._text,
font_name='Ariel',
font_size=36 * scale,
x=x + width//2, y=y + height//2,
anchor_x='center', anchor_y='center',
width=width, align='center',
multiline=True,
batch=obj.audiencebatch))