From 4f38a87eedf9e2b14a4075b53dbefca99ed8671c Mon Sep 17 00:00:00 2001 From: Chandler Cox Date: Sat, 19 Nov 2022 16:33:09 -0600 Subject: [PATCH] Changed using screen coords to using window points. --- Source/Editor/GUI/Input/ValueBox.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Source/Editor/GUI/Input/ValueBox.cs b/Source/Editor/GUI/Input/ValueBox.cs index 5038dab20..7f4fb51e0 100644 --- a/Source/Editor/GUI/Input/ValueBox.cs +++ b/Source/Editor/GUI/Input/ValueBox.cs @@ -248,7 +248,7 @@ namespace FlaxEditor.GUI.Input // Hide cursor and cache location Cursor = CursorType.Hidden; - _mouseClickedPosition = location; + _mouseClickedPosition = PointToWindow(location); _cursorChanged = true; SlidingStart?.Invoke(); @@ -293,7 +293,7 @@ namespace FlaxEditor.GUI.Input if (button == MouseButton.Left && _isSliding) { // End sliding and return mouse to original location - Root.MousePosition = ScreenPos + _mouseClickedPosition; + RootWindow.MousePosition = _mouseClickedPosition; EndSliding(); return true; }