mirror of
https://github.com/osukey/osukey.git
synced 2025-08-04 23:24:04 +09:00
Apply batch fixing of built-in types using var
This commit is contained in:
@ -43,7 +43,7 @@ namespace osu.Game.Graphics.Containers
|
||||
// - If we were to use RelativeSize/FillMode, we'd need to set the Icon's RelativeSizeAxes directly.
|
||||
// We can't do this because we would need access to AutoSizeAxes to set it to none.
|
||||
// Other issues come up along the way too, so it's not a good solution.
|
||||
var fitScale = Math.Min(DrawSize.X / InternalChild.DrawSize.X, DrawSize.Y / InternalChild.DrawSize.Y);
|
||||
float fitScale = Math.Min(DrawSize.X / InternalChild.DrawSize.X, DrawSize.Y / InternalChild.DrawSize.Y);
|
||||
InternalChild.Scale = new Vector2(fitScale);
|
||||
InternalChild.Anchor = Anchor.Centre;
|
||||
InternalChild.Origin = Anchor.Centre;
|
||||
|
@ -109,7 +109,7 @@ namespace osu.Game.Graphics.Containers
|
||||
{
|
||||
double elapsedDuration = (double)(Time.Current - startTime);
|
||||
|
||||
var amount = (float)Interpolation.ApplyEasing(easing, Math.Min(elapsedDuration / duration, 1));
|
||||
float amount = (float)Interpolation.ApplyEasing(easing, Math.Min(elapsedDuration / duration, 1));
|
||||
|
||||
// Interpolate the position of the logo, where amount 0 is where the logo was when it first began interpolating, and amount 1 is the target location.
|
||||
Logo.Position = Vector2.Lerp(startPosition.Value, localPos, amount);
|
||||
|
@ -182,7 +182,7 @@ namespace osu.Game.Graphics.Containers
|
||||
|
||||
protected override bool OnInvalidate(Invalidation invalidation, InvalidationSource source)
|
||||
{
|
||||
var result = base.OnInvalidate(invalidation, source);
|
||||
bool result = base.OnInvalidate(invalidation, source);
|
||||
|
||||
if (source == InvalidationSource.Child && (invalidation & Invalidation.DrawSize) != 0)
|
||||
{
|
||||
@ -240,7 +240,7 @@ namespace osu.Game.Graphics.Containers
|
||||
headerBackgroundContainer.Height = expandableHeaderSize + fixedHeaderSize;
|
||||
headerBackgroundContainer.Y = ExpandableHeader?.Y ?? 0;
|
||||
|
||||
var smallestSectionHeight = Children.Count > 0 ? Children.Min(d => d.Height) : 0;
|
||||
float smallestSectionHeight = Children.Count > 0 ? Children.Min(d => d.Height) : 0;
|
||||
|
||||
// scroll offset is our fixed header height if we have it plus 10% of content height
|
||||
// plus 5% to fix floating point errors and to not have a section instantly unselect when scrolling upwards
|
||||
|
@ -40,7 +40,7 @@ namespace osu.Game.Graphics.Containers
|
||||
|
||||
public void Select(T item)
|
||||
{
|
||||
var newIndex = IndexOf(item);
|
||||
int newIndex = IndexOf(item);
|
||||
|
||||
if (newIndex < 0)
|
||||
setSelected(null);
|
||||
|
Reference in New Issue
Block a user