mirror of
https://github.com/ppy/osu.git
synced 2024-11-11 11:07:52 +08:00
Add opacity setting
This commit is contained in:
parent
39337f5189
commit
e3f2e1ba08
@ -16,7 +16,7 @@ namespace osu.Game.Rulesets.Mania.UI
|
|||||||
{
|
{
|
||||||
public partial class ManiaTouchInputOverlay : CompositeDrawable, ISerialisableDrawable
|
public partial class ManiaTouchInputOverlay : CompositeDrawable, ISerialisableDrawable
|
||||||
{
|
{
|
||||||
[SettingSource("Spacing", "The spacing between input receptors.")]
|
[SettingSource("Spacing", "The spacing between receptors.")]
|
||||||
public BindableFloat Spacing { get; } = new BindableFloat(10)
|
public BindableFloat Spacing { get; } = new BindableFloat(10)
|
||||||
{
|
{
|
||||||
Precision = 1,
|
Precision = 1,
|
||||||
@ -24,6 +24,14 @@ namespace osu.Game.Rulesets.Mania.UI
|
|||||||
MaxValue = 100,
|
MaxValue = 100,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
[SettingSource("Opacity", "The receptor opacity.")]
|
||||||
|
public BindableFloat Opacity { get; } = new BindableFloat(1)
|
||||||
|
{
|
||||||
|
Precision = 0.1f,
|
||||||
|
MinValue = 0,
|
||||||
|
MaxValue = 1
|
||||||
|
};
|
||||||
|
|
||||||
[Resolved]
|
[Resolved]
|
||||||
private ManiaPlayfield playfield { get; set; } = null!;
|
private ManiaPlayfield playfield { get; set; } = null!;
|
||||||
|
|
||||||
@ -68,6 +76,12 @@ namespace osu.Game.Rulesets.Mania.UI
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected override void LoadComplete()
|
||||||
|
{
|
||||||
|
base.LoadComplete();
|
||||||
|
Opacity.BindValueChanged(o => Alpha = o.NewValue, true);
|
||||||
|
}
|
||||||
|
|
||||||
public bool UsesFixedAnchor { get; set; }
|
public bool UsesFixedAnchor { get; set; }
|
||||||
|
|
||||||
public partial class InputReceptor : CompositeDrawable
|
public partial class InputReceptor : CompositeDrawable
|
||||||
|
Loading…
Reference in New Issue
Block a user