mirror of
https://github.com/ppy/osu.git
synced 2024-12-15 01:02:55 +08:00
Merge branch 'master' into add-bindable-for-break-times
This commit is contained in:
commit
934439e138
@ -63,6 +63,6 @@
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<PackageReference Include="ppy.osu.Game.Resources" Version="2019.702.0" />
|
||||
<PackageReference Include="ppy.osu.Framework.Android" Version="2019.723.0" />
|
||||
<PackageReference Include="ppy.osu.Framework.Android" Version="2019.726.1" />
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
|
@ -1,6 +1,7 @@
|
||||
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
||||
// See the LICENCE file in the repository root for full licence text.
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using osu.Framework.Graphics.Containers;
|
||||
using osu.Framework.Graphics.Lines;
|
||||
@ -75,22 +76,22 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables.Pieces
|
||||
|
||||
protected SliderBody()
|
||||
{
|
||||
InternalChild = path = new SliderPath();
|
||||
RecyclePath();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Initialises a new <see cref="SliderPath"/>, releasing all resources retained by the old one.
|
||||
/// </summary>
|
||||
public void RecyclePath()
|
||||
public virtual void RecyclePath()
|
||||
{
|
||||
InternalChild = path = new SliderPath
|
||||
{
|
||||
Position = path.Position,
|
||||
PathRadius = path.PathRadius,
|
||||
AccentColour = path.AccentColour,
|
||||
BorderColour = path.BorderColour,
|
||||
BorderSize = path.BorderSize,
|
||||
Vertices = path.Vertices
|
||||
Position = path?.Position ?? Vector2.Zero,
|
||||
PathRadius = path?.PathRadius ?? 10,
|
||||
AccentColour = path?.AccentColour ?? Color4.White,
|
||||
BorderColour = path?.BorderColour ?? Color4.White,
|
||||
BorderSize = path?.BorderSize ?? DEFAULT_BORDER_SIZE,
|
||||
Vertices = path?.Vertices ?? Array.Empty<Vector2>()
|
||||
};
|
||||
}
|
||||
|
||||
|
@ -5,6 +5,7 @@ using System;
|
||||
using System.Collections.Generic;
|
||||
using osu.Framework.Allocation;
|
||||
using osu.Framework.Bindables;
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Game.Rulesets.Objects.Types;
|
||||
using osuTK;
|
||||
|
||||
@ -78,9 +79,12 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables.Pieces
|
||||
slider.Path.GetPathToProgress(CurrentCurve, 0, 1);
|
||||
SetVertices(CurrentCurve);
|
||||
|
||||
// The body is sized to the full path size to avoid excessive autosize computations
|
||||
// Force the body to be the final path size to avoid excessive autosize computations
|
||||
Path.AutoSizeAxes = Axes.Both;
|
||||
Size = Path.Size;
|
||||
|
||||
updatePathSize();
|
||||
|
||||
snakedPosition = Path.PositionInBoundingBox(Vector2.Zero);
|
||||
snakedPathOffset = Path.PositionInBoundingBox(Path.Vertices[0]);
|
||||
|
||||
@ -93,6 +97,19 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables.Pieces
|
||||
setRange(lastSnakedStart, lastSnakedEnd);
|
||||
}
|
||||
|
||||
public override void RecyclePath()
|
||||
{
|
||||
base.RecyclePath();
|
||||
updatePathSize();
|
||||
}
|
||||
|
||||
private void updatePathSize()
|
||||
{
|
||||
// Force the path to its final size to avoid excessive framebuffer resizes
|
||||
Path.AutoSizeAxes = Axes.None;
|
||||
Path.Size = Size;
|
||||
}
|
||||
|
||||
private void setRange(double p0, double p1)
|
||||
{
|
||||
if (p0 > p1)
|
||||
|
@ -386,7 +386,7 @@ namespace osu.Game.Beatmaps
|
||||
beatmap.OnlineBeatmapID = res.OnlineBeatmapID;
|
||||
};
|
||||
|
||||
req.Failure += e => { LogForModel(set, $"Online retrieval failed for {beatmap}", e); };
|
||||
req.Failure += e => { LogForModel(set, $"Online retrieval failed for {beatmap} ({e.Message})"); };
|
||||
|
||||
// intentionally blocking to limit web request concurrency
|
||||
req.Perform(api);
|
||||
|
@ -76,7 +76,12 @@ namespace osu.Game.Graphics.UserInterface
|
||||
{
|
||||
Masking = true,
|
||||
RelativeSizeAxes = Axes.Both,
|
||||
Child = path = new SmoothPath { RelativeSizeAxes = Axes.Both, PathRadius = 1 }
|
||||
Child = path = new SmoothPath
|
||||
{
|
||||
AutoSizeAxes = Axes.None,
|
||||
RelativeSizeAxes = Axes.Both,
|
||||
PathRadius = 1
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -64,7 +64,7 @@ namespace osu.Game.Graphics.UserInterface
|
||||
Direction = FillDirection.Horizontal,
|
||||
Children = new Drawable[]
|
||||
{
|
||||
text = new OsuSpriteText { Font = OsuFont.GetFont(size: 14, weight: FontWeight.Bold) },
|
||||
text = new OsuSpriteText { Font = OsuFont.GetFont(size: 14) },
|
||||
icon = new SpriteIcon
|
||||
{
|
||||
Size = new Vector2(14),
|
||||
@ -84,7 +84,11 @@ namespace osu.Game.Graphics.UserInterface
|
||||
}
|
||||
};
|
||||
|
||||
Current.ValueChanged += selected => { icon.Icon = selected.NewValue ? FontAwesome.Regular.CheckCircle : FontAwesome.Regular.Circle; };
|
||||
Current.ValueChanged += selected =>
|
||||
{
|
||||
icon.Icon = selected.NewValue ? FontAwesome.Regular.CheckCircle : FontAwesome.Regular.Circle;
|
||||
text.Font = text.Font.With(weight: selected.NewValue ? FontWeight.Bold : FontWeight.Medium);
|
||||
};
|
||||
}
|
||||
|
||||
[BackgroundDependencyLoader]
|
||||
|
@ -589,7 +589,7 @@ namespace osu.Game
|
||||
{
|
||||
int recentLogCount = 0;
|
||||
|
||||
const double debounce = 5000;
|
||||
const double debounce = 60000;
|
||||
|
||||
Logger.NewEntry += entry =>
|
||||
{
|
||||
|
@ -16,6 +16,7 @@ using osu.Game.Graphics.Sprites;
|
||||
using osu.Game.Online.Chat;
|
||||
using osuTK;
|
||||
using osuTK.Graphics;
|
||||
using osuTK.Input;
|
||||
|
||||
namespace osu.Game.Overlays.Chat.Tabs
|
||||
{
|
||||
@ -138,6 +139,19 @@ namespace osu.Game.Overlays.Chat.Tabs
|
||||
updateState();
|
||||
}
|
||||
|
||||
protected override bool OnMouseUp(MouseUpEvent e)
|
||||
{
|
||||
switch (e.Button)
|
||||
{
|
||||
case MouseButton.Middle:
|
||||
CloseButton.Click();
|
||||
return true;
|
||||
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
[BackgroundDependencyLoader]
|
||||
private void load(OsuColour colours)
|
||||
{
|
||||
|
@ -21,11 +21,11 @@ namespace osu.Game.Screens.Play
|
||||
private const float remaining_time_container_max_size = 0.3f;
|
||||
private const int vertical_margin = 25;
|
||||
|
||||
private List<BreakPeriod> breaks;
|
||||
|
||||
private readonly Container fadeContainer;
|
||||
|
||||
public List<BreakPeriod> Breaks
|
||||
private IReadOnlyList<BreakPeriod> breaks;
|
||||
|
||||
public IReadOnlyList<BreakPeriod> Breaks
|
||||
{
|
||||
get => breaks;
|
||||
set
|
||||
|
@ -81,7 +81,8 @@ namespace osu.Game.Screens.Select
|
||||
itemsCache.Invalidate();
|
||||
scrollPositionCache.Invalidate();
|
||||
|
||||
Schedule(() =>
|
||||
// Run on late scheduler want to ensure this runs after all pending UpdateBeatmapSet / RemoveBeatmapSet operations are run.
|
||||
SchedulerAfterChildren.Add(() =>
|
||||
{
|
||||
BeatmapSetsChanged?.Invoke();
|
||||
BeatmapSetsLoaded = true;
|
||||
@ -129,19 +130,16 @@ namespace osu.Game.Screens.Select
|
||||
loadBeatmapSets(beatmaps.GetAllUsableBeatmapSetsEnumerable());
|
||||
}
|
||||
|
||||
public void RemoveBeatmapSet(BeatmapSetInfo beatmapSet)
|
||||
public void RemoveBeatmapSet(BeatmapSetInfo beatmapSet) => Schedule(() =>
|
||||
{
|
||||
Schedule(() =>
|
||||
{
|
||||
var existingSet = beatmapSets.FirstOrDefault(b => b.BeatmapSet.ID == beatmapSet.ID);
|
||||
var existingSet = beatmapSets.FirstOrDefault(b => b.BeatmapSet.ID == beatmapSet.ID);
|
||||
|
||||
if (existingSet == null)
|
||||
return;
|
||||
if (existingSet == null)
|
||||
return;
|
||||
|
||||
root.RemoveChild(existingSet);
|
||||
itemsCache.Invalidate();
|
||||
});
|
||||
}
|
||||
root.RemoveChild(existingSet);
|
||||
itemsCache.Invalidate();
|
||||
});
|
||||
|
||||
public void UpdateBeatmapSet(BeatmapSetInfo beatmapSet) => Schedule(() =>
|
||||
{
|
||||
|
@ -25,22 +25,6 @@ namespace osu.Game.Screens.Select
|
||||
|
||||
private Bindable<BeatmapDetailTab> selectedTab;
|
||||
|
||||
private void invokeOnFilter()
|
||||
{
|
||||
OnFilter?.Invoke(tabs.Current.Value, modsCheckbox.Current.Value);
|
||||
}
|
||||
|
||||
[BackgroundDependencyLoader]
|
||||
private void load(OsuColour colour, OsuConfigManager config)
|
||||
{
|
||||
modsCheckbox.AccentColour = tabs.AccentColour = colour.YellowLight;
|
||||
|
||||
selectedTab = config.GetBindable<BeatmapDetailTab>(OsuSetting.BeatmapDetailTab);
|
||||
|
||||
tabs.Current.BindTo(selectedTab);
|
||||
tabs.Current.TriggerChange();
|
||||
}
|
||||
|
||||
public BeatmapDetailAreaTabControl()
|
||||
{
|
||||
Height = HEIGHT;
|
||||
@ -66,12 +50,31 @@ namespace osu.Game.Screens.Select
|
||||
Anchor = Anchor.BottomRight,
|
||||
Origin = Anchor.BottomRight,
|
||||
Text = @"Mods",
|
||||
Alpha = 0,
|
||||
},
|
||||
};
|
||||
|
||||
tabs.Current.ValueChanged += _ => invokeOnFilter();
|
||||
modsCheckbox.Current.ValueChanged += _ => invokeOnFilter();
|
||||
}
|
||||
|
||||
[BackgroundDependencyLoader]
|
||||
private void load(OsuColour colour, OsuConfigManager config)
|
||||
{
|
||||
modsCheckbox.AccentColour = tabs.AccentColour = colour.YellowLight;
|
||||
|
||||
selectedTab = config.GetBindable<BeatmapDetailTab>(OsuSetting.BeatmapDetailTab);
|
||||
|
||||
tabs.Current.BindTo(selectedTab);
|
||||
tabs.Current.TriggerChange();
|
||||
}
|
||||
|
||||
private void invokeOnFilter()
|
||||
{
|
||||
OnFilter?.Invoke(tabs.Current.Value, modsCheckbox.Current.Value);
|
||||
|
||||
modsCheckbox.FadeTo(tabs.Current.Value == BeatmapDetailTab.Details ? 0 : 1, 200, Easing.OutQuint);
|
||||
}
|
||||
}
|
||||
|
||||
public enum BeatmapDetailTab
|
||||
|
@ -15,7 +15,7 @@
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite.Core" Version="2.2.4" />
|
||||
<PackageReference Include="Newtonsoft.Json" Version="12.0.2" />
|
||||
<PackageReference Include="ppy.osu.Game.Resources" Version="2019.702.0" />
|
||||
<PackageReference Include="ppy.osu.Framework" Version="2019.723.0" />
|
||||
<PackageReference Include="ppy.osu.Framework" Version="2019.726.1" />
|
||||
<PackageReference Include="SharpCompress" Version="0.23.0" />
|
||||
<PackageReference Include="NUnit" Version="3.12.0" />
|
||||
<PackageReference Include="SharpRaven" Version="2.4.0" />
|
||||
|
@ -105,8 +105,8 @@
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite.Core" Version="2.2.1" />
|
||||
<PackageReference Include="Newtonsoft.Json" Version="12.0.1" />
|
||||
<PackageReference Include="ppy.osu.Game.Resources" Version="2019.702.0" />
|
||||
<PackageReference Include="ppy.osu.Framework" Version="2019.723.0" />
|
||||
<PackageReference Include="ppy.osu.Framework.iOS" Version="2019.723.0" />
|
||||
<PackageReference Include="ppy.osu.Framework" Version="2019.726.1" />
|
||||
<PackageReference Include="ppy.osu.Framework.iOS" Version="2019.726.1" />
|
||||
<PackageReference Include="SharpCompress" Version="0.22.0" />
|
||||
<PackageReference Include="NUnit" Version="3.11.0" />
|
||||
<PackageReference Include="SharpRaven" Version="2.4.0" />
|
||||
|
@ -1,15 +1,25 @@
|
||||
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
||||
// See the LICENCE file in the repository root for full licence text.
|
||||
|
||||
using System.Threading.Tasks;
|
||||
using Foundation;
|
||||
using osu.Framework.iOS;
|
||||
using osu.Game;
|
||||
using UIKit;
|
||||
|
||||
namespace osu.iOS
|
||||
{
|
||||
[Register("AppDelegate")]
|
||||
public class AppDelegate : GameAppDelegate
|
||||
{
|
||||
protected override Framework.Game CreateGame() => new OsuGameIOS();
|
||||
private OsuGameIOS game;
|
||||
|
||||
protected override Framework.Game CreateGame() => game = new OsuGameIOS();
|
||||
|
||||
public override bool OpenUrl(UIApplication application, NSUrl url, string sourceApplication, NSObject annotation)
|
||||
{
|
||||
Task.Run(() => game.Import(url.Path));
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -40,5 +40,70 @@
|
||||
</array>
|
||||
<key>XSAppIconAssets</key>
|
||||
<string>Assets.xcassets/AppIcon.appiconset</string>
|
||||
<key>UTExportedTypeDeclarations</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>UTTypeConformsTo</key>
|
||||
<array>
|
||||
<string></string>
|
||||
</array>
|
||||
<key>UTTypeIdentifier</key>
|
||||
<string>sh.ppy.osu.items</string>
|
||||
<key>UTTypeTagSpecification</key>
|
||||
<dict/>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>UTTypeConformsTo</key>
|
||||
<array>
|
||||
<string>sh.ppy.osu.items</string>
|
||||
</array>
|
||||
<key>UTTypeIdentifier</key>
|
||||
<string>sh.ppy.osu.osr</string>
|
||||
<key>UTTypeTagSpecification</key>
|
||||
<dict>
|
||||
<key>public.filename-extension</key>
|
||||
<string>osr</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>UTTypeConformsTo</key>
|
||||
<array>
|
||||
<string>sh.ppy.osu.items</string>
|
||||
</array>
|
||||
<key>UTTypeIdentifier</key>
|
||||
<string>sh.ppy.osu.osk</string>
|
||||
<key>UTTypeTagSpecification</key>
|
||||
<dict>
|
||||
<key>public.filename-extension</key>
|
||||
<string>osk</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>UTTypeConformsTo</key>
|
||||
<array>
|
||||
<string>sh.ppy.osu.items</string>
|
||||
</array>
|
||||
<key>UTTypeIdentifier</key>
|
||||
<string>sh.ppy.osu.osz</string>
|
||||
<key>UTTypeTagSpecification</key>
|
||||
<dict>
|
||||
<key>public.filename-extension</key>
|
||||
<string>osz</string>
|
||||
</dict>
|
||||
</dict>
|
||||
</array>
|
||||
<key>CFBundleDocumentTypes</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>LSHandlerRank</key>
|
||||
<string>Owner</string>
|
||||
<key>CFBundleTypeName</key>
|
||||
<string>Supported osu! files</string>
|
||||
<key>LSItemContentTypes</key>
|
||||
<array>
|
||||
<string>sh.ppy.osu.items</string>
|
||||
</array>
|
||||
</dict>
|
||||
</array>
|
||||
</dict>
|
||||
</plist>
|
||||
|
Loading…
Reference in New Issue
Block a user