indexing description: "[ Credits ]" date: "$Date$" revision: "$Revision$" class BB_CREDITS inherit BB_MENU create make feature {NONE} -- Initialization make is -- create widgets local button: BB_MENU_BUTTON do init_menu create programmed_by.make_from_text ("Programmed by") programmed_by.set_font (title_font) programmed_by.set_foreground_color (create {EM_COLOR}.make_white) programmed_by.resize_to_optimal_dimension programmed_by.set_position (Window_width // 2 - programmed_by.width // 2, 150) add_widget (programmed_by) create cows.make_from_file ("./images/credits.jpg") cows.set_position (Window_width // 2 - cows.width // 2, 220) add_widget (cows) -- create menu items create button.make ("Back") button.set_position (Window_width // 2 - button.width // 2, 550) button.pressed_event.subscribe (agent back_button_pressed) add_button (button) set_selected_menu_item(1) video_subsystem.show_cursor time.add_timed_procedure (agent part_2, 5000) end feature -- Element Change part_2 is -- change labels do programmed_by.hide cows.hide create text.make_from_text ("Ok ok, you are right, %Ntwo cows can't program a game.") text.enable_multilined text.align_center text.set_font (text_font) text.set_foreground_color (create {EM_COLOR}.make_white) text.resize_to_optimal_dimension text.set_position (Window_width // 2 - text.width // 2, 250) add_widget (text) time.add_timed_procedure (agent part_3, 5000) end part_3 is -- change labels do text.set_text ("We'll be honest now. We promise!") text.resize_to_optimal_dimension text.set_position (Window_width // 2 - text.width // 2, 250) time.add_timed_procedure (agent part_4, 5000) end part_4 is -- change labels do text.hide programmed_by.show remove_widget (cows) create cows.make_from_file ("./images/credits2.jpg") cows.set_position (Window_width // 2 - cows.width // 2, 220) add_widget (cows) time.add_timed_procedure (agent part_5, 7500) end part_5 is -- change labels do programmed_by.hide cows.hide text.show text.set_text ("What? You say a lot of cows can't program either?") text.resize_to_optimal_dimension text.set_position (Window_width // 2 - text.width // 2, 250) time.add_timed_procedure (agent part_6, 5000) end part_6 is -- change labels do text.set_text ("Ok, you got us.") text.resize_to_optimal_dimension text.set_position (Window_width // 2 - text.width // 2, 250) time.add_timed_procedure (agent part_7, 5000) end part_7 is -- change labgels local a_label: EM_LABEL do programmed_by.show text.set_text ("Rafael Bischof %Nand %NPeter Wyss") text.resize_to_optimal_dimension text.set_position (Window_width // 2 - text.width // 2, 220) create a_label.make_from_text ("Special Thanks to") a_label.set_font (title_font) a_label.set_foreground_color (create {EM_COLOR}.make_white) a_label.resize_to_optimal_dimension a_label.set_position (Window_width // 2 - a_label.width // 2, 380) add_widget (a_label) create a_label.make_from_text ("Till G. Bay") a_label.set_font (text_font) a_label.set_foreground_color (create {EM_COLOR}.make_white) a_label.resize_to_optimal_dimension a_label.set_position (Window_width // 2 - a_label.width // 2, 450) add_widget (a_label) end feature -- Events back_button_pressed is -- back button pressed do time.remove_timed_procedure (agent part_2) time.remove_timed_procedure (agent part_3) time.remove_timed_procedure (agent part_4) time.remove_timed_procedure (agent part_5) time.remove_timed_procedure (agent part_6) time.remove_timed_procedure (agent part_7) set_next_scene (create {BB_MAINMENU}.make) start_next_scene end feature {NONE} -- Implementation programmed_by: EM_LABEL -- programmed by label cows: EM_IMAGEPANEL -- cow image text: EM_LABEL -- text title_font: EM_TTF_FONT is -- font for titles once create Result.make_from_ttf_file ("./fonts/moo.ttf", 35) end text_font: EM_TTF_FONT is -- font for text once Result := Standard_ttf_fonts.bitstream_vera_sans (25) end end