Merge remote-tracking branch 'refs/remotes/ppy/master' into remove-comments-page

This commit is contained in:
Andrei Zavatski
2020-02-27 19:30:48 +03:00
7 changed files with 30 additions and 60 deletions

View File

@ -25,7 +25,6 @@
<DebugType>portable</DebugType> <DebugType>portable</DebugType>
<Optimize>False</Optimize> <Optimize>False</Optimize>
<DefineConstants>DEBUG;TRACE</DefineConstants> <DefineConstants>DEBUG;TRACE</DefineConstants>
<EnableLLVM>false</EnableLLVM>
<AndroidManagedSymbols>false</AndroidManagedSymbols> <AndroidManagedSymbols>false</AndroidManagedSymbols>
<AndroidUseSharedRuntime>true</AndroidUseSharedRuntime> <AndroidUseSharedRuntime>true</AndroidUseSharedRuntime>
<EmbedAssembliesIntoApk>false</EmbedAssembliesIntoApk> <EmbedAssembliesIntoApk>false</EmbedAssembliesIntoApk>
@ -34,7 +33,6 @@
<DebugSymbols>false</DebugSymbols> <DebugSymbols>false</DebugSymbols>
<DebugType>None</DebugType> <DebugType>None</DebugType>
<Optimize>True</Optimize> <Optimize>True</Optimize>
<EnableLLVM>true</EnableLLVM>
<AndroidManagedSymbols>false</AndroidManagedSymbols> <AndroidManagedSymbols>false</AndroidManagedSymbols>
<AndroidUseSharedRuntime>False</AndroidUseSharedRuntime> <AndroidUseSharedRuntime>False</AndroidUseSharedRuntime>
<EmbedAssembliesIntoApk>true</EmbedAssembliesIntoApk> <EmbedAssembliesIntoApk>true</EmbedAssembliesIntoApk>

View File

@ -13,6 +13,7 @@
<AssemblyName>osu.Android</AssemblyName> <AssemblyName>osu.Android</AssemblyName>
<AndroidManifest>Properties\AndroidManifest.xml</AndroidManifest> <AndroidManifest>Properties\AndroidManifest.xml</AndroidManifest>
<AndroidSupportedAbis>armeabi-v7a;x86;arm64-v8a</AndroidSupportedAbis> <AndroidSupportedAbis>armeabi-v7a;x86;arm64-v8a</AndroidSupportedAbis>
<EnableLLVM>false</EnableLLVM> <!-- This currently causes random lockups during gameplay. https://github.com/mono/mono/issues/18973 -->
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<MandroidI18n>cjk;mideast;other;rare;west</MandroidI18n> <MandroidI18n>cjk;mideast;other;rare;west</MandroidI18n>

View File

@ -7,6 +7,8 @@ using NUnit.Framework;
using osu.Framework.Graphics; using osu.Framework.Graphics;
using osu.Game.Overlays.Comments; using osu.Game.Overlays.Comments;
using osu.Game.Online.API.Requests.Responses; using osu.Game.Online.API.Requests.Responses;
using osu.Framework.Allocation;
using osu.Game.Overlays;
namespace osu.Game.Tests.Visual.Online namespace osu.Game.Tests.Visual.Online
{ {
@ -18,6 +20,9 @@ namespace osu.Game.Tests.Visual.Online
typeof(VotePill) typeof(VotePill)
}; };
[Cached]
private readonly OverlayColourProvider colourProvider = new OverlayColourProvider(OverlayColourScheme.Blue);
private VotePill votePill; private VotePill votePill;
[Test] [Test]

View File

@ -33,6 +33,9 @@ namespace osu.Game.Overlays.Comments
[Resolved] [Resolved]
private IAPIProvider api { get; set; } private IAPIProvider api { get; set; }
[Resolved]
private OverlayColourProvider colourProvider { get; set; }
private readonly Comment comment; private readonly Comment comment;
private Box background; private Box background;
private Box hoverLayer; private Box hoverLayer;
@ -68,7 +71,7 @@ namespace osu.Game.Overlays.Comments
base.LoadComplete(); base.LoadComplete();
isVoted.Value = comment.IsVoted; isVoted.Value = comment.IsVoted;
votesCount.Value = comment.VotesCount; votesCount.Value = comment.VotesCount;
isVoted.BindValueChanged(voted => background.Colour = voted.NewValue ? AccentColour : OsuColour.Gray(0.05f), true); isVoted.BindValueChanged(voted => background.Colour = voted.NewValue ? AccentColour : colourProvider.Background6, true);
votesCount.BindValueChanged(count => votesCounter.Text = $"+{count.NewValue}", true); votesCount.BindValueChanged(count => votesCounter.Text = $"+{count.NewValue}", true);
} }

View File

