編輯

共用方式為


StepSlider Class

Definition

A slider with a fixed number of step values that can be moved by grabbing / pinching a slider thumb Number of steps defaults to 0, if number isn't set then slider behaves just like a regular PinchSlider

public ref class StepSlider : Microsoft::MixedReality::Toolkit::UI::PinchSlider, Microsoft::MixedReality::Toolkit::Input::IMixedRealityPointerHandler, UnityEngine::EventSystems::IEventSystemHandler
[UnityEngine.AddComponentMenu("MRTK/SDK/Experimental/StepSlider")]
public class StepSlider : Microsoft.MixedReality.Toolkit.UI.PinchSlider, Microsoft.MixedReality.Toolkit.Input.IMixedRealityPointerHandler, UnityEngine.EventSystems.IEventSystemHandler
[<UnityEngine.AddComponentMenu("MRTK/SDK/Experimental/StepSlider")>]
type StepSlider = class
    inherit PinchSlider
    interface IMixedRealityPointerHandler
    interface IEventSystemHandler
Public Class StepSlider
Inherits PinchSlider
Implements IEventSystemHandler, IMixedRealityPointerHandler
Inheritance
UnityEngine.MonoBehaviour
StepSlider
Attributes
UnityEngine.AddComponentMenuAttribute
Implements
IMixedRealityPointerHandler UnityEngine.EventSystems.IEventSystemHandler

Constructors

StepSlider()

Fields

OnHoverEntered (Inherited from PinchSlider)
OnHoverExited (Inherited from PinchSlider)
OnInteractionEnded (Inherited from PinchSlider)
OnInteractionStarted (Inherited from PinchSlider)
OnValueUpdated (Inherited from PinchSlider)

Properties

ActivePointer

Interface for handling pointer being used in UX interaction.

(Inherited from PinchSlider)
CurrentSliderAxis

Property accessor of sliderAxis. The axis the slider moves along.

(Inherited from PinchSlider)
IsTouchable

Property accessor of isTouchable. Determines whether or not this slider is controllable via touch events

(Inherited from PinchSlider)
SliderEndDistance (Inherited from PinchSlider)
SliderEndPosition

Gets the end position of the slider, in world space, or zero if invalid. Sets the end position of the slider, in world space, projected to the slider's axis.

(Inherited from PinchSlider)
SliderStartDistance (Inherited from PinchSlider)
SliderStartPosition

Gets the start position of the slider, in world space, or zero if invalid. Sets the start position of the slider, in world space, projected to the slider's axis.

(Inherited from PinchSlider)
SliderStepDivisions

Property accessor of sliderStepDivisions, it holds the number of subdivisions the slider is split into.

SliderTrackDirection

Returns the vector from the slider start to end positions

(Inherited from PinchSlider)
SliderValue (Inherited from PinchSlider)
SnapToPosition

Property accessor of snapToPosition. Determines whether or not this slider snaps to the designated position on the slider

(Inherited from PinchSlider)
StartPointerPosition

Starting position of mixed reality pointer in world space Used to track pointer movement

(Inherited from PinchSlider)
StartSliderValue

Float value that holds the starting value of the slider.

(Inherited from PinchSlider)
ThumbCollider

Property accessor of thumbCollider. Used to control the slider on the track when snapToPosition is false

(Inherited from PinchSlider)
ThumbRoot (Inherited from PinchSlider)
ThumbVisuals

Property accessor of thumbVisuals, it contains the desired tick marks. This will get rotated to match the slider axis.

(Inherited from PinchSlider)
TickMarks

Property accessor of tickMarks, it contains the desired tick Marks. This will get rotated to match the slider axis.

(Inherited from PinchSlider)
TouchCollider

Property accessor of touchCollider. Used to determine the position we snap the slider do when snapToPosition is true

(Inherited from PinchSlider)
TrackVisuals

Property accessor of trackVisuals, it contains the desired track Visuals. This will get rotated to match the slider axis.

(Inherited from PinchSlider)
UseSliderStepDivisions

Property accessor of useSliderStepDivisions, it determines whether the slider steps according to subdivisions

(Inherited from PinchSlider)

Methods

OnFocusEnter(FocusEventData) (Inherited from PinchSlider)
OnFocusExit(FocusEventData) (Inherited from PinchSlider)
OnPointerClicked(MixedRealityPointerEventData) (Inherited from PinchSlider)
OnPointerDown(MixedRealityPointerEventData) (Inherited from PinchSlider)
OnPointerDragged(MixedRealityPointerEventData)

Called every frame a pointer is down. Can be used to implement drag-like behaviors. Uses member sliderStepVal to move up and down the steps on the slider.

OnPointerUp(MixedRealityPointerEventData) (Inherited from PinchSlider)
OnTouchCompleted(HandTrackingInputEventData) (Inherited from PinchSlider)
OnTouchStarted(HandTrackingInputEventData) (Inherited from PinchSlider)
OnTouchUpdated(HandTrackingInputEventData)

b
When the collider is touched, use the touch point to Calculate the Slider value

(Inherited from PinchSlider)
Start()

Applies to