Telefact/main.py

33 lines
896 B
Python
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

"""
Telefact — minimal runner
- Opens a 4:3 800×600 window
- Renders header (blue band) and footer (red band)
- No formatter yet; thats next.
"""
import tkinter as tk
from src.telefact_renderer import TelefactRenderer
from src.core.telefact_frame import TelefactFrame
def main():
root = tk.Tk()
root.title("Telefact — Broadcaster Prototype")
renderer = TelefactRenderer(root, width=800, height=600, show_grid=False)
frame = TelefactFrame()
# put a couple test glyphs so you can confirm alignment quickly
for i, ch in enumerate("TELEFACT"):
frame.set_cell(2 + i, 2, ch, "yellow")
for i, ch in enumerate("BROADCASTER BASE"):
frame.set_cell(2 + i, 4, ch, "white")
renderer.render(frame)
root.bind("<Escape>", lambda e: root.quit())
root.bind("q", lambda e: root.quit())
root.mainloop()
if __name__ == "__main__":
main()