indexing description: "[ Score ]" date: "$Date$" revision: "$Revision$" class FINISHED inherit MENU redefine initialize_scene, redraw end create make feature -- Initialization make (a_time_to_target: INTEGER) is -- Time_to_target in microseconds do make_scene time_to_target := a_time_to_target end feature -- Initialization initialize_scene is -- Initialize the scene local str: EM_STRING font: EM_FONT hour: INTEGER min: INTEGER sec: INTEGER mic: INTEGER 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 sec := time_to_target // 1000 mic := time_to_target \\ 1000 min := sec // 60 sec := sec \\ 60 hour := min // 60 min := min \\ 60 create str.make ("Time to target: "+hour.out+"h "+min.out+"m "+sec.out+"."+mic.out+"s", font) str.set_x_y (60, 330) 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 feature {NONE} -- Implementation time_to_target: INTEGER -- Time to target in microseconds end