added basic structure, shows a black screen
This commit is contained in:
parent
04f18307f2
commit
ec6dfc9ee4
1
thermopi/__init__.py
Normal file
1
thermopi/__init__.py
Normal file
@ -0,0 +1 @@
|
||||
__version__ = '0.0.1'
|
13
thermopi/__main__.py
Normal file
13
thermopi/__main__.py
Normal 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
28
thermopi/screen.py
Normal 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()
|
Loading…
Reference in New Issue
Block a user