Ejemplo n.º 1
0
 /**
  * <summary>Performs what should happen when the element is clicked on continuously.</summary>
  * <param name = "_menu">The element's parent Menu</param>
  * <param name = "_mouseState">The state of the mouse button</param>
  */
 public override void ProcessContinuousClick(AC.Menu _menu, MouseState _mouseState)
 {
     if (KickStarter.settingsManager.inputMethod == InputMethod.KeyboardOrController)
     {
         Change ();
     }
     else
     {
         Change (KickStarter.playerInput.GetMousePosition ().x - _menu.GetRect ().x);
     }
     if (sliderType == AC_SliderType.CustomScript)
     {
         MenuSystem.OnElementClick (_menu, this, 0, (int) _mouseState);
     }
 }
Ejemplo n.º 2
0
        /**
         * <summary>Performs what should happen when the element is clicked on.</summary>
         * <param name = "_menu">The element's parent Menu</param>
         * <param name = "_slot">Ignored by this subclass</param>
         * <param name = "_mouseState">The state of the mouse button</param>
         */
        public override void ProcessClick(AC.Menu _menu, int _slot, MouseState _mouseState)
        {
            if (KickStarter.stateHandler.gameState == GameState.Cutscene)
            {
                return;
            }

            if (uiSlider != null)
            {
                amount = uiSlider.value;
                UpdateValue ();
            }
            else
            {
                if (KickStarter.settingsManager.inputMethod == InputMethod.KeyboardOrController)
                {
                    Change ();
                }
                else
                {
                    Change (KickStarter.playerInput.GetMousePosition ().x - _menu.GetRect ().x);
                }
            }

            if (sliderType == AC_SliderType.CustomScript)
            {
                MenuSystem.OnElementClick (_menu, this, _slot, (int) _mouseState);
            }
        }