private void DoSlider(IGUIState guiState)
        {
            Vector3 newPosition;
            var     changed = guiState.Slider(ID, m_SliderData, out newPosition);

            if (changed)
            {
                m_SliderData.position = newPosition;

                if (m_Start)
                {
                    m_Start = false;

                    if (onSliderBegin != null)
                    {
                        onSliderBegin(guiState, hoveredControl, newPosition);
                    }
                }

                if (onSliderChanged != null)
                {
                    onSliderChanged(guiState, hoveredControl, newPosition);
                }
            }
        }
Exemple #2
0
        protected override void OnPerform(IGUIState guiState)
        {
            Vector3 newPosition;
            var     changed = guiState.Slider(ID, m_SliderData, out newPosition);

            if (changed)
            {
                m_SliderData.position = newPosition;

                if (onSliderChanged != null)
                {
                    onSliderChanged(guiState, hoveredControl, newPosition);
                }
            }
        }