Fix missing attribute text (and give slightly more space for "10.00x" cases

This commit is contained in:
Dean Herbert 2021-09-06 21:40:30 +09:00
parent 8ffcea2e51
commit ce197b6322
2 changed files with 6 additions and 1 deletions

View File

@ -32,7 +32,7 @@ private void load()
},
text = new AttributeText(Point)
{
Width = 40,
Width = 45,
},
});

View File

@ -16,6 +16,7 @@ public class EffectRowAttribute : RowAttribute
private AttributeText kiaiModeBubble;
private AttributeText omitBarLineBubble;
private AttributeText text;
public EffectRowAttribute(EffectControlPoint effect)
: base(effect, "effect")
@ -34,12 +35,16 @@ private void load()
{
Current = scrollSpeed,
},
text = new AttributeText(Point) { Width = 45 },
kiaiModeBubble = new AttributeText(Point) { Text = "kiai" },
omitBarLineBubble = new AttributeText(Point) { Text = "no barline" },
});
kiaiMode.BindValueChanged(enabled => kiaiModeBubble.FadeTo(enabled.NewValue ? 1 : 0), true);
omitBarLine.BindValueChanged(enabled => omitBarLineBubble.FadeTo(enabled.NewValue ? 1 : 0), true);
scrollSpeed.BindValueChanged(_ => updateText(), true);
}
private void updateText() => text.Text = $"{scrollSpeed.Value:n2}x";
}
}