diff --git a/window.go b/window.go index 9f6d7d9..bfb10bd 100644 --- a/window.go +++ b/window.go @@ -48,7 +48,7 @@ func (win *RayGuiWindow) Resize(x, y int) { } func (win *RayGuiWindow) DidStartMoveDrag() bool { - if win.IsTouchingRegion(rl.GetMousePosition(), rl.NewRectangle(0, -20, float32(win.Size.X), 20)) { + if win.IsTouchingRegion(rl.GetMousePosition(), rl.NewRectangle(0, -win.GetBorderRect().Height, float32(win.Size.X), win.GetBorderRect().Height)) { if rl.IsMouseButtonPressed(rl.MouseButtonLeft) { return true }