diff options
| author | Andrey Kleshchev <117672381+akleshchev@users.noreply.github.com> | 2026-04-21 23:00:55 +0300 |
|---|---|---|
| committer | Andrey Kleshchev <117672381+akleshchev@users.noreply.github.com> | 2026-04-22 01:31:18 +0300 |
| commit | 0cef18164bb0b4ed892f6e9e5fef31fc0f5dfb03 (patch) | |
| tree | 855ce218dd3c1e32a5f8911bd0f1994329764d91 /indra/llui/llxyvector.cpp | |
| parent | 638c7f7bea1a1d345980fa385a36201f5b6cc64e (diff) | |
#1355 Permit smaller values in cloud scroll rate
Diffstat (limited to 'indra/llui/llxyvector.cpp')
| -rw-r--r-- | indra/llui/llxyvector.cpp | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/indra/llui/llxyvector.cpp b/indra/llui/llxyvector.cpp index 1521823ce2..b3c38bf82d 100644 --- a/indra/llui/llxyvector.cpp +++ b/indra/llui/llxyvector.cpp @@ -211,7 +211,16 @@ void LLXYVector::draw() mGhostY = pointY; } - if (abs(mValueX) >= mIncrementX || abs(mValueY) >= mIncrementY) + S32 dx = abs(pointX - centerX); + S32 dy = abs(pointY - centerY); + bool draw_arrow = + (abs(mValueX) >= mIncrementX || abs(mValueY) >= mIncrementY) + && (dx >= 1 || dy >= 1); // At least 1 pixel displacement + + // Todo: Arrow doesn't display well with small values. + // Ex: (0.1, 0.05) will point to the right, as if it is (0.1, 0.0) + // as position will be offset by a single pixes on X, and 0 pixels on Y. + if (draw_arrow) { // draw the vector arrow drawArrow(centerX, centerY, pointX, pointY, mArrowColor); |
