Exemple #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);
        }
Exemple #2
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;
        }
Exemple #3
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;
		}