indexing description: "[ Network multiplayer client example. ]" date: "$Date$" revision: "$Revision$" class EM_MP_CLIENT inherit EM_APPLICATION rename screen as main_screen end create make feature {NONE} -- Initialization make (args: ARRAY[STRING]) is -- Create the mp client test application. do video_subsystem.set_video_surface_height (600) video_subsystem.set_video_surface_width (800) video_subsystem.set_video_bpp (32) video_subsystem.set_opengl (false) video_subsystem.enable initialize_screen set_window_title ("EM MULTIPLAYER CLIENT EXAMPLE") set_window_icon ("icon.png") set_application_id ("multiplayer_client") -- enable the network subsystem network_subsystem.enable create server_selection.make_with_master_server ("eiffelmedia.origo.ethz.ch","/highscore/getserverlist.php?gameidlogin=em_net_sample") set_scene (server_selection) server_selection.connect.clicked_event.subscribe (agent on_connect) server_selection.cancel.clicked_event.subscribe (agent server_selection.quit) server_selection.cancel.set_text ("Quit") launch network_subsystem.disable end feature -- Basic operations on_connect is -- Connect button clicked local a_box: EM_MESSAGE_DIALOG do if server_selection.has_selected_server then server_selection.set_next_scene (create {EM_MP_CLIENT_SCENE}.make (server_selection.selected_server)) server_selection.start_next_scene else create a_box.make_from_message ("Please select a server first!") a_box.set_modal (true) a_box.set_draggable (false) a_box.show end end feature {NONE} -- Implementation client_scene : EM_MP_CLIENT_SCENE -- Client scene server_selection : EM_SERVER_LOOKUP_SCENE -- Server selection the_square : SQUARE_ON_CIRCLE -- Square on circle end