mirror of
https://github.com/osukey/osukey.git
synced 2025-07-01 16:29:58 +09:00
Naming adjustments
This commit is contained in:
@ -42,7 +42,7 @@ namespace osu.Game.Graphics.UserInterface
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private readonly List<BarStruct> bars = new List<BarStruct>();
|
private readonly List<BarInfo> bars = new List<BarInfo>();
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// A list of floats that defines the length of each <see cref="Bar"/>
|
/// A list of floats that defines the length of each <see cref="Bar"/>
|
||||||
@ -70,20 +70,20 @@ namespace osu.Game.Graphics.UserInterface
|
|||||||
|
|
||||||
if (bar.Index < bars.Count)
|
if (bar.Index < bars.Count)
|
||||||
{
|
{
|
||||||
BarStruct b = bars[bar.Index];
|
BarInfo b = bars[bar.Index];
|
||||||
|
|
||||||
b.OldValue = b.Value;
|
b.InitialLength = b.FinalLength;
|
||||||
b.Value = length;
|
b.FinalLength = length;
|
||||||
b.ShortSide = size;
|
b.Breadth = size;
|
||||||
|
|
||||||
bars[bar.Index] = b;
|
bars[bar.Index] = b;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
bars.Add(new BarStruct
|
bars.Add(new BarInfo
|
||||||
{
|
{
|
||||||
Value = length,
|
FinalLength = length,
|
||||||
ShortSide = size
|
Breadth = size
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -122,8 +122,8 @@ namespace osu.Game.Graphics.UserInterface
|
|||||||
{
|
{
|
||||||
for (int i = 0; i < bars.Count; i++)
|
for (int i = 0; i < bars.Count; i++)
|
||||||
{
|
{
|
||||||
BarStruct bar = bars[i];
|
BarInfo bar = bars[i];
|
||||||
bar.IntermediateValue = Interpolation.ValueAt(currentTime, bar.OldValue, bar.Value, animationStartTime, animationStartTime + resize_duration, easing);
|
bar.InstantaneousLength = Interpolation.ValueAt(currentTime, bar.InitialLength, bar.FinalLength, animationStartTime, animationStartTime + resize_duration, easing);
|
||||||
bars[i] = bar;
|
bars[i] = bar;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -133,8 +133,8 @@ namespace osu.Game.Graphics.UserInterface
|
|||||||
{
|
{
|
||||||
for (int i = 0; i < bars.Count; i++)
|
for (int i = 0; i < bars.Count; i++)
|
||||||
{
|
{
|
||||||
BarStruct bar = bars[i];
|
BarInfo bar = bars[i];
|
||||||
bar.IntermediateValue = bar.Value;
|
bar.InstantaneousLength = bar.FinalLength;
|
||||||
bars[i] = bar;
|
bars[i] = bar;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -160,7 +160,7 @@ namespace osu.Game.Graphics.UserInterface
|
|||||||
private Vector2 drawSize;
|
private Vector2 drawSize;
|
||||||
private BarDirection direction;
|
private BarDirection direction;
|
||||||
|
|
||||||
private readonly List<BarStruct> bars = new List<BarStruct>();
|
private readonly List<BarInfo> bars = new List<BarInfo>();
|
||||||
|
|
||||||
public override void ApplyState()
|
public override void ApplyState()
|
||||||
{
|
{
|
||||||
@ -188,8 +188,8 @@ namespace osu.Game.Graphics.UserInterface
|
|||||||
{
|
{
|
||||||
var bar = bars[i];
|
var bar = bars[i];
|
||||||
|
|
||||||
float barHeight = drawSize.Y * ((direction == BarDirection.TopToBottom || direction == BarDirection.BottomToTop) ? bar.IntermediateValue : bar.ShortSide);
|
float barHeight = drawSize.Y * ((direction == BarDirection.TopToBottom || direction == BarDirection.BottomToTop) ? bar.InstantaneousLength : bar.Breadth);
|
||||||
float barWidth = drawSize.X * ((direction == BarDirection.LeftToRight || direction == BarDirection.RightToLeft) ? bar.IntermediateValue : bar.ShortSide);
|
float barWidth = drawSize.X * ((direction == BarDirection.LeftToRight || direction == BarDirection.RightToLeft) ? bar.InstantaneousLength : bar.Breadth);
|
||||||
|
|
||||||
Vector2 topLeft;
|
Vector2 topLeft;
|
||||||
|
|
||||||
@ -231,12 +231,12 @@ namespace osu.Game.Graphics.UserInterface
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private struct BarStruct
|
private struct BarInfo
|
||||||
{
|
{
|
||||||
public float OldValue { get; set; }
|
public float InitialLength { get; set; }
|
||||||
public float Value { get; set; }
|
public float FinalLength { get; set; }
|
||||||
public float IntermediateValue { get; set; }
|
public float InstantaneousLength { get; set; }
|
||||||
public float ShortSide { get; set; }
|
public float Breadth { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user