mirror of https://github.com/ppy/osu
Rename exposed settings to make more sense
This commit is contained in:
parent
f923dc5009
commit
09c7ab3af6
|
@ -101,10 +101,10 @@ public void TestChangeFlowDirection()
|
||||||
[Test]
|
[Test]
|
||||||
public void TestToggleJudgementNames()
|
public void TestToggleJudgementNames()
|
||||||
{
|
{
|
||||||
AddStep("Hide judgement names", () => counterDisplay.ShowName.Value = false);
|
AddStep("Hide judgement names", () => counterDisplay.ShowJudgementNames.Value = false);
|
||||||
AddWaitStep("wait some", 2);
|
AddWaitStep("wait some", 2);
|
||||||
AddAssert("Assert hidden", () => counterDisplay.JudgementContainer.Children.OfType<JudgementCounter>().First().ResultName.Alpha == 0);
|
AddAssert("Assert hidden", () => counterDisplay.JudgementContainer.Children.OfType<JudgementCounter>().First().ResultName.Alpha == 0);
|
||||||
AddStep("Hide judgement names", () => counterDisplay.ShowName.Value = true);
|
AddStep("Hide judgement names", () => counterDisplay.ShowJudgementNames.Value = true);
|
||||||
AddWaitStep("wait some", 2);
|
AddWaitStep("wait some", 2);
|
||||||
AddAssert("Assert shown", () => counterDisplay.JudgementContainer.Children.OfType<JudgementCounter>().First().ResultName.Alpha == 1);
|
AddAssert("Assert shown", () => counterDisplay.JudgementContainer.Children.OfType<JudgementCounter>().First().ResultName.Alpha == 1);
|
||||||
}
|
}
|
||||||
|
@ -112,10 +112,10 @@ public void TestToggleJudgementNames()
|
||||||
[Test]
|
[Test]
|
||||||
public void TestHideMaxValue()
|
public void TestHideMaxValue()
|
||||||
{
|
{
|
||||||
AddStep("Hide max judgement", () => counterDisplay.ShowMax.Value = false);
|
AddStep("Hide max judgement", () => counterDisplay.ShowMaxJudgement.Value = false);
|
||||||
AddWaitStep("wait some", 2);
|
AddWaitStep("wait some", 2);
|
||||||
AddAssert("Check max hidden", () => counterDisplay.JudgementContainer.ChildrenOfType<JudgementCounter>().First().Alpha == 0);
|
AddAssert("Check max hidden", () => counterDisplay.JudgementContainer.ChildrenOfType<JudgementCounter>().First().Alpha == 0);
|
||||||
AddStep("Show max judgement", () => counterDisplay.ShowMax.Value = true);
|
AddStep("Show max judgement", () => counterDisplay.ShowMaxJudgement.Value = true);
|
||||||
}
|
}
|
||||||
|
|
||||||
[Test]
|
[Test]
|
||||||
|
|
|
@ -26,10 +26,10 @@ public partial class JudgementCounterDisplay : CompositeDrawable, ISkinnableDraw
|
||||||
public Bindable<Direction> FlowDirection { get; set; } = new Bindable<Direction>();
|
public Bindable<Direction> FlowDirection { get; set; } = new Bindable<Direction>();
|
||||||
|
|
||||||
[SettingSource("Show judgement names")]
|
[SettingSource("Show judgement names")]
|
||||||
public BindableBool ShowName { get; set; } = new BindableBool(true);
|
public BindableBool ShowJudgementNames { get; set; } = new BindableBool(true);
|
||||||
|
|
||||||
[SettingSource("Show max judgement")]
|
[SettingSource("Show max judgement")]
|
||||||
public BindableBool ShowMax { get; set; } = new BindableBool(true);
|
public BindableBool ShowMaxJudgement { get; set; } = new BindableBool(true);
|
||||||
|
|
||||||
[Resolved]
|
[Resolved]
|
||||||
private JudgementTally tally { get; set; } = null!;
|
private JudgementTally tally { get; set; } = null!;
|
||||||
|
@ -64,7 +64,7 @@ protected override void LoadComplete()
|
||||||
counter.Direction.Value = getFillDirection(direction.NewValue);
|
counter.Direction.Value = getFillDirection(direction.NewValue);
|
||||||
}, true);
|
}, true);
|
||||||
Mode.BindValueChanged(_ => updateMode(), true);
|
Mode.BindValueChanged(_ => updateMode(), true);
|
||||||
ShowMax.BindValueChanged(value =>
|
ShowMaxJudgement.BindValueChanged(value =>
|
||||||
{
|
{
|
||||||
var firstChild = JudgementContainer.Children.FirstOrDefault();
|
var firstChild = JudgementContainer.Children.FirstOrDefault();
|
||||||
firstChild.FadeTo(value.NewValue ? 1 : 0, TRANSFORM_DURATION, Easing.OutQuint);
|
firstChild.FadeTo(value.NewValue ? 1 : 0, TRANSFORM_DURATION, Easing.OutQuint);
|
||||||
|
@ -115,7 +115,7 @@ private JudgementCounter createCounter(JudgementTally.JudgementCount info)
|
||||||
JudgementCounter counter = new JudgementCounter(info)
|
JudgementCounter counter = new JudgementCounter(info)
|
||||||
{
|
{
|
||||||
State = { Value = Visibility.Visible },
|
State = { Value = Visibility.Visible },
|
||||||
ShowName = { BindTarget = ShowName }
|
ShowName = { BindTarget = ShowJudgementNames }
|
||||||
};
|
};
|
||||||
return counter;
|
return counter;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue