Fixed InvalidCastException in keyboard logging delegates.

This commit is contained in:
the_fiddler 2009-11-16 10:09:11 +00:00
parent 1bc11bb807
commit c84e3ef0da

View file

@ -195,16 +195,16 @@ namespace Examples.Tests
#region Keyboards
delegate void ControlLogKeyboard(GameWindow input_window, InputLogger control, OpenTK.Input.KeyboardDevice sender, Key key);
delegate void ControlLogKeyboard(GameWindow input_window, InputLogger control, OpenTK.Input.KeyboardDevice sender, KeyboardKeyEventArgs e);
ControlLogKeyboard ControlLogKeyboardDown =
delegate(GameWindow input_window, InputLogger control, KeyboardDevice sender, Key key)
delegate(GameWindow input_window, InputLogger control, KeyboardDevice sender, KeyboardKeyEventArgs e)
{
control.keyboardListBoxes[sender.DeviceID].Items.Add(key);
control.keyboardListBoxes[sender.DeviceID].Items.Add(e.Key);
};
ControlLogKeyboard ControlLogKeyboardUp =
delegate(GameWindow input_window, InputLogger control, KeyboardDevice sender, Key key)
delegate(GameWindow input_window, InputLogger control, KeyboardDevice sender, KeyboardKeyEventArgs e)
{
control.keyboardListBoxes[sender.DeviceID].Items.Remove(key);
control.keyboardListBoxes[sender.DeviceID].Items.Remove(e.Key);
};
#endregion