UnityEngine.SliderHandler.Handle C# (CSharp) Method

Handle() public method

public Handle ( ) : float
return float
        public float Handle()
        {
            if ((this.slider != null) && (this.thumb != null))
            {
                switch (this.CurrentEventType())
                {
                    case EventType.MouseDown:
                        return this.OnMouseDown();

                    case EventType.MouseUp:
                        return this.OnMouseUp();

                    case EventType.MouseDrag:
                        return this.OnMouseDrag();

                    case EventType.Repaint:
                        return this.OnRepaint();
                }
            }
            return this.currentValue;
        }

Usage Example

コード例 #1
0
ファイル: GUI.cs プロジェクト: guozanhua/UnityDecompiled
		public static float Slider(Rect position, float value, float size, float start, float end, GUIStyle slider, GUIStyle thumb, bool horiz, int id)
		{
			GUIUtility.CheckOnGUI();
			SliderHandler sliderHandler = new SliderHandler(position, value, size, start, end, slider, thumb, horiz, id);
			return sliderHandler.Handle();
		}