added basic structure, shows a black screen

This commit is contained in:
Nicholas Dyer 2023-02-19 16:13:44 -05:00
parent 04f18307f2
commit ec6dfc9ee4
3 changed files with 42 additions and 0 deletions

1
thermopi/__init__.py Normal file
View File

@ -0,0 +1 @@
__version__ = '0.0.1'

13
thermopi/__main__.py Normal file
View File

@ -0,0 +1,13 @@
import sys
from thermopi.screen import main as start
if __name__ == '__main__':
windowed_mode = False
if len(sys.argv) > 0:
for arg in sys.argv:
if arg == '--window':
windowed_mode = True
start(windowed_mode)

28
thermopi/screen.py Normal file
View File

@ -0,0 +1,28 @@
import pygame
def main(windowed_mode):
pygame.init()
clock = pygame.time.Clock()
if windowed_mode:
window = pygame.display.set_mode((720, 720))
else:
window = pygame.display.set_mode((720, 720), pygame.FULLSCREEN)
window.fill((0, 0, 0))
running = True
while running:
clock.tick(60)
pygame.mouse.set_visible(False)
for event in pygame.event.get():
if event.type == pygame.QUIT:
running = False
if event.type == pygame.MOUSEBUTTONDOWN:
running = False
pygame.display.flip()
pygame.quit()