Пример #1
0
 internal void StartListening(IntPtr window)
 {
     GLFW.SetKeyCallback(window, TrackDelegate <GLFW.KeyFunc>(window, OnKeyCallback));
     GLFW.SetCharCallback(window, TrackDelegate <GLFW.CharFunc>(window, OnCharCallback));
     GLFW.SetMouseButtonCallback(window, TrackDelegate <GLFW.MouseButtonFunc>(window, OnMouseCallback));
     GLFW.SetScrollCallback(window, TrackDelegate <GLFW.ScrollFunc>(window, OnScrollCallback));
 }
Пример #2
0
        internal void StartListening(IntPtr window)
        {
            windows.Add(window);

            ignoreMouseUp[0] = Mouse.LeftDown;
            ignoreMouseUp[1] = Mouse.MiddleDown;
            ignoreMouseUp[2] = Mouse.RightDown;

            GLFW.SetKeyCallback(window, TrackDelegate <GLFW.KeyFunc>(window, OnKeyCallback));
            GLFW.SetCharCallback(window, TrackDelegate <GLFW.CharFunc>(window, OnCharCallback));
            GLFW.SetMouseButtonCallback(window, TrackDelegate <GLFW.MouseButtonFunc>(window, OnMouseCallback));
            GLFW.SetScrollCallback(window, TrackDelegate <GLFW.ScrollFunc>(window, OnScrollCallback));
        }