示例#1
0
        protected InputReader _setupInput()
        {
            InputReader ir = null;

            SharpInputSystem.ParameterList pl = new SharpInputSystem.ParameterList();
            pl.Add(new SharpInputSystem.Parameter("WINDOW", this.Handle));

            //Default mode is foreground exclusive..but, we want to show mouse - so nonexclusive
            pl.Add(new SharpInputSystem.Parameter("w32_mouse", "CLF_BACKGROUND"));
            pl.Add(new SharpInputSystem.Parameter("w32_mouse", "CLF_NONEXCLUSIVE"));

            //This never returns null.. it will raise an exception on errors
            ir       = SharpInputSystem.InputManager.CreateInputSystem(pl);
            mouse    = ir.CreateInputObject <SharpInputSystem.Mouse>(true, "");
            keyboard = ir.CreateInputObject <SharpInputSystem.Keyboard>(true, "");
            return(ir);
        }
示例#2
0
文件: Game.cs 项目: bostich83/axiom
        public virtual void CreateInput()
        {
            var pl = new SharpInputSystem.ParameterList();

            pl.Add(new SharpInputSystem.Parameter("WINDOW", this.Window["WINDOW"]));

            if (this.RenderSystem.Name.Contains("DirectX"))
            {
                //Default mode is foreground exclusive..but, we want to show mouse - so nonexclusive
                pl.Add(new SharpInputSystem.Parameter("w32_mouse", "CLF_BACKGROUND"));
                pl.Add(new SharpInputSystem.Parameter("w32_mouse", "CLF_NONEXCLUSIVE"));
            }

            //This never returns null.. it will raise an exception on errors
            this.InputManager = SharpInputSystem.InputManager.CreateInputSystem(pl);
            //mouse = InputManager.CreateInputObject<SharpInputSystem.Mouse>( true, "" );
            //keyboard = InputManager.CreateInputObject<SharpInputSystem.Keyboard>( true, "" );
        }
示例#3
0
        protected InputReader _setupInput()
        {
            InputReader ir = null;
            SharpInputSystem.ParameterList pl = new SharpInputSystem.ParameterList();
            pl.Add( new SharpInputSystem.Parameter( "WINDOW", this.Handle ) );

            //Default mode is foreground exclusive..but, we want to show mouse - so nonexclusive
            pl.Add( new SharpInputSystem.Parameter( "w32_mouse", "CLF_BACKGROUND" ) );
            pl.Add( new SharpInputSystem.Parameter( "w32_mouse", "CLF_NONEXCLUSIVE" ) );

            //This never returns null.. it will raise an exception on errors
            ir = SharpInputSystem.InputManager.CreateInputSystem( pl );
            mouse = ir.CreateInputObject<SharpInputSystem.Mouse>( true, "" );
            keyboard = ir.CreateInputObject<SharpInputSystem.Keyboard>( true, "" );
            return ir;
        }
示例#4
0
		protected InputReader _setupInput()
		{
			InputReader ir = null;
#if  !( XBOX || XBOX360 ) && !( SIS )
			// retrieve and initialize the input system
			ir = PlatformManager.Instance.CreateInputReader();
			ir.Initialize( window, true, true, false, false );
#endif

#if ( SIS )
			SharpInputSystem.ParameterList pl = new SharpInputSystem.ParameterList();
			pl.Add( new SharpInputSystem.Parameter( "WINDOW", this.window.Handle ) );

			//Default mode is foreground exclusive..but, we want to show mouse - so nonexclusive
			pl.Add( new SharpInputSystem.Parameter( "w32_mouse", "CLF_BACKGROUND" ) );
			pl.Add( new SharpInputSystem.Parameter( "w32_mouse", "CLF_NONEXCLUSIVE" ) );

			//This never returns null.. it will raise an exception on errors
			ir = SharpInputSystem.InputManager.CreateInputSystem( pl );
			mouse = ir.CreateInputObject<SharpInputSystem.Mouse>( true, "" );
			keyboard = ir.CreateInputObject<SharpInputSystem.Keyboard>( true, "" );
#endif
			return ir;
		}
示例#5
0
		public virtual void CreateInput()
		{
			var pl = new SharpInputSystem.ParameterList();
			pl.Add( new SharpInputSystem.Parameter( "WINDOW", this.Window[ "WINDOW" ] ) );

			if ( this.RenderSystem.Name.Contains( "DirectX" ) )
			{
				//Default mode is foreground exclusive..but, we want to show mouse - so nonexclusive
				pl.Add( new SharpInputSystem.Parameter( "w32_mouse", "CLF_BACKGROUND" ) );
				pl.Add( new SharpInputSystem.Parameter( "w32_mouse", "CLF_NONEXCLUSIVE" ) );
			}

			//This never returns null.. it will raise an exception on errors
			this.InputManager = SharpInputSystem.InputManager.CreateInputSystem( pl );
			//mouse = InputManager.CreateInputObject<SharpInputSystem.Mouse>( true, "" );
			//keyboard = InputManager.CreateInputObject<SharpInputSystem.Keyboard>( true, "" );
		}