Пример #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
        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
		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, "" );
		}