Rename exposed settings to make more sense

This commit is contained in:
Dean Herbert 2023-01-17 18:24:55 +09:00
parent f923dc5009
commit 09c7ab3af6
2 changed files with 8 additions and 8 deletions

View File

@ -101,10 +101,10 @@ public void TestChangeFlowDirection()
[Test]
public void TestToggleJudgementNames()
{
AddStep("Hide judgement names", () => counterDisplay.ShowName.Value = false);
AddStep("Hide judgement names", () => counterDisplay.ShowJudgementNames.Value = false);
AddWaitStep("wait some", 2);
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);
AddAssert("Assert shown", () => counterDisplay.JudgementContainer.Children.OfType<JudgementCounter>().First().ResultName.Alpha == 1);
}
@ -112,10 +112,10 @@ public void TestToggleJudgementNames()
[Test]
public void TestHideMaxValue()
{
AddStep("Hide max judgement", () => counterDisplay.ShowMax.Value = false);
AddStep("Hide max judgement", () => counterDisplay.ShowMaxJudgement.Value = false);
AddWaitStep("wait some", 2);
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]

View File

@ -26,10 +26,10 @@ public partial class JudgementCounterDisplay : CompositeDrawable, ISkinnableDraw
public Bindable<Direction> FlowDirection { get; set; } = new Bindable<Direction>();
[SettingSource("Show judgement names")]
public BindableBool ShowName { get; set; } = new BindableBool(true);
public BindableBool ShowJudgementNames { get; set; } = new BindableBool(true);
[SettingSource("Show max judgement")]
public BindableBool ShowMax { get; set; } = new BindableBool(true);
public BindableBool ShowMaxJudgement { get; set; } = new BindableBool(true);
[Resolved]
private JudgementTally tally { get; set; } = null!;
@ -64,7 +64,7 @@ protected override void LoadComplete()
counter.Direction.Value = getFillDirection(direction.NewValue);
}, true);
Mode.BindValueChanged(_ => updateMode(), true);
ShowMax.BindValueChanged(value =>
ShowMaxJudgement.BindValueChanged(value =>
{
var firstChild = JudgementContainer.Children.FirstOrDefault();
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)
{
State = { Value = Visibility.Visible },
ShowName = { BindTarget = ShowName }
ShowName = { BindTarget = ShowJudgementNames }
};
return counter;
}