public static GetMouseButton ( |
||
window | ||
button | MouseButton | |
return | bool |
public static MouseState GetMouseState(GlfwWindowPtr window) { MouseState result = new MouseState(); result.LeftButton = Glfw.GetMouseButton(window, MouseButton.LeftButton); result.MiddleButton = Glfw.GetMouseButton(window, MouseButton.MiddleButton); result.RightButton = Glfw.GetMouseButton(window, MouseButton.RightButton); double x, y; Glfw.GetCursorPos(window, out x, out y); result.X = x; result.Y = y; return(result); }
public static MouseState GetMouseState() { MouseState result = new MouseState(); result.LeftButton = Glfw.GetMouseButton(MouseButton.LeftButton); result.MiddleButton = Glfw.GetMouseButton(MouseButton.MiddleButton); result.RightButton = Glfw.GetMouseButton(MouseButton.RightButton); result.ScrollWheel = Glfw.GetMouseWheel(); int x, y; Glfw.GetMousePos(out x, out y); result.X = x; result.Y = y; return(result); }