Skip to content

Commit a9f7f45

Browse files
author
Julia Schwarz
committed
Fix up documentation and comments.
1 parent ddcd292 commit a9f7f45

File tree

3 files changed

+3
-8
lines changed

3 files changed

+3
-8
lines changed

Assets/MixedRealityToolkit.SDK/Features/UX/Scripts/Sliders/PinchSlider.cs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
namespace Microsoft.MixedReality.Toolkit.UI
1313
{
1414
/// <summary>
15-
/// Slider with a thumb (a GameObject), endpoints are defined by two GameObjects
15+
/// A slider that can be moved by grabbing / pinching a slider thumb
1616
/// </summary>
1717
public class PinchSlider : MonoBehaviour, IMixedRealityPointerHandler, IMixedRealityFocusHandler
1818
{
@@ -42,9 +42,6 @@ public float SliderValue
4242
[SerializeField]
4343
private SliderAxis sliderAxis = SliderAxis.XAxis;
4444
[Serializable]
45-
/// <summary>
46-
/// The axis the slider moves along
47-
/// </summary>
4845
private enum SliderAxis
4946
{
5047
XAxis = 0,
@@ -168,7 +165,6 @@ private Vector3 GetSliderAxis()
168165
private void UpdateUI()
169166
{
170167
var newSliderPos = SliderStartPosition + sliderThumbOffset + SliderTrackDirection * sliderValue;
171-
172168
thumbRoot.transform.position = newSliderPos;
173169
}
174170

Assets/MixedRealityToolkit.SDK/Features/UX/Scripts/Sliders/SliderSounds.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ public class SliderSounds : MonoBehaviour
5858
private AudioSource grabReleaseAudioSource = null;
5959
private AudioSource passNotchAudioSource = null;
6060
#endregion
61+
6162
private void Start()
6263
{
6364
if (grabReleaseAudioSource == null)

Documentation/README_Sliders.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,6 @@ You can directly move the starting and end points of the slider by moving the ha
3434

3535
You can also specify the axis (in local space) of the slider via the _Slider Axis_ field
3636

37-
If you cannot use the handles, you can instead specify the start and end points of the slider via the _Slider Start Position_ and _Slider End Position_ fields.
38-
39-
> Note that the slider start and end position fields will get automatically projected to the slider axis.
37+
If you cannot use the handles, you can instead specify the start and end points of the slider via the _Slider Start Distance_ and _Slider End Distance_ fields. These specify start / end position of slider as a distance from the slider's center, in local coordinates. This means that once you set the slider start and end distaces as you want them, you can scale the slider to be smaller or larger without needing to update the start and end distances.
4038

4139

0 commit comments

Comments
 (0)