Merge remote-tracking branch 'origin/main'

main
Jonas Wächter 2023-03-28 13:11:27 +02:00
commit fb41ab5df8
1 changed files with 6 additions and 2 deletions

View File

@ -53,8 +53,12 @@ if what_to_run == 'menu':
level_menu_width = screen_width / 2 level_menu_width = screen_width / 2
level_menu_height = screen_height / 2 level_menu_height = screen_height / 2
level_menu = LevelMenu(parsed_levels_manager.levels, 0, 0, level_menu_width, level_menu_height, 3) level_menu = LevelMenu(parsed_levels_manager.levels, 0, 0, level_menu_width, level_menu_height, 3)
level_menu.level_select_listener = lambda selected_level: print(selected_level.name, "selected")
# generated_level.load_level(selected_level) def load_next_level(selected_level):
generated_level.destroy_level()
generated_level.load_level(selected_level)
level_menu.level_select_listener = lambda selected_level: load_next_level(selected_level)
for level_text_label in level_menu.level_text_labels: for level_text_label in level_menu.level_text_labels:
sprite_manager.add_ui_element(DrawLayers.UI, level_text_label) sprite_manager.add_ui_element(DrawLayers.UI, level_text_label)