@ -221,18 +221,6 @@ namespace osu.Game.Rulesets.Objects.Drawables
/// </summary> /// </summary>
public event Action<DrawableHitObject, ArmedState> ApplyCustomUpdateState; public event Action<DrawableHitObject, ArmedState> ApplyCustomUpdateState;
#pragma warning disable 618 // (legacy state management) - can be removed 20200227
/// <summary>
/// Enables automatic transform management of this hitobject. Implementation of transforms should be done in <see cref="UpdateInitialTransforms"/> and <see cref="UpdateStateTransforms"/> only. Rewinding and removing previous states is done automatically.
/// </summary>
/// <remarks>
/// Going forward, this is the preferred way of implementing <see cref="DrawableHitObject"/>s. Previous functionality
/// is offered as a compatibility layer until all rulesets have been migrated across.
/// </remarks>
[Obsolete("Use UpdateInitialTransforms()/UpdateStateTransforms() instead")] // can be removed 20200227
protected virtual bool UseTransformStateManagement => true;
protected override void ClearInternal(bool disposeChildren = true) => throw new InvalidOperationException($"Should never clear a {nameof(DrawableHitObject)}"); protected override void ClearInternal(bool disposeChildren = true) => throw new InvalidOperationException($"Should never clear a {nameof(DrawableHitObject)}");
private void updateState(ArmedState newState, bool force = false) private void updateState(ArmedState newState, bool force = false)
@ -240,8 +228,6 @@ namespace osu.Game.Rulesets.Objects.Drawables
if (State.Value == newState && !force) if (State.Value == newState && !force)
return; return;
if (UseTransformStateManagement)
{
LifetimeEnd = double.MaxValue; LifetimeEnd = double.MaxValue;
double transformTime = HitObject.StartTime - InitialLifetimeOffset; double transformTime = HitObject.StartTime - InitialLifetimeOffset;
@ -264,11 +250,6 @@ namespace osu.Game.Rulesets.Objects.Drawables
if (state.Value != ArmedState.Idle && LifetimeEnd == double.MaxValue || HitObject.HitWindows == null) if (state.Value != ArmedState.Idle && LifetimeEnd == double.MaxValue || HitObject.HitWindows == null)
Expire(); Expire();
}
else
state.Value = newState;
UpdateState(newState);
// apply any custom state overrides // apply any custom state overrides
ApplyCustomUpdateState?.Invoke(this, newState); ApplyCustomUpdateState?.Invoke(this, newState);
@ -303,30 +284,14 @@ namespace osu.Game.Rulesets.Objects.Drawables
public override void ClearTransformsAfter(double time, bool propagateChildren = false, string targetMember = null) public override void ClearTransformsAfter(double time, bool propagateChildren = false, string targetMember = null)
{ {
// When we are using automatic state management, parent calls to this should be blocked for safety. // Parent calls to this should be blocked for safety, as we are manually handling this in updateState.
if (!UseTransformStateManagement)
base.ClearTransformsAfter(time, propagateChildren, targetMember);
} }
public override void ApplyTransformsAt(double time, bool propagateChildren = false) public override void ApplyTransformsAt(double time, bool propagateChildren = false)
{ {
// When we are using automatic state management, parent calls to this should be blocked for safety. // Parent calls to this should be blocked for safety, as we are manually handling this in updateState.
if (!UseTransformStateManagement)
base.ApplyTransformsAt(time, propagateChildren);
} }
/// <summary>
/// Legacy method to handle state changes.
/// Should generally not be used when <see cref="UseTransformStateManagement"/> is true; use <see cref="UpdateStateTransforms"/> instead.
/// </summary>
/// <param name="state">The new armed state.</param>
[Obsolete("Use UpdateInitialTransforms()/UpdateStateTransforms() instead")] // can be removed 20200227
protected virtual void UpdateState(ArmedState state)
{
}
#pragma warning restore 618
#endregion #endregion
protected sealed override void SkinChanged(ISkinSource skin, bool allowFallback) protected sealed override void SkinChanged(ISkinSource skin, bool allowFallback)

View File

@ -49,9 +49,6 @@
<DeviceSpecificBuild>true</DeviceSpecificBuild> <DeviceSpecificBuild>true</DeviceSpecificBuild>
<IOSDebuggerPort>28126</IOSDebuggerPort> <IOSDebuggerPort>28126</IOSDebuggerPort>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|iPhone' ">
<MtouchUseLlvm>true</MtouchUseLlvm>
</PropertyGroup>
<ItemGroup> <ItemGroup>
<NativeReference Include="$(OutputPath)\libbass.a;$(OutputPath)\libbass_fx.a"> <NativeReference Include="$(OutputPath)\libbass.a;$(OutputPath)\libbass_fx.a">
<Kind>Static</Kind> <Kind>Static</Kind>

View File

@ -7,6 +7,7 @@
<ProjectGuid>{3F082D0B-A964-43D7-BDF7-C256D76A50D0}</ProjectGuid> <ProjectGuid>{3F082D0B-A964-43D7-BDF7-C256D76A50D0}</ProjectGuid>
<RootNamespace>osu.iOS</RootNamespace> <RootNamespace>osu.iOS</RootNamespace>
<AssemblyName>osu.iOS</AssemblyName> <AssemblyName>osu.iOS</AssemblyName>
<MtouchUseLlvm>false</MtouchUseLlvm> <!-- This currently causes random lockups during gameplay. https://github.com/mono/mono/issues/18973 -->
</PropertyGroup> </PropertyGroup>
<Import Project="..\osu.iOS.props" /> <Import Project="..\osu.iOS.props" />
<ItemGroup> <ItemGroup>