Proposed changes mentioned in issue #27
internals
Benjamin Odom 7 years ago committed by GitHub
parent 6b2c655922
commit 1a28d774c1
  1. 2
      src/ImGui.NET.SampleProgram/SampleWindow.cs

@ -319,7 +319,7 @@ namespace ImGuiNET
MouseState cursorState = Mouse.GetCursorState();
MouseState mouseState = Mouse.GetState();
if (_nativeWindow.Bounds.Contains(cursorState.X, cursorState.Y))
if (_nativeWindow.Focused)
{
Point windowPoint = _nativeWindow.PointToClient(new Point(cursorState.X, cursorState.Y));
io.MousePosition = new System.Numerics.Vector2(windowPoint.X / io.DisplayFramebufferScale.X, windowPoint.Y / io.DisplayFramebufferScale.Y);

Loading…
Cancel
Save