//TODO: Do we need this? OnEditorEvent //public static void OnEditorEvent(uint eventType, IntPtr eventPtr) //{ // foreach (IInputSink current in Editor.GetInputs()) // { // current.OnEditorEvent(eventType, eventPtr); // } //} public static void OnUpdate(float dt) { foreach (IInputSink current in Editor.GetInputs()) { current.Update(dt); } }
public static void OnMouseEvent(MouseEvent mouseEvent, System.Windows.Forms.MouseEventArgs mouseEventArgs) { foreach (IInputSink current in Editor.GetInputs()) { if (current.OnMouseEvent(mouseEvent, mouseEventArgs)) { break; } } }
public static void OnKeyEvent(KeyEvent keyEvent, System.Windows.Forms.KeyEventArgs keyEventArgs) { if (Editor.IsIngame) { if (keyEvent == KeyEvent.KeyUp && keyEventArgs.KeyCode == System.Windows.Forms.Keys.Escape) { // Editor.ExitIngame(); return; } } else { foreach (IInputSink current in Editor.GetInputs()) { if (current.OnKeyEvent(keyEvent, keyEventArgs)) { break; } } } }