Please make also event based input option for Mouse and Keyboard.
For example.
1.In Mouse and Keyboard, add EventDelegate like
Mouse.OnMouseEvent, Keyboard.OnKeyEvent
2.We then just do
Mouse.OnMouseEvent+=new MouseEventDelegate(game.OnMouseEvent);
3. OnMouseEvent should look like
OnMouseEvent(object sender,MouseState state,MouseEventArg args)
{
//MouseEventArg tells us what button was pressed,released, wheel moved or
//just x,y change
}
Thanks drEKO

What about buffered input?
Venkatroyal
, who doesn't need this. I just need function to get buffered input of mouse,keyboard...
which is nothing new to old DirectX (DirectInput).Then, I can do everything, such as event based input... Similar thing is InputManager from someone on the forum, but buffered based input in DirectInput was/is better..
Mikael Håkansson
RainerK
BBesser
Sandy Place
Well, if you are experienced - write your own, it wouldn't be hard!
Perhaps you could write a component to do that I would rather Microsoft supply us with the raw access to the machine, and we all build upon that in the way that suits us individually, even if that is just borrowing someone elses component.
Andy.
PS: Anyhow, this is the wrong place to be asking for enhancements. Look here.
Sam_res03
Here's a first pass. It wound up far more complicated than I initially expected (and I haven't even looked at the keyboard stuff yet). It's also my first attempt at anything in C#, so I imagine there are better ways to do some of this stuff. I'd love to get some feedback, or better yet, take it, clean it up, and post a better version. I do wish Microsoft would set up a better distribution system.
http://seattle.servegame.org/EventSystem.cs
Drop it in your game's designer mode pane, then set the following properties (I haven't figured out how to make the comments show up in the properties window yet):
I was hoping there was cool support for hooking up events via the properties pane, but I guess that's asking for too much. Instead, you'll have to hook up events in code as follows:
private void OnAButtonOn(object sender, EventArgs e){ ... }
eventSystem.controllers[0].AButtonOn +=
new EventHandler(OnAButtonOn);NateF
Is it just me, or would that flood the heap with garbage every time the mouse is moved Anyhow, I think this is confusing the event driven programming model from WinForms with the loop driven model that games use.
drEKO, it might help you along if you understand what a game loop is and how it relates to input, game state update and rendering.
Andy.