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); }
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, "" ); }
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; }
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; }
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, "" ); }