////////////////////////////////////////////////////////////////////////////////////////////////
		/*--------------------------------------------------------------------------------------------*/
		public virtual void Build(ArcState pArcState, SegmentState pSegState,
														float pArcAngle, SegmentSettings pSettings) {
			vArcState = pArcState;
			vSegState = pSegState;
			vSettings = pSettings;

			////

			vSlice = new UiSlice(gameObject);
			vSlice.Resize(pArcAngle);

			////

			var labelObj = new GameObject("Label");
			labelObj.transform.SetParent(gameObject.transform, false);
			labelObj.transform.localPosition = new Vector3(0, 0, 1);
			labelObj.transform.localScale = new Vector3(1, 1, (vArcState.IsLeft ? 1 : -1));
			
			vLabel = labelObj.AddComponent<UiLabel>();
			vLabel.IsLeft = vArcState.IsLeft;
		}
        ////////////////////////////////////////////////////////////////////////////////////////////////
        /*--------------------------------------------------------------------------------------------*/
        public virtual void Build(ArcState pArcState, SegmentState pSegState,
                                  float pArcAngle, SegmentSettings pSettings)
        {
            vArcState = pArcState;
            vSegState = pSegState;
            vSettings = pSettings;

            ////

            vSlice = new UiSlice(gameObject);
            vSlice.Resize(pArcAngle);

            ////

            var labelObj = new GameObject("Label");

            labelObj.transform.SetParent(gameObject.transform, false);
            labelObj.transform.localPosition = new Vector3(0, 0, 1);
            labelObj.transform.localScale    = new Vector3(1, 1, (vArcState.IsLeft ? 1 : -1));

            vLabel        = labelObj.AddComponent <UiLabel>();
            vLabel.IsLeft = vArcState.IsLeft;
        }
		////////////////////////////////////////////////////////////////////////////////////////////////
		/*--------------------------------------------------------------------------------------------*/
		public virtual void Build(ArcState pArcState, SegmentState pSegState,
														float pArcAngle, SegmentSettings pSettings) {
			vArcState = pArcState;
			vSegState = pSegState;
			vAngle0 = -pArcAngle/2f+UiSlice.AngleInset;
			vAngle1 = pArcAngle/2f-UiSlice.AngleInset;
			vSettings = pSettings;
			vNavSlider = (NavItemSlider)vSegState.NavItem;

			const float pi = (float)Math.PI;
			const float radInner = 1.04f;
			const float radOuter = 1.46f;

			vGrabArcHalf = pi/80f;
			vSlideDegree0 = (vAngle0+vGrabArcHalf)/pi*180;
			vSlideDegrees = (vAngle1-vAngle0-vGrabArcHalf*2)/pi*180;

			////

			vHiddenSlice = new UiSlice(gameObject, true);
			vHiddenSlice.Resize(pArcAngle);
			vHiddenSlice.UpdateBackground(Color.clear);

			vTrackA = new UiSlice(gameObject, true, "TrackA", radInner, radOuter);
			vTrackB = new UiSlice(gameObject, true, "TrackB", radInner, radOuter);
			vFillA = new UiSlice(gameObject, true, "FillA", radInner, radOuter);
			vFillB = new UiSlice(gameObject, true, "FillB", radInner, radOuter);

			////

			vTickMat = new Material(Shader.Find("Unlit/AlphaSelfIllum"));
			vTickMat.renderQueue -= 400;
			vTickMat.color = Color.clear;

			if ( vNavSlider.Ticks > 1 ) {
				Vector3 quadScale = new Vector3(UiSlice.AngleInset*2, 0.36f, 0.1f);
				float percPerTick = 1/(float)(vNavSlider.Ticks-1);

				vTicks = new GameObject[vNavSlider.Ticks];

				for ( int i = 0 ; i < vNavSlider.Ticks ; ++i ) {
					var tick = new GameObject("Tick"+i);
					tick.transform.SetParent(gameObject.transform, false);
					tick.transform.localRotation = Quaternion.AngleAxis(
						vSlideDegree0+vSlideDegrees*i*percPerTick, Vector3.up);
					vTicks[i] = tick;

					var quad = GameObject.CreatePrimitive(PrimitiveType.Quad);
					quad.renderer.sharedMaterial = vTickMat;
					quad.transform.SetParent(tick.transform, false);
					quad.transform.localPosition = new Vector3(0, 0, 1.25f);
					quad.transform.localRotation = 
						Quaternion.FromToRotation(Vector3.back, Vector3.down);
					quad.transform.localScale = quadScale;
				}
			}

			////

			vGrabHold = new GameObject("GrabHold");
			vGrabHold.transform.SetParent(gameObject.transform, false);

			var grabObj = new GameObject("Grab");
			grabObj.transform.SetParent(vGrabHold.transform, false);

			vGrab = grabObj.AddComponent<UiSliderGrabRenderer>();
			vGrab.Build(vArcState, vSegState, vGrabArcHalf*2, pSettings);

			////

			vHoverHold = new GameObject("HoverHold");
			vHoverHold.transform.SetParent(gameObject.transform, false);

			var hoverObj = new GameObject("Hover");
			hoverObj.transform.SetParent(vHoverHold.transform, false);

			vHover = new UiSlice(hoverObj, false, "Hover");
		}
        ////////////////////////////////////////////////////////////////////////////////////////////////
        /*--------------------------------------------------------------------------------------------*/
        public virtual void Build(ArcState pArcState, SegmentState pSegState,
                                  float pArcAngle, SegmentSettings pSettings)
        {
            vArcState  = pArcState;
            vSegState  = pSegState;
            vAngle0    = -pArcAngle / 2f + UiSlice.AngleInset;
            vAngle1    = pArcAngle / 2f - UiSlice.AngleInset;
            vSettings  = pSettings;
            vNavSlider = (NavItemSlider)vSegState.NavItem;

            const float pi       = (float)Math.PI;
            const float radInner = 1.04f;
            const float radOuter = 1.46f;

            vGrabArcHalf  = pi / 80f;
            vSlideDegree0 = (vAngle0 + vGrabArcHalf) / pi * 180;
            vSlideDegrees = (vAngle1 - vAngle0 - vGrabArcHalf * 2) / pi * 180;

            ////

            vHiddenSlice = new UiSlice(gameObject, true);
            vHiddenSlice.Resize(pArcAngle);
            vHiddenSlice.UpdateBackground(Color.clear);

            vTrackA = new UiSlice(gameObject, true, "TrackA", radInner, radOuter);
            vTrackB = new UiSlice(gameObject, true, "TrackB", radInner, radOuter);
            vFillA  = new UiSlice(gameObject, true, "FillA", radInner, radOuter);
            vFillB  = new UiSlice(gameObject, true, "FillB", radInner, radOuter);

            ////

            vTickMat              = new Material(Shader.Find("Unlit/AlphaSelfIllum"));
            vTickMat.renderQueue -= 400;
            vTickMat.color        = Color.clear;

            if (vNavSlider.Ticks > 1)
            {
                Vector3 quadScale   = new Vector3(UiSlice.AngleInset * 2, 0.36f, 0.1f);
                float   percPerTick = 1 / (float)(vNavSlider.Ticks - 1);

                vTicks = new GameObject[vNavSlider.Ticks];

                for (int i = 0; i < vNavSlider.Ticks; ++i)
                {
                    var tick = new GameObject("Tick" + i);
                    tick.transform.SetParent(gameObject.transform, false);
                    tick.transform.localRotation = Quaternion.AngleAxis(
                        vSlideDegree0 + vSlideDegrees * i * percPerTick, Vector3.up);
                    vTicks[i] = tick;

                    var quad = GameObject.CreatePrimitive(PrimitiveType.Quad);
                    quad.renderer.sharedMaterial = vTickMat;
                    quad.transform.SetParent(tick.transform, false);
                    quad.transform.localPosition = new Vector3(0, 0, 1.25f);
                    quad.transform.localRotation =
                        Quaternion.FromToRotation(Vector3.back, Vector3.down);
                    quad.transform.localScale = quadScale;
                }
            }

            ////

            vGrabHold = new GameObject("GrabHold");
            vGrabHold.transform.SetParent(gameObject.transform, false);

            var grabObj = new GameObject("Grab");

            grabObj.transform.SetParent(vGrabHold.transform, false);

            vGrab = grabObj.AddComponent <UiSliderGrabRenderer>();
            vGrab.Build(vArcState, vSegState, vGrabArcHalf * 2, pSettings);

            ////

            vHoverHold = new GameObject("HoverHold");
            vHoverHold.transform.SetParent(gameObject.transform, false);

            var hoverObj = new GameObject("Hover");

            hoverObj.transform.SetParent(vHoverHold.transform, false);

            vHover = new UiSlice(hoverObj, false, "Hover");
        }