mirror of
https://github.com/osukey/osukey.git
synced 2025-08-02 14:17:06 +09:00
Make use of new timing system in Drawables and Transforms.
This commit is contained in:
@ -225,8 +225,8 @@ namespace osu.Game.Graphics.UserInterface
|
||||
? GetProportionalDuration(currentValue, newValue)
|
||||
: RollingDuration;
|
||||
|
||||
transform.StartTime = Time;
|
||||
transform.EndTime = Time + rollingTotalDuration;
|
||||
transform.StartTime = Time.Current;
|
||||
transform.EndTime = Time.Current + rollingTotalDuration;
|
||||
transform.StartValue = currentValue;
|
||||
transform.EndValue = newValue;
|
||||
transform.Easing = RollingEasing;
|
||||
|
@ -60,7 +60,7 @@ namespace osu.Game.Graphics.UserInterface
|
||||
{
|
||||
get
|
||||
{
|
||||
double time = CurrentTime ?? 0;
|
||||
double time = Time?.Current ?? 0;
|
||||
if (time < StartTime) return StartValue;
|
||||
if (time >= EndTime) return EndValue;
|
||||
|
||||
|
@ -50,7 +50,7 @@ namespace osu.Game.Graphics.UserInterface
|
||||
{
|
||||
get
|
||||
{
|
||||
double elapsedTime = Time - transformStartTime;
|
||||
double elapsedTime = Time.Current - transformStartTime;
|
||||
double expectedElapsedTime = Math.Abs(prevCount - count) * animationDelay;
|
||||
if (elapsedTime >= expectedElapsedTime)
|
||||
return count;
|
||||
@ -149,7 +149,7 @@ namespace osu.Game.Graphics.UserInterface
|
||||
public void StopAnimation()
|
||||
{
|
||||
prevCount = count;
|
||||
transformStartTime = Time;
|
||||
transformStartTime = Time.Current;
|
||||
|
||||
for (int i = 0; i < MaxStars; i++)
|
||||
transformStarQuick(i, count);
|
||||
@ -188,7 +188,7 @@ namespace osu.Game.Graphics.UserInterface
|
||||
transformStar(i, newValue);
|
||||
stars[i].DelayReset();
|
||||
}
|
||||
transformStartTime = Time;
|
||||
transformStartTime = Time.Current;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -67,21 +67,12 @@ namespace osu.Game.Graphics.UserInterface.Volume
|
||||
base.Dispose(isDisposing);
|
||||
}
|
||||
|
||||
protected override bool OnWheelDown(InputState state)
|
||||
protected override bool OnWheel(InputState state)
|
||||
{
|
||||
if (!IsVisible)
|
||||
return false;
|
||||
|
||||
volumeMeterMaster.TriggerWheelDown(state);
|
||||
return true;
|
||||
}
|
||||
|
||||
protected override bool OnWheelUp(InputState state)
|
||||
{
|
||||
if (!IsVisible)
|
||||
return false;
|
||||
|
||||
volumeMeterMaster.TriggerWheelUp(state);
|
||||
volumeMeterMaster.TriggerWheel(state);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -14,13 +14,7 @@ namespace osu.Game.Graphics.UserInterface.Volume
|
||||
{
|
||||
public Action ActivateRequested;
|
||||
|
||||
protected override bool OnWheelDown(InputState state)
|
||||
{
|
||||
ActivateRequested?.Invoke();
|
||||
return true;
|
||||
}
|
||||
|
||||
protected override bool OnWheelUp(InputState state)
|
||||
protected override bool OnWheel(InputState state)
|
||||
{
|
||||
ActivateRequested?.Invoke();
|
||||
return true;
|
||||
|
@ -73,15 +73,9 @@ namespace osu.Game.Graphics.UserInterface.Volume
|
||||
}
|
||||
}
|
||||
|
||||
protected override bool OnWheelUp(InputState state)
|
||||
protected override bool OnWheel(InputState state)
|
||||
{
|
||||
Volume += 0.05f;
|
||||
return true;
|
||||
}
|
||||
|
||||
protected override bool OnWheelDown(InputState state)
|
||||
{
|
||||
Volume -= 0.05f;
|
||||
Volume += 0.05f * state.Mouse.WheelDiff;
|
||||
return true;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user