indexing description: "Objects that represents the credits menu" author: "Benno Baumgartner, benno@student.ethz.ch" date: "$Date$" revision: "$Revision$" class CREDITS inherit MENU redefine initialize_scene end UC_SHARED_ITEMS export {NONE} all undefine default_create end feature initialize_scene is -- Initialize the scene local bitmap: EM_BITMAP i: INTEGER str: EM_STRING font: EM_FONT lines: EM_DRAWABLE_CONTAINER [EM_STRING] cursor: DS_LINKED_LIST_CURSOR [EM_STRING] scroll_container: EM_ZOOMABLE_CONTAINER scroll: EM_NEVER_ENDING_BACKGROUND_VERTICAL 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) -- Build the menu background bitmap_factory.create_empty_bitmap (816, 434) check todo_proper_error_handling: bitmap_factory.last_bitmap /= Void end bitmap := bitmap_factory.last_bitmap bitmap.set_x_y (98, 298) scene.extend (bitmap) bitmap_factory.create_empty_bitmap (812, 430) check todo_proper_error_handling: bitmap_factory.last_bitmap /= Void end bitmap := bitmap_factory.last_bitmap bitmap.fill (uc_background_color) bitmap.set_x_y (100, 300) scene.extend (bitmap) add_menu_entries_to_scene font := uc_gui_elements_default_font create lines.make create str.make ("Created with", font) lines.extend (str) create str.make ("", font) lines.extend (str) create str.make ("EiffelSDL", font) lines.extend (str) create str.make ("eiffelsdl.sf.net", font) lines.extend (str) create str.make ("", font) lines.extend (str) create str.make ("", font) lines.extend (str) create str.make ("Programmers:", font) lines.extend (str) create str.make ("", font) lines.extend (str) create str.make ("Beat Steiger", font) lines.extend (str) create str.make ("steigebe@student.ethz.ch", font) lines.extend (str) create str.make ("", font) lines.extend (str) create str.make ("and", font) lines.extend (str) create str.make ("", font) lines.extend (str) create str.make ("Florian Keusch", font) lines.extend (str) create str.make ("fkeusch@student.ethz.ch", font) lines.extend (str) create str.make ("", font) lines.extend (str) create str.make ("and", font) lines.extend (str) create str.make ("", font) lines.extend (str) create str.make ("Markus Neidhart", font) lines.extend (str) create str.make ("nemarkus@student.ethz.ch", font) lines.extend (str) create str.make ("", font) lines.extend (str) create str.make ("and", font) lines.extend (str) create str.make ("", font) lines.extend (str) create str.make ("Stefan Hildenbrand", font) lines.extend (str) create str.make ("stefanhi@student.ethz.ch", font) lines.extend (str) create str.make ("", font) lines.extend (str) create str.make ("", font) lines.extend (str) create str.make ("Thanks to:", font) lines.extend (str) create str.make ("", font) lines.extend (str) create str.make ("Benno Baumgartner", font) lines.extend (str) create str.make ("For a cool", font) lines.extend (str) create str.make ("Assistance", font) lines.extend (str) create str.make ("", font) lines.extend (str) create str.make ("and", font) lines.extend (str) create str.make ("", font) lines.extend (str) create str.make ("Sandro Blum", font) lines.extend (str) create str.make ("For the sound", font) lines.extend (str) create str.make ("visit: sound.selenic.net", font) lines.extend (str) create str.make ("", font) lines.extend (str) create str.make ("", font) lines.extend (str) create str.make ("", font) lines.extend (str) create str.make ("", font) lines.extend (str) create str.make ("", font) lines.extend (str) create str.make ("", font) lines.extend (str) create str.make ("", font) lines.extend (str) create str.make ("19.06.2005", font) lines.extend (str) create cursor.make (lines) from cursor.start i := 0 until cursor.off loop cursor.item.set_x_y (406 - cursor.item.width // 2, 330 + i * 40) cursor.forth i := i + 1 end create scroll.make (lines) scroll.set_speed (40) start_animating (scroll) selected_nr := 1 menu_entries.item (selected_nr).set_font (select_font) create scroll_container.make (812, 330) scroll_container.set_x_y (100, 300) scroll_container.extend (scroll) scene.extend (scroll_container) end feature {NONE} -- Event handler on_select is -- Set the `next_scene' according to `selected_nr' here local menu: MENU do if selected_nr = 1 then -- Back menu ?= last_scene menu.set_next_scene (Void) menu.restart_event_loop menu.empty_main_container next_scene := last_scene end end end