indexing description: "[ This class is the common base for the EM_MP_CLIENT and EM_MP_SERVER class. ]" date: "$Date$" revision: "$Revision$" "This class is the common base for the EM_MP_CLIENT and EM_MP_SERVER class." date: "$Date$" revision: "$Revision$" class EM_MP_SAMPLE_SCENE inherit EM_COMPONENT_SCENE redefine make_component_scene, initialize_scene end feature -- Initialisation make_component_scene is -- Init do Precursor create_widgets end initialize_scene is -- Initialize scene do Precursor video_subsystem.video_surface.fill (create {EM_COLOR}.make_with_rgb (200,200,200)) end create_widgets is -- create the widghets local a_grey: EM_COLOR a_label: EM_LABEL do create a_grey.make_with_rgb (200,200,200) create a_label.make_from_text ("em net example") a_label.set_background_color (a_grey) a_label.set_x (590); a_label.set_y (20); a_label.set_width (200) add_component (a_label) create interpolation_level_slider.make_from_range_horizontal (1, 6) interpolation_level_slider.set_background_color (a_grey) interpolation_level_slider.set_current_value (2) interpolation_level_slider.set_position (590, 40) interpolation_level_slider.set_dimension (200, 50) interpolation_level_slider.position_changed_event.subscribe (agent on_interpolation_level_changed (?)) add_component (interpolation_level_slider) create interpolation_level_label.make_from_text ("interpolation_level: 0") interpolation_level_label.set_background_color (a_grey) interpolation_level_label.set_x (590); interpolation_level_label.set_y (70); interpolation_level_label.set_width (200) add_component (interpolation_level_label) create time_label.make_from_text ("time: 0") time_label.set_background_color (a_grey) time_label.set_x (590); time_label.set_y (300); time_label.set_width (200) add_component (time_label) create status_message.make_empty status_message.set_background_color (create {EM_COLOR}.make_with_rgb (50,30,30)) status_message.set_position (20, 490) status_message.set_dimension (560, 90) add_component (status_message) create fpslabel.make fpslabel.set_background_color (a_grey) add_component (fpslabel) create drawables.make_from_dimension (560,450) drawables.set_background_color (create {EM_COLOR}.make_with_rgb (55,55,80)) drawables.set_x (20) drawables.set_y (20) add_component (drawables) end feature --Attributes drawables: EM_DRAWABLE_PANEL -- Panel for drawables (the square) status_message: EM_TEXTBOX -- Status message textbox interpolation_level_slider: EM_SLIDER -- Interpolation level slider interpolation_level_label: EM_LABEL -- Label to display interpolation level time_label: EM_LABEL -- Label to display current servertime the_square: SQUARE_ON_CIRCLE -- A sqaure that moves on a circle fpslabel: EM_FPS_LABEL -- fps label -- Displays frames per seconds feature {NONE} -- Implementation on_interpolation_level_changed (interpolation_level: INTEGER) is -- adjust interpolation_level (events generated by interpolation_level_slider) do interpolation_level_label.set_text ("interpolation level: " + interpolation_level.out) the_square.set_interpolation_level (interpolation_level) end end