stride3d / stride3d/stride

UI Slider with a non-zero minimum value and Snap To Tick checked incorrectly subtracts the minimum value from any entered value

Open
#3,108 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
C#
Stars
7.8k
Forks
1.2k
Avg merge
2d 17h
Merged PRs (30d)
49

Description

Release Type: GitHub

Version: master

Platform(s): Windows, but should be all

Describe the bug
A clear and concise description of what the bug is.

To Reproduce
Steps to reproduce the behavior:

  1. Add a slider to a UI Page
  2. Set a minimum value above 0, a maximum value, a step of 1, and a tick frequency of Max - Min. e.g., Min of 5, Max of 40, Step of 1, Tick Frequency of 35.
  3. Check Snap to Ticks
  4. Set a value and note that it is always the value you entered minus the minimum value, even if this ends up being below the minimum.

Expected behavior
If I enter a value that is between min/max, it should remain that value, or if it not possible (e.g. 5.2 in the above scenario) it should snap the nearest viable tick, or in this case, 5.

Screenshots
Image

Log and callstacks
N/A

Additional context
N/A

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the issue with a UI Page slider using a non-zero minimum, a maximum, step 1, tick frequency Max - Min, and Snap to Ticks enabled. Trace the slider's value and tick-snapping behavior, then verify that entered values stay within the minimum and maximum and snap to the nearest valid tick.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
frontend, game-dev
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
58/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.