mirror of
https://github.com/osukey/osukey.git
synced 2025-08-04 23:24:04 +09:00
Update framework
This commit is contained in:
committed by
Dean Herbert
parent
39d20565aa
commit
9d523ea012
@ -93,7 +93,7 @@ namespace osu.Game.Graphics.Containers
|
||||
sections = value.ToList();
|
||||
if (sections.Count == 0) return;
|
||||
|
||||
sectionsContainer.Add(sections);
|
||||
sectionsContainer.AddRange(sections);
|
||||
SelectedSection.Value = sections[0];
|
||||
lastKnownScroll = float.NaN;
|
||||
}
|
||||
|
@ -58,7 +58,7 @@ namespace osu.Game.Graphics.UserInterface
|
||||
Direction = Direction,
|
||||
});
|
||||
//I'm using ToList() here because Where() returns an Enumerable which can change it's elements afterwards
|
||||
Remove(Children.Where((bar, index) => index >= value.Count()).ToList());
|
||||
RemoveRange(Children.Where((bar, index) => index >= value.Count()).ToList());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -49,7 +49,7 @@ namespace osu.Game.Graphics.UserInterface
|
||||
Content.Masking = true;
|
||||
Content.CornerRadius = 5;
|
||||
|
||||
Add(new Drawable[]
|
||||
AddRange(new Drawable[]
|
||||
{
|
||||
new Triangles
|
||||
{
|
||||
|
@ -17,7 +17,7 @@ namespace osu.Game.Graphics.UserInterface
|
||||
public SearchTextBox()
|
||||
{
|
||||
Height = 35;
|
||||
Add(new Drawable[]
|
||||
AddRange(new Drawable[]
|
||||
{
|
||||
new TextAwesome
|
||||
{
|
||||
|
@ -33,25 +33,25 @@ namespace osu.Game.Graphics.UserInterface
|
||||
private const float star_size = 20;
|
||||
private const float star_spacing = 4;
|
||||
|
||||
private float count;
|
||||
private float countStars;
|
||||
|
||||
/// <summary>
|
||||
/// Amount of stars represented.
|
||||
/// </summary>
|
||||
public float Count
|
||||
public float CountStars
|
||||
{
|
||||
get
|
||||
{
|
||||
return count;
|
||||
return countStars;
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
if (count == value) return;
|
||||
if (countStars == value) return;
|
||||
|
||||
if (IsLoaded)
|
||||
transformCount(value);
|
||||
count = value;
|
||||
countStars = value;
|
||||
}
|
||||
}
|
||||
|
||||
@ -94,15 +94,15 @@ namespace osu.Game.Graphics.UserInterface
|
||||
|
||||
public void ResetCount()
|
||||
{
|
||||
count = 0;
|
||||
countStars = 0;
|
||||
StopAnimation();
|
||||
}
|
||||
|
||||
public void ReplayAnimation()
|
||||
{
|
||||
var t = count;
|
||||
var t = countStars;
|
||||
ResetCount();
|
||||
Count = t;
|
||||
CountStars = t;
|
||||
}
|
||||
|
||||
public void StopAnimation()
|
||||
@ -111,8 +111,8 @@ namespace osu.Game.Graphics.UserInterface
|
||||
foreach (var star in stars.Children)
|
||||
{
|
||||
star.ClearTransforms(true);
|
||||
star.FadeTo(i < count ? 1.0f : minStarAlpha);
|
||||
star.Icon.ScaleTo(getStarScale(i, count));
|
||||
star.FadeTo(i < countStars ? 1.0f : minStarAlpha);
|
||||
star.Icon.ScaleTo(getStarScale(i, countStars));
|
||||
i++;
|
||||
}
|
||||
}
|
||||
@ -132,7 +132,7 @@ namespace osu.Game.Graphics.UserInterface
|
||||
{
|
||||
star.ClearTransforms(true);
|
||||
|
||||
var delay = (count <= newValue ? Math.Max(i - count, 0) : Math.Max(count - 1 - i, 0)) * animationDelay;
|
||||
var delay = (countStars <= newValue ? Math.Max(i - countStars, 0) : Math.Max(countStars - 1 - i, 0)) * animationDelay;
|
||||
|
||||
using (BeginDelayedSequence(delay, true))
|
||||
{
|
||||
|
Reference in New Issue
Block a user