Extract disabling progress bar user-interactivity

This commit is contained in:
Salman Ahmed
2021-01-18 10:46:48 +03:00
parent 4e6c1a3906
commit bd44bf8c0b
3 changed files with 13 additions and 8 deletions

View File

@ -40,8 +40,14 @@ namespace osu.Game.Graphics.UserInterface
set => CurrentNumber.Value = value;
}
public ProgressBar()
private readonly bool userInteractive;
public override bool HandlePositionalInput => userInteractive;
public override bool HandleNonPositionalInput => userInteractive;
public ProgressBar(bool userInteractive)
{
this.userInteractive = userInteractive;
CurrentNumber.MinValue = 0;
CurrentNumber.MaxValue = 1;
RelativeSizeAxes = Axes.X;