title screen works

This commit is contained in:
Yonokid
2024-09-10 00:43:38 -04:00
parent cb20f408ac
commit 1843ca9a49
5 changed files with 291 additions and 71 deletions

View File

@@ -42,12 +42,15 @@ def main():
start_song = False
while not ray.window_should_close():
ray.begin_drawing()
ray.clear_background(ray.WHITE)
screen = screen_mapping[current_screen]
if screen == title_screen:
ray.clear_background(ray.BLACK)
else:
ray.clear_background(ray.WHITE)
if ray.is_key_pressed(ray.KeyboardKey.KEY_F11):
ray.toggle_fullscreen()
screen = screen_mapping[current_screen]
if screen == game_screen and not start_song:
game_screen.init_tja(sys.argv[1], sys.argv[2])
start_song = True