indexing description: "[ Simple example to demonstrate how to use the classes generated with the EiffelMedia settings generator. ]" date: "$Date$" revision: "$Revision$" class SETTINGS_SIMPLE inherit SHARED_SETTINGS EM_APPLICATION EM_SHARED_STANDARD_FONTS create make feature -- Initialization make is -- root procedure of the example local title: EM_LABEL number: EM_LABEL the_scene: EM_WIDGET_SCENE do -- The important thing about this example is that the classes -- 'settings.e' and 'shared_settings.e' are automatically generated -- with 'em_settings_generator' ({EM}/resources/tools/settings_generator) -- from the file 'settings.xml'. set_application_id ("settings_simple") -- This example just shows how easy it is to access settings, set settings and -- save settings to disc. -- Read saved settings settings.read_user_settings -- Change settings settings.set_num_of_starts (settings.num_of_starts + 1) -- Access settings video_subsystem.set_video_surface_height (settings.resolution_height) video_subsystem.set_video_surface_width(settings.resolution_width) video_subsystem.set_video_bpp (32) video_subsystem.set_opengl(false) video_subsystem.enable initialize_screen set_window_title ("EiffelMedia Settings Example (simple)") set_window_icon ("icon.png") -- Set up the scene create the_scene.make_widget_scene create title.make_from_text ("Number of starts:") title.set_position (10, 10) the_scene.add_widget (title) create number.make_from_text (settings.num_of_starts.out) number.set_font (standard_ttf_fonts.bitstream_vera_sans_bold (80)) number.set_dimension (300, 100) number.set_position (10, 20) the_scene.add_widget (number) set_scene (the_scene) launch -- Save settings settings.write_user_settings end end