indexing description: "[ Objects that represents the instructions menu ]" date: "$Date$" revision: "$Revision$" class INSTRUCTIONS inherit MENU redefine initialize_scene, redraw end create make_scene feature -- Initialization initialize_scene is -- Initialize the scene local str: EM_STRING font: EM_FONT do Precursor -- build the menu entries create menu_entries.make (1, 1) menu_entries.put (create {EM_STRING}.make ("Back", normal_font), 1) menu_entries.item (1).set_x_y (512 - menu_entries.item (1).width // 2, 650) font := standard_bmp_fonts.medium_font create str.make ("ESC/RETURN: Exit", font) str.set_x_y (110, 330) scene.extend (str) create str.make ("SPACE: Change view mode", font) str.set_x_y (110, 330 + 32) scene.extend (str) create str.make ("w/s: Speed forward/reverse", font) str.set_x_y (110, 330 + 2 * 32) scene.extend (str) create str.make ("a/d: Left/right", font) str.set_x_y (110, 330 + 3 * 32) scene.extend (str) selected_nr := 1 menu_entries.item (selected_nr).set_font (select_font) end feature {NONE} -- Event handler on_select is -- Set the `next_scene' according to `selected_nr' here do if selected_nr = 1 then -- back next_scene := create {START}.make_scene end end redraw is -- Redraw frame. do screen.clear scene.draw (screen) draw_menu_entries screen.redraw end end