void MouseButtonChange(glfw3.Window window, glfw3.MouseButton button, glfw3.InputState state, glfw3.KeyMods mods) { var mousePosition = GetMousePosition(window); var mousePositionNorm = Vector2.Create(mousePosition.X / Resolution.X, mousePosition.Y / Resolution.Y); MouseButtonChanged?.Invoke(this, new glfw3.MouseButtonEventArgs(mousePosition, mousePositionNorm, button, state, mods)); }
void WindowChange(glfw3.Window window, int width, int height) => PrepareFramebuffer();
Vector2 GetMousePosition(glfw3.Window window) { glfw3.GetCursorPos(window, out var x, out var y); return(Vector2.Create((float)x, (float)y)); }
void WindowClose(glfw3.Window window) => Closed?.Invoke(this, new EventArgs());