indexing description: "[ Main Menu ]" date: "$Date$" revision: "$Revision$" class BB_MAINMENU inherit BB_MENU EM_SHARED_SUBSYSTEMS export {NONE} all end create make feature {NONE} -- Initialization make is -- create widgets local button: BB_MENU_BUTTON do init_menu init_sound_player -- create menu items create button.make ("Singleplayer") button.set_position (Window_width // 2 - button.width // 2, 170 + 0 * 50) button.pressed_event.subscribe (agent singleplayer_button_pressed) add_button (button) create button.make ("Multiplayer") button.set_position (Window_width // 2 - button.width // 2, 170 + 1 * 50) button.pressed_event.subscribe (agent multiplayer_button_pressed) add_button (button) create button.make ("Options") button.set_position (Window_width // 2 - button.width // 2, 170 + 2 * 50) button.pressed_event.subscribe (agent options_button_pressed) add_button (button) create button.make ("Highscore") button.set_position (Window_width // 2 - button.width // 2, 170 + 3 * 50) button.pressed_event.subscribe (agent highscore_button_pressed) add_button (button) create button.make ("Instructions") button.set_position (Window_width // 2 - button.width // 2, 170 + 4 * 50) button.pressed_event.subscribe (agent instructions_button_pressed) add_button (button) create button.make ("Level Editor") button.set_position (Window_width // 2 - button.width // 2, 170 + 5 * 50) button.pressed_event.subscribe (agent leveledit_button_pressed) add_button (button) create button.make ("Credits") button.set_position (Window_width // 2 - button.width // 2, 170 + 6 * 50) button.pressed_event.subscribe (agent credits_button_pressed) add_button (button) create button.make ("Exit") button.set_position (Window_width // 2 - button.width // 2, 170 + 7 * 50) button.pressed_event.subscribe (agent back_button_pressed) add_button (button) set_selected_menu_item(1) video_subsystem.show_cursor end feature -- Events singleplayer_button_pressed is -- singleplayer button pressed do set_next_scene (create {BB_SINGLEPLAYER}.make) start_next_scene end multiplayer_button_pressed is -- multiplayer button pressed do set_next_scene (create {BB_MULTIPLAYER}.make) start_next_scene end options_button_pressed is -- options button pressed do set_next_scene (create {BB_OPTIONS}.make) start_next_scene end highscore_button_pressed is -- highscore button pressed do set_next_scene (create {BB_LOCAL_HIGHSCORE}.make) start_next_scene end instructions_button_pressed is -- instructions button pressed do set_next_scene (create {BB_INSTRUCTIONS}.make) start_next_scene end leveledit_button_pressed is -- leveledit button pressed do set_next_scene (create {BB_LEVELEDIT}.make) start_next_scene end credits_button_pressed is -- credits button pressed do set_next_scene (create {BB_CREDITS}.make) start_next_scene end back_button_pressed is -- exit button pressed do quit end end