mirror of
https://github.com/ppy/osu.git
synced 2025-02-14 01:42:59 +08:00
Merge remote-tracking branch 'refs/remotes/ppy/master' into remove-comments-page
This commit is contained in:
commit
62b4fa602f
@ -25,7 +25,6 @@
|
||||
<DebugType>portable</DebugType>
|
||||
<Optimize>False</Optimize>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<EnableLLVM>false</EnableLLVM>
|
||||
<AndroidManagedSymbols>false</AndroidManagedSymbols>
|
||||
<AndroidUseSharedRuntime>true</AndroidUseSharedRuntime>
|
||||
<EmbedAssembliesIntoApk>false</EmbedAssembliesIntoApk>
|
||||
@ -34,7 +33,6 @@
|
||||
<DebugSymbols>false</DebugSymbols>
|
||||
<DebugType>None</DebugType>
|
||||
<Optimize>True</Optimize>
|
||||
<EnableLLVM>true</EnableLLVM>
|
||||
<AndroidManagedSymbols>false</AndroidManagedSymbols>
|
||||
<AndroidUseSharedRuntime>False</AndroidUseSharedRuntime>
|
||||
<EmbedAssembliesIntoApk>true</EmbedAssembliesIntoApk>
|
||||
|
@ -13,6 +13,7 @@
|
||||
<AssemblyName>osu.Android</AssemblyName>
|
||||
<AndroidManifest>Properties\AndroidManifest.xml</AndroidManifest>
|
||||
<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 Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<MandroidI18n>cjk;mideast;other;rare;west</MandroidI18n>
|
||||
@ -52,4 +53,4 @@
|
||||
<AndroidResource Include="Resources\drawable\lazer.png" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildExtensionsPath)\Xamarin\Android\Xamarin.Android.CSharp.targets" />
|
||||
</Project>
|
||||
</Project>
|
||||
|
@ -7,6 +7,8 @@ using NUnit.Framework;
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Game.Overlays.Comments;
|
||||
using osu.Game.Online.API.Requests.Responses;
|
||||
using osu.Framework.Allocation;
|
||||
using osu.Game.Overlays;
|
||||
|
||||
namespace osu.Game.Tests.Visual.Online
|
||||
{
|
||||
@ -18,6 +20,9 @@ namespace osu.Game.Tests.Visual.Online
|
||||
typeof(VotePill)
|
||||
};
|
||||
|
||||
[Cached]
|
||||
private readonly OverlayColourProvider colourProvider = new OverlayColourProvider(OverlayColourScheme.Blue);
|
||||
|
||||
private VotePill votePill;
|
||||
|
||||
[Test]
|
||||
|
@ -33,6 +33,9 @@ namespace osu.Game.Overlays.Comments
|
||||
[Resolved]
|
||||
private IAPIProvider api { get; set; }
|
||||
|
||||
[Resolved]
|
||||
private OverlayColourProvider colourProvider { get; set; }
|
||||
|
||||
private readonly Comment comment;
|
||||
private Box background;
|
||||
private Box hoverLayer;
|
||||
@ -68,7 +71,7 @@ namespace osu.Game.Overlays.Comments
|
||||
base.LoadComplete();
|
||||
isVoted.Value = comment.IsVoted;
|
||||
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);
|
||||
}
|
||||
|
||||
|
@ -221,18 +221,6 @@ namespace osu.Game.Rulesets.Objects.Drawables
|
||||
/// </summary>
|
||||
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)}");
|
||||
|
||||
private void updateState(ArmedState newState, bool force = false)
|
||||
@ -240,35 +228,28 @@ namespace osu.Game.Rulesets.Objects.Drawables
|
||||
if (State.Value == newState && !force)
|
||||
return;
|
||||
|
||||
if (UseTransformStateManagement)
|
||||
LifetimeEnd = double.MaxValue;
|
||||
|
||||
double transformTime = HitObject.StartTime - InitialLifetimeOffset;
|
||||
|
||||
base.ApplyTransformsAt(double.MinValue, true);
|
||||
base.ClearTransformsAfter(double.MinValue, true);
|
||||
|
||||
using (BeginAbsoluteSequence(transformTime, true))
|
||||
{
|
||||
LifetimeEnd = double.MaxValue;
|
||||
UpdateInitialTransforms();
|
||||
|
||||
double transformTime = HitObject.StartTime - InitialLifetimeOffset;
|
||||
var judgementOffset = Result?.TimeOffset ?? 0;
|
||||
|
||||
base.ApplyTransformsAt(double.MinValue, true);
|
||||
base.ClearTransformsAfter(double.MinValue, true);
|
||||
|
||||
using (BeginAbsoluteSequence(transformTime, true))
|
||||
using (BeginDelayedSequence(InitialLifetimeOffset + judgementOffset, true))
|
||||
{
|
||||
UpdateInitialTransforms();
|
||||
|
||||
var judgementOffset = Result?.TimeOffset ?? 0;
|
||||
|
||||
using (BeginDelayedSequence(InitialLifetimeOffset + judgementOffset, true))
|
||||
{
|
||||
UpdateStateTransforms(newState);
|
||||
state.Value = newState;
|
||||
}
|
||||
UpdateStateTransforms(newState);
|
||||
state.Value = newState;
|
||||
}
|
||||
|
||||
if (state.Value != ArmedState.Idle && LifetimeEnd == double.MaxValue || HitObject.HitWindows == null)
|
||||
Expire();
|
||||
}
|
||||
else
|
||||
state.Value = newState;
|
||||
|
||||
UpdateState(newState);
|
||||
if (state.Value != ArmedState.Idle && LifetimeEnd == double.MaxValue || HitObject.HitWindows == null)
|
||||
Expire();
|
||||
|
||||
// apply any custom state overrides
|
||||
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)
|
||||
{
|
||||
// When we are using automatic state management, parent calls to this should be blocked for safety.
|
||||
if (!UseTransformStateManagement)
|
||||
base.ClearTransformsAfter(time, propagateChildren, targetMember);
|
||||
// Parent calls to this should be blocked for safety, as we are manually handling this in updateState.
|
||||
}
|
||||
|
||||
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.
|
||||
if (!UseTransformStateManagement)
|
||||
base.ApplyTransformsAt(time, propagateChildren);
|
||||
// Parent calls to this should be blocked for safety, as we are manually handling this in updateState.
|
||||
}
|
||||
|
||||
/// <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
|
||||
|
||||
protected sealed override void SkinChanged(ISkinSource skin, bool allowFallback)
|
||||
|
@ -49,9 +49,6 @@
|
||||
<DeviceSpecificBuild>true</DeviceSpecificBuild>
|
||||
<IOSDebuggerPort>28126</IOSDebuggerPort>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|iPhone' ">
|
||||
<MtouchUseLlvm>true</MtouchUseLlvm>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<NativeReference Include="$(OutputPath)\libbass.a;$(OutputPath)\libbass_fx.a">
|
||||
<Kind>Static</Kind>
|
||||
|
@ -7,6 +7,7 @@
|
||||
<ProjectGuid>{3F082D0B-A964-43D7-BDF7-C256D76A50D0}</ProjectGuid>
|
||||
<RootNamespace>osu.iOS</RootNamespace>
|
||||
<AssemblyName>osu.iOS</AssemblyName>
|
||||
<MtouchUseLlvm>false</MtouchUseLlvm> <!-- This currently causes random lockups during gameplay. https://github.com/mono/mono/issues/18973 -->
|
||||
</PropertyGroup>
|
||||
<Import Project="..\osu.iOS.props" />
|
||||
<ItemGroup>
|
||||
@ -116,4 +117,4 @@
|
||||
</ImageAsset>
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildExtensionsPath)\Xamarin\iOS\Xamarin.iOS.CSharp.targets" />
|
||||
</Project>
|
||||
</Project>
|
||||
|
Loading…
Reference in New Issue
Block a user