public InputManager(IntPtr handle) { m_WndProc = new WndProc(handle); m_WndProc.MouseWheel += onMouseWheel; m_WndProc.MouseMove += onMouseMove; m_WndProc.MouseUp += onMouseUp; m_WndProc.MouseDown += onMouseDown; m_WndProc.KeyDown += onKeyDown; m_WndProc.KeyUp += onKeyUp; m_WndProc.KeyChar += onKeyChar; }
public InputService(IntPtr handle) { m_WndProc = new WndProc(handle); m_WndProc.MouseWheel += AddEvent; m_WndProc.MouseMove += OnMouseMove; m_WndProc.MouseUp += OnMouseUp; m_WndProc.MouseDown += OnMouseDown; m_WndProc.KeyDown += OnKeyDown; m_WndProc.KeyUp += OnKeyUp; m_WndProc.KeyChar += OnKeyChar; }
public void Dispose() { m_WndProc.MouseWheel -= onMouseWheel; m_WndProc.MouseMove -= onMouseMove; m_WndProc.MouseUp -= onMouseUp; m_WndProc.MouseDown -= onMouseDown; m_WndProc.KeyDown -= onKeyDown; m_WndProc.KeyUp -= onKeyUp; m_WndProc.KeyChar -= onKeyChar; m_WndProc.Dispose(); m_WndProc = null; }