Copy documentation across to SettingsSlider

This commit is contained in:
Dean Herbert 2020-01-29 12:55:07 +09:00
parent f21142ae50
commit aa597c1934

View File

@ -3,6 +3,7 @@
using System; using System;
using osu.Framework.Graphics; using osu.Framework.Graphics;
using osu.Framework.Graphics.UserInterface;
using osu.Game.Graphics.UserInterface; using osu.Game.Graphics.UserInterface;
namespace osu.Game.Overlays.Settings namespace osu.Game.Overlays.Settings
@ -22,18 +23,28 @@ namespace osu.Game.Overlays.Settings
RelativeSizeAxes = Axes.X RelativeSizeAxes = Axes.X
}; };
/// <summary>
/// When set, value changes based on user input are only transferred to any bound control's Current on commit.
/// This is useful if the UI interaction could be adversely affected by the value changing, such as the position of the <see cref="SliderBar{T}"/> on the screen.
/// </summary>
public bool TransferValueOnCommit public bool TransferValueOnCommit
{ {
get => ((TSlider)Control).TransferValueOnCommit; get => ((TSlider)Control).TransferValueOnCommit;
set => ((TSlider)Control).TransferValueOnCommit = value; set => ((TSlider)Control).TransferValueOnCommit = value;
} }
/// <summary>
/// A custom step value for each key press which actuates a change on this control.
/// </summary>
public float KeyboardStep public float KeyboardStep
{ {
get => ((TSlider)Control).KeyboardStep; get => ((TSlider)Control).KeyboardStep;
set => ((TSlider)Control).KeyboardStep = value; set => ((TSlider)Control).KeyboardStep = value;
} }
/// <summary>
/// Whether to format the tooltip as a percentage or the actual value.
/// </summary>
public bool DisplayAsPercentage public bool DisplayAsPercentage
{ {
get => ((TSlider)Control).DisplayAsPercentage; get => ((TSlider)Control).DisplayAsPercentage;