CheckBox -> Checkbox.

This commit is contained in:
Dean Herbert
2017-03-31 17:38:33 +09:00
parent f42935eccf
commit 24d06fa92d
5 changed files with 23 additions and 23 deletions

View File

@ -16,7 +16,7 @@ using OpenTK.Graphics;
namespace osu.Game.Graphics.UserInterface
{
public class OsuCheckbox : CheckBox
public class OsuCheckbox : Checkbox
{
private Bindable<bool> bindable;
@ -29,9 +29,9 @@ namespace osu.Game.Graphics.UserInterface
bindable = value;
if (bindable != null)
{
bool state = State == CheckBoxState.Checked;
bool state = State == CheckboxState.Checked;
if (state != bindable.Value)
State = bindable.Value ? CheckBoxState.Checked : CheckBoxState.Unchecked;
State = bindable.Value ? CheckboxState.Checked : CheckboxState.Unchecked;
bindable.ValueChanged += bindableValueChanged;
}
@ -88,7 +88,7 @@ namespace osu.Game.Graphics.UserInterface
private void bindableValueChanged(object sender, EventArgs e)
{
State = bindable.Value ? CheckBoxState.Checked : CheckBoxState.Unchecked;
State = bindable.Value ? CheckboxState.Checked : CheckboxState.Unchecked;
}
protected override void Dispose(bool isDisposing)
@ -122,7 +122,7 @@ namespace osu.Game.Graphics.UserInterface
protected override void OnChecked()
{
sampleChecked?.Play();
nub.State = CheckBoxState.Checked;
nub.State = CheckboxState.Checked;
if (bindable != null)
bindable.Value = true;
@ -131,7 +131,7 @@ namespace osu.Game.Graphics.UserInterface
protected override void OnUnchecked()
{
sampleUnchecked?.Play();
nub.State = CheckBoxState.Unchecked;
nub.State = CheckboxState.Unchecked;
if (bindable != null)
bindable.Value = false;