예제 #1
0
        /// <summary>
        /// Sets up SIS input.
        /// </summary>
        protected virtual void SetupInput()
        {
            var pl = new SIS.ParameterList();

            pl.Add(new SIS.Parameter("WINDOW", RenderWindow["WINDOW"]));
#if !(XBOX || XBOX360)
            if (!RenderWindow.GetType().Name.Contains("OpenTK"))
            {
                pl.Add(new SIS.Parameter("w32_mouse", "CLF_BACKGROUND"));
                pl.Add(new SIS.Parameter("w32_mouse", "CLF_NONEXCLUSIVE"));
            }
            else
            {
                pl.Add(new SIS.Parameter("w32_no_coop", string.Empty));
            }
#endif
#if !( WINDOWS_PHONE )
            this.InputManager = SIS.InputManager.CreateInputSystem(pl);
#else
            this.InputManager = SIS.InputManager.CreateInputSystem(typeof(SIS.Xna.XnaInputManagerFactory), pl);
#endif

            CreateInputDevices();             // create the specific input devices

            WindowResized(RenderWindow);      // do an initial adjustment of mouse area
        }
예제 #2
0
        /// <summary>
        /// Sets up SIS input.
        /// </summary>
        protected override void SetupInput()
        {
            SIS.ParameterList pl = new SIS.ParameterList();
            pl.Add(new SIS.Parameter("WINDOW", RenderWindow["WINDOW"]));
#if !(XBOX || XBOX360 || WINDOWS_PHONE)
            pl.Add(new SIS.Parameter("w32_mouse", "CLF_BACKGROUND"));
            pl.Add(new SIS.Parameter("w32_mouse", "CLF_NONEXCLUSIVE"));
#endif
            this.InputManager = SIS.InputManager.CreateInputSystem(typeof(SIS.Xna.XnaInputManagerFactory), pl);

            CreateInputDevices();                  // create the specific input devices

            this.WindowResized(RenderWindow);      // do an initial adjustment of mouse area
        }
예제 #3
0
		/// <summary>
		/// Sets up SIS input.
		/// </summary>
		protected override void SetupInput()
		{
			SIS.ParameterList pl = new SIS.ParameterList();
			pl.Add( new SIS.Parameter( "WINDOW", RenderWindow[ "WINDOW" ] ) );
#if !(XBOX || XBOX360 )
			pl.Add( new SIS.Parameter( "w32_mouse", "CLF_BACKGROUND" ) );
			pl.Add( new SIS.Parameter( "w32_mouse", "CLF_NONEXCLUSIVE" ) );
#endif
			this.InputManager = SIS.InputManager.CreateInputSystem( SIS.PlatformApi.Xna, pl );

			CreateInputDevices();      // create the specific input devices

			this.WindowResized( RenderWindow );    // do an initial adjustment of mouse area
		}
예제 #4
0
        /// <summary>
        /// Sets up SIS input.
        /// </summary>
        protected virtual void SetupInput(Type factoryType = null)
        {
            var pl = new SIS.ParameterList
            {
                new SIS.Parameter("WINDOW", RenderWindow["WINDOW"])
            };

#if !(XBOX || XBOX360)
            if (!RenderWindow.GetType().Name.Contains("OpenTK"))
            {
                pl.Add(new SIS.Parameter("w32_mouse", "CLF_BACKGROUND"));
                pl.Add(new SIS.Parameter("w32_mouse", "CLF_NONEXCLUSIVE"));
            }
            else
            {
                pl.Add(new SIS.Parameter("w32_no_coop", string.Empty));
            }
#endif
            if (factoryType != null && factoryType.IsAssignableFrom(typeof(SIS.IInputManagerFactory)))
            {
                this.InputManager = SIS.InputManager.CreateInputSystem(factoryType, pl);
            }
            else
            {
                switch (this.Root.RenderSystem.Name)
                {
                case "DirectX9":
                default:
                    this.InputManager = SIS.InputManager.CreateInputSystem(typeof(SIS.DirectX.DirectXInputManagerFactory), pl);
                    break;
                }
            }

            CreateInputDevices();        // create the specific input devices

            WindowResized(RenderWindow); // do an initial adjustment of mouse area
        }
예제 #5
0
		/// <summary>
		/// Sets up SIS input.
		/// </summary>
		protected virtual void SetupInput()
		{
			var pl = new SIS.ParameterList();
			pl.Add( new SIS.Parameter( "WINDOW", RenderWindow[ "WINDOW" ] ) );
#if !(XBOX || XBOX360 )
			if ( !RenderWindow.GetType().Name.Contains( "OpenTK" ) )
			{
				pl.Add( new SIS.Parameter( "w32_mouse", "CLF_BACKGROUND" ) );
				pl.Add( new SIS.Parameter( "w32_mouse", "CLF_NONEXCLUSIVE" ) );
			}
			else
				pl.Add( new SIS.Parameter( "w32_no_coop", string.Empty )  );
#endif
#if !( WINDOWS_PHONE )
			this.InputManager = SIS.InputManager.CreateInputSystem( pl );
#else
			this.InputManager = SIS.InputManager.CreateInputSystem( typeof(SIS.Xna.XnaInputManagerFactory), pl );
#endif

			CreateInputDevices(); // create the specific input devices

			WindowResized( RenderWindow ); // do an initial adjustment of mouse area
		}