mirror of
https://github.com/osukey/osukey.git
synced 2025-08-07 00:23:59 +09:00
Merge branch 'master' into editor-setup-screen-difficulty-adjust
This commit is contained in:
@ -19,7 +19,7 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables.Pieces
|
|||||||
Origin = Anchor.Centre;
|
Origin = Anchor.Centre;
|
||||||
|
|
||||||
Masking = true;
|
Masking = true;
|
||||||
BorderThickness = 10;
|
BorderThickness = 9; // roughly matches slider borders and makes stacked circles distinctly visible from each other.
|
||||||
BorderColour = Color4.White;
|
BorderColour = Color4.White;
|
||||||
|
|
||||||
Child = new Box
|
Child = new Box
|
||||||
|
@ -49,6 +49,23 @@ namespace osu.Game.Rulesets.Osu.Skinning
|
|||||||
{
|
{
|
||||||
OsuHitObject osuObject = (OsuHitObject)drawableObject.HitObject;
|
OsuHitObject osuObject = (OsuHitObject)drawableObject.HitObject;
|
||||||
|
|
||||||
|
bool allowFallback = false;
|
||||||
|
|
||||||
|
// attempt lookup using priority specification
|
||||||
|
Texture baseTexture = getTextureWithFallback(string.Empty);
|
||||||
|
|
||||||
|
// if the base texture was not found without a fallback, switch on fallback mode and re-perform the lookup.
|
||||||
|
if (baseTexture == null)
|
||||||
|
{
|
||||||
|
allowFallback = true;
|
||||||
|
baseTexture = getTextureWithFallback(string.Empty);
|
||||||
|
}
|
||||||
|
|
||||||
|
// at this point, any further texture fetches should be correctly using the priority source if the base texture was retrieved using it.
|
||||||
|
// the flow above handles the case where a sliderendcircle.png is retrieved from the skin, but sliderendcircleoverlay.png doesn't exist.
|
||||||
|
// expected behaviour in this scenario is not showing the overlay, rather than using hitcircleoverlay.png (potentially from the default/fall-through skin).
|
||||||
|
Texture overlayTexture = getTextureWithFallback("overlay");
|
||||||
|
|
||||||
InternalChildren = new Drawable[]
|
InternalChildren = new Drawable[]
|
||||||
{
|
{
|
||||||
circleSprites = new Container<Sprite>
|
circleSprites = new Container<Sprite>
|
||||||
@ -60,13 +77,13 @@ namespace osu.Game.Rulesets.Osu.Skinning
|
|||||||
{
|
{
|
||||||
hitCircleSprite = new Sprite
|
hitCircleSprite = new Sprite
|
||||||
{
|
{
|
||||||
Texture = getTextureWithFallback(string.Empty),
|
Texture = baseTexture,
|
||||||
Anchor = Anchor.Centre,
|
Anchor = Anchor.Centre,
|
||||||
Origin = Anchor.Centre,
|
Origin = Anchor.Centre,
|
||||||
},
|
},
|
||||||
hitCircleOverlay = new Sprite
|
hitCircleOverlay = new Sprite
|
||||||
{
|
{
|
||||||
Texture = getTextureWithFallback("overlay"),
|
Texture = overlayTexture,
|
||||||
Anchor = Anchor.Centre,
|
Anchor = Anchor.Centre,
|
||||||
Origin = Anchor.Centre,
|
Origin = Anchor.Centre,
|
||||||
}
|
}
|
||||||
@ -101,8 +118,13 @@ namespace osu.Game.Rulesets.Osu.Skinning
|
|||||||
Texture tex = null;
|
Texture tex = null;
|
||||||
|
|
||||||
if (!string.IsNullOrEmpty(priorityLookup))
|
if (!string.IsNullOrEmpty(priorityLookup))
|
||||||
|
{
|
||||||
tex = skin.GetTexture($"{priorityLookup}{name}");
|
tex = skin.GetTexture($"{priorityLookup}{name}");
|
||||||
|
|
||||||
|
if (!allowFallback)
|
||||||
|
return tex;
|
||||||
|
}
|
||||||
|
|
||||||
return tex ?? skin.GetTexture($"hitcircle{name}");
|
return tex ?? skin.GetTexture($"hitcircle{name}");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -54,6 +54,13 @@ namespace osu.Game.Overlays.Settings
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[Obsolete("Use Current instead")] // Can be removed 20210406
|
||||||
|
public Bindable<T> Bindable
|
||||||
|
{
|
||||||
|
get => Current;
|
||||||
|
set => Current = value;
|
||||||
|
}
|
||||||
|
|
||||||
public virtual Bindable<T> Current
|
public virtual Bindable<T> Current
|
||||||
{
|
{
|
||||||
get => controlWithCurrent.Current;
|
get => controlWithCurrent.Current;
|
||||||
|
@ -199,7 +199,40 @@ namespace osu.Game.Screens.Edit.Compose.Components.Timeline
|
|||||||
base.Update();
|
base.Update();
|
||||||
|
|
||||||
// no bindable so we perform this every update
|
// no bindable so we perform this every update
|
||||||
Width = (float)(HitObject.GetEndTime() - HitObject.StartTime);
|
float duration = (float)(HitObject.GetEndTime() - HitObject.StartTime);
|
||||||
|
|
||||||
|
if (Width != duration)
|
||||||
|
{
|
||||||
|
Width = duration;
|
||||||
|
|
||||||
|
// kind of haphazard but yeah, no bindables.
|
||||||
|
if (HitObject is IHasRepeats repeats)
|
||||||
|
updateRepeats(repeats);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private Container repeatsContainer;
|
||||||
|
|
||||||
|
private void updateRepeats(IHasRepeats repeats)
|
||||||
|
{
|
||||||
|
repeatsContainer?.Expire();
|
||||||
|
|
||||||
|
mainComponents.Add(repeatsContainer = new Container
|
||||||
|
{
|
||||||
|
RelativeSizeAxes = Axes.Both,
|
||||||
|
});
|
||||||
|
|
||||||
|
for (int i = 0; i < repeats.RepeatCount; i++)
|
||||||
|
{
|
||||||
|
repeatsContainer.Add(new Circle
|
||||||
|
{
|
||||||
|
Size = new Vector2(circle_size / 2),
|
||||||
|
Anchor = Anchor.CentreLeft,
|
||||||
|
Origin = Anchor.Centre,
|
||||||
|
RelativePositionAxes = Axes.X,
|
||||||
|
X = (float)(i + 1) / (repeats.RepeatCount + 1),
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override bool ShouldBeConsideredForInput(Drawable child) => true;
|
protected override bool ShouldBeConsideredForInput(Drawable child) => true;
|
||||||
|
@ -589,7 +589,7 @@ namespace osu.Game.Screens.Edit
|
|||||||
|
|
||||||
private void seek(UIEvent e, int direction)
|
private void seek(UIEvent e, int direction)
|
||||||
{
|
{
|
||||||
double amount = e.ShiftPressed ? 2 : 1;
|
double amount = e.ShiftPressed ? 4 : 1;
|
||||||
|
|
||||||
if (direction < 1)
|
if (direction < 1)
|
||||||
clock.SeekBackward(!clock.IsRunning, amount);
|
clock.SeekBackward(!clock.IsRunning, amount);
|
||||||
|
@ -86,7 +86,7 @@ namespace osu.Game.Screens.Edit
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="snapped">Whether to snap to the closest beat after seeking.</param>
|
/// <param name="snapped">Whether to snap to the closest beat after seeking.</param>
|
||||||
/// <param name="amount">The relative amount (magnitude) which should be seeked.</param>
|
/// <param name="amount">The relative amount (magnitude) which should be seeked.</param>
|
||||||
public void SeekBackward(bool snapped = false, double amount = 1) => seek(-1, snapped, amount);
|
public void SeekBackward(bool snapped = false, double amount = 1) => seek(-1, snapped, amount + (IsRunning ? 1.5 : 0));
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Seeks forwards by one beat length.
|
/// Seeks forwards by one beat length.
|
||||||
|
Reference in New Issue
Block a user