KeyFilterSdlConfigMappings()
 {
     config = Config.GetInstance();
     KeyFilterSdlKeyCache keycache = KeyFilterSdlKeyCache.GetInstance();
     keycache.KeyDown += new SdlDotNet.KeyboardEventHandler(keycache_KeyDown);
     keycache.KeyUp += new SdlDotNet.KeyboardEventHandler(keycache_KeyUp);
     MouseFilterSdlMouseCache.GetInstance().MouseDown += new SdlDotNet.MouseButtonEventHandler(KeyFilterSdlConfigMappings_MouseDown);
     MouseFilterSdlMouseCache.GetInstance().MouseUp += new SdlDotNet.MouseButtonEventHandler(KeyFilterSdlConfigMappings_MouseUp);
 }
        public Camera()
        {
            RendererFactory.GetInstance().PreDrawEvent += new PreDrawCallback(renderer_PreDrawEvent);
            IMouseFilterMouseCache mousefiltermousecache = MouseFilterMouseCacheFactory.GetInstance();
            mousemove = MouseMoveConfigMappings.GetInstance();
            config = Config.GetInstance();

            KeyFilterConfigMappingsFactory.GetInstance().RegisterCommand(OverheadOTATranslateConfigName, new KeyCommandHandler(CameraModeOverheadTAHandlerTranslate));
            KeyFilterConfigMappingsFactory.GetInstance().RegisterCommand(OverheadOTAOrbitConfigName, new KeyCommandHandler(CameraModeOverheadTAHandlerOrbit));
            KeyFilterConfigMappingsFactory.GetInstance().RegisterCommand(OverheadOTAZoomConfigName, new KeyCommandHandler(CameraModeOverheadTAHandlerZoom));

            KeyFilterConfigMappingsFactory.GetInstance().RegisterCommand( "toggleviewpoint", new KeyCommandHandler( ToggleViewpointHandler ) );

            mousefiltermousecache.MouseMove += new MouseMoveHandler(mousefiltermousecache_MouseMove);
            UpdateRoamingCameraRotAndPosFromOverheadOTA();
        }
Beispiel #3
0
        public Camera()
        {
            RendererFactory.GetInstance().PreDrawEvent += new PreDrawCallback(renderer_PreDrawEvent);
            IMouseFilterMouseCache mousefiltermousecache = MouseFilterMouseCacheFactory.GetInstance();
            mousemove = MouseMoveConfigMappings.GetInstance();
            config = Config.GetInstance();

            KeyFilterConfigMappingsFactory.GetInstance().RegisterCommand(OverheadOTAConfigName, new KeyCommandHandler(CameraModeOverheadTAHandler));
            KeyFilterConfigMappingsFactory.GetInstance().RegisterCommand(OverheadOTAOrbitConfigName, new KeyCommandHandler(CameraModeOverheadTAHandlerOrbit));

            /*
            KeyFilterComboKeys.GetInstance().RegisterCombo(
                new string[]{"cameramode"}, null, new KeyComboHandler( CameraModeZoomHandler ) );
            KeyFilterComboKeys.GetInstance().RegisterCombo(
                new string[]{"cameramode","cameraorbit"}, null, new KeyComboHandler( CameraModeOrbitHandler ) );
            KeyFilterComboKeys.GetInstance().RegisterCombo(
                new string[]{"cameramode","camerapan"}, null, new KeyComboHandler( CamerModePanHandler ) );
             */

            KeyFilterConfigMappingsFactory.GetInstance().RegisterCommand( "toggleviewpoint", new KeyCommandHandler( ToggleViewpointHandler ) );
              
            //mousefiltermousecache.MouseDown += new MouseEventHandler( MouseDown );
            mousefiltermousecache.MouseMove += new MouseMoveHandler(mousefiltermousecache_MouseMove);
            //mousefiltermousecache.MouseUp += new MouseEventHandler( MouseUp );
            UpdateRoamingCameraRotAndPosFromOverheadOTA();
        }
 // protected constructor, to enforce singleton
 MouseMoveConfigMappings()
 {
     MouseMoveConfigsByName = Config.GetInstance().MouseMoveConfigsByName;
     mousefiltermousecache = MouseFilterMouseCacheFactory.GetInstance();
     config = Config.GetInstance();
 }
 MouseMoveConfigMappings() // protected constructor, to enforce singleton
 {
     MouseMoveConfigsByName = Config.GetInstance().MouseMoveConfigsByName;
     mousefiltermousecache = MouseFilterMouseCacheFactory.GetInstance();
     config = Config.GetInstance();
 }