Example #1
0
 /// <summary>
 /// Used to set the sensitivity of the Mouse.
 /// </summary>
 /// <param name="value">The value to set the sensitivity to.</param>
 public void SetMouseSensitivity(float value)
 {
     if (sensitivity != value)
     {
         sensitivity = EonMathsHelper.Clamp(sensitivity, MinSensitivity, MaxSensitivity);
     }
 }
Example #2
0
 public void ChangeControllerSensitivity(float amount)
 {
     if (controllerSensitivity != amount)
     {
         controllerSensitivity = EonMathsHelper.Clamp(controllerSensitivity, 0.1f, 0.9f);
     }
 }
Example #3
0
        void txtVolume_TextChanged(object sender, System.EventArgs e)
        {
            float f = 0.0f;

            if (float.TryParse(txtVolume.Text, out f))
            {
                f = EonMathsHelper.Clamp(f, 0.1f, 1.0f);

                txtVolume.Text = "" + f;
            }
            else
            {
                txtVolume.Text = "" + 0.1f;
            }
        }