indexing description: "[ There is one singleton object of class GUI representing the graphical user interface. This class is part of the XAE Extended Adventure Engine Project. ]" author: "Ralph Wiedemeier, ralphw@student.ethz.ch" date: "$Date$" revision: "$Revision$" class GUI inherit GUI_SHARED export {NONE} all end create {GUI_SHARED} make feature -- Initialization make is -- Create gui instance do -- Do nothing end feature -- Access application: APPLICATION set_application (the_app: APPLICATION) is -- register application do application := the_app end screen: EM_VIDEO_SURFACE set_screen (the_screen: EM_VIDEO_SURFACE) is -- register display surface require screen_not_void: the_screen /= Void do screen := the_screen end engine: ENGINE_INTERFACE set_engine (the_engine: ENGINE_INTERFACE) is -- register game engine require engine_not_void: the_engine /= Void do engine := the_engine end parser: PARSER_INTERFACE set_parser (the_parser: PARSER_INTERFACE) is -- register xml parser require parser_not_void: the_parser /= Void do parser := the_parser end serializer: SERIALIZER set_serializer (the_serializer: SERIALIZER) is -- register serializer require serializer_not_void: the_serializer /= Void do serializer := the_serializer end feature -- Operations start is -- display first scene and start the event loop require screen_initialized: screen /= Void do -- Get first scene to be displayed from the game engine scene := create {GUI_DEFAULT_SCENE}.make_default_scene from scene.initialize_scene until scene = Void loop screen.enable_alpha_transparency scene.run (screen) scene.dispose_texture_memory scene := scene.next_scene end end feature {NONE} -- Implementation scene: GUI_SCENE -- The running scene end -- class GUI