mirror of
https://github.com/ppy/osu.git
synced 2024-11-11 20:07:29 +08:00
Merge https://github.com/ppy/osu into mod-overlay
This commit is contained in:
commit
367d6d694c
@ -1 +1 @@
|
||||
Subproject commit b0613241512e46eed9dc16ae08ed4064d2db4101
|
||||
Subproject commit 4c0762eec20d2a3063df908a49432326570bea9f
|
@ -54,9 +54,6 @@
|
||||
<Reference Include="SQLite.Net.Platform.Generic">
|
||||
<HintPath>$(SolutionDir)\packages\SQLite.Net-PCL.3.1.1\lib\net40\SQLite.Net.Platform.Generic.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="OpenTK">
|
||||
<HintPath>$(SolutionDir)\packages\ppy.OpenTK.2.0.50727.1339\lib\net45\OpenTK.dll</HintPath>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="BenchmarkTest.cs" />
|
||||
|
@ -14,6 +14,7 @@ namespace osu.Game.Modes.Osu.Objects.Drawables.Pieces
|
||||
public TrianglesPiece()
|
||||
{
|
||||
TriangleScale = 1.2f;
|
||||
HideAlphaDiscrepancies = false;
|
||||
}
|
||||
|
||||
protected override void Update()
|
||||
|
@ -27,11 +27,14 @@ namespace osu.Game.Configuration
|
||||
Set(OsuConfig.DimLevel, 30, 0, 100);
|
||||
|
||||
Set(OsuConfig.MouseDisableButtons, false);
|
||||
Set(OsuConfig.MouseDisableWheel, false);
|
||||
|
||||
Set(OsuConfig.SnakingInSliders, true);
|
||||
Set(OsuConfig.SnakingOutSliders, false);
|
||||
|
||||
Set(OsuConfig.MenuParallax, true);
|
||||
|
||||
Set(OsuConfig.KeyOverlay, false);
|
||||
//todo: implement all settings below this line (remove the Disabled set when doing so).
|
||||
|
||||
Set(OsuConfig.MouseSpeed, 1.0).Disabled = true;
|
||||
@ -79,7 +82,6 @@ namespace osu.Game.Configuration
|
||||
Set(OsuConfig.IgnoreBeatmapSamples, false).Disabled = true;
|
||||
Set(OsuConfig.IgnoreBeatmapSkins, false).Disabled = true;
|
||||
Set(OsuConfig.IgnoreList, string.Empty).Disabled = true;
|
||||
Set(OsuConfig.KeyOverlay, false).Disabled = true;
|
||||
Set(OsuConfig.Language, @"unknown").Disabled = true;
|
||||
Set(OsuConfig.AllowNowPlayingHighlights, false).Disabled = true;
|
||||
Set(OsuConfig.LastVersion, string.Empty).Disabled = true;
|
||||
@ -99,7 +101,6 @@ namespace osu.Game.Configuration
|
||||
Set(OsuConfig.UsePerBeatmapManiaSpeed, true).Disabled = true;
|
||||
Set(OsuConfig.ManiaSpeedBPMScale, true).Disabled = true;
|
||||
Set(OsuConfig.MenuTip, 0).Disabled = true;
|
||||
Set(OsuConfig.MouseDisableWheel, false).Disabled = true;
|
||||
Set(OsuConfig.MouseSpeed, 1, 0.4, 6).Disabled = true;
|
||||
Set(OsuConfig.Offset, 0, -300, 300).Disabled = true;
|
||||
Set(OsuConfig.ScoreMeterScale, 1, 0.5, 2).Disabled = true;
|
||||
|
@ -10,6 +10,7 @@ using osu.Framework.MathUtils;
|
||||
using OpenTK;
|
||||
using OpenTK.Graphics;
|
||||
using System;
|
||||
using osu.Framework.Graphics.Colour;
|
||||
|
||||
namespace osu.Game.Graphics.Backgrounds
|
||||
{
|
||||
@ -37,6 +38,13 @@ namespace osu.Game.Graphics.Backgrounds
|
||||
|
||||
private float triangleScale = 1;
|
||||
|
||||
/// <summary>
|
||||
/// Whether we should drop-off alpha values of triangles more quickly to improve
|
||||
/// the visual appearance of fading. This defaults to on as it is generally more
|
||||
/// aesthetically pleasing, but should be turned off in <see cref="BufferedContainer{T}"/>s.
|
||||
/// </summary>
|
||||
public bool HideAlphaDiscrepancies = true;
|
||||
|
||||
public float TriangleScale
|
||||
{
|
||||
get { return triangleScale; }
|
||||
@ -63,8 +71,14 @@ namespace osu.Game.Graphics.Backgrounds
|
||||
{
|
||||
base.Update();
|
||||
|
||||
float adjustedAlpha = HideAlphaDiscrepancies ?
|
||||
// Cubically scale alpha to make it drop off more sharply.
|
||||
(float)Math.Pow(DrawInfo.Colour.AverageColour.Linear.A, 3) :
|
||||
1;
|
||||
|
||||
foreach (var t in Children)
|
||||
{
|
||||
t.Alpha = adjustedAlpha;
|
||||
t.Position -= new Vector2(0, (float)(t.Scale.X * (50 / DrawHeight) * (Time.Elapsed / 950)) / triangleScale);
|
||||
if (ExpireOffScreenTriangles && t.DrawPosition.Y + t.DrawSize.Y * t.Scale.Y < 0)
|
||||
t.Expire();
|
||||
|
@ -9,6 +9,9 @@ using osu.Game.Modes.Objects;
|
||||
using OpenTK;
|
||||
using osu.Framework.Graphics.Primitives;
|
||||
using osu.Game.Screens.Play;
|
||||
using osu.Framework.Allocation;
|
||||
using osu.Game.Configuration;
|
||||
using osu.Framework.Configuration;
|
||||
|
||||
namespace osu.Game.Modes.UI
|
||||
{
|
||||
@ -21,6 +24,8 @@ namespace osu.Game.Modes.UI
|
||||
public HealthDisplay HealthDisplay;
|
||||
public Score Score { get; set; }
|
||||
|
||||
private Bindable<bool> showKeyCounter;
|
||||
|
||||
protected abstract KeyCounterCollection CreateKeyCounter();
|
||||
protected abstract ComboCounter CreateComboCounter();
|
||||
protected abstract PercentageCounter CreateAccuracyCounter();
|
||||
@ -58,6 +63,22 @@ namespace osu.Game.Modes.UI
|
||||
};
|
||||
}
|
||||
|
||||
[BackgroundDependencyLoader]
|
||||
private void load(OsuConfigManager config)
|
||||
{
|
||||
showKeyCounter = config.GetBindable<bool>(OsuConfig.KeyOverlay);
|
||||
showKeyCounter.ValueChanged += visibilityChanged;
|
||||
showKeyCounter.TriggerChange();
|
||||
}
|
||||
|
||||
private void visibilityChanged(object sender, EventArgs e)
|
||||
{
|
||||
if (showKeyCounter)
|
||||
KeyCounter.Show();
|
||||
else
|
||||
KeyCounter.Hide();
|
||||
}
|
||||
|
||||
public void BindProcessor(ScoreProcessor processor)
|
||||
{
|
||||
//bind processor bindables to combocounter, score display etc.
|
||||
|
@ -24,6 +24,7 @@ using OpenTK.Graphics;
|
||||
using osu.Framework.Graphics.Containers;
|
||||
using osu.Framework.Graphics.Transforms;
|
||||
using osu.Framework.Logging;
|
||||
using osu.Framework.Input;
|
||||
|
||||
namespace osu.Game.Screens.Play
|
||||
{
|
||||
@ -72,6 +73,8 @@ namespace osu.Game.Screens.Play
|
||||
private void load(AudioManager audio, BeatmapDatabase beatmaps, OsuGameBase game, OsuConfigManager config)
|
||||
{
|
||||
dimLevel = config.GetBindable<int>(OsuConfig.DimLevel);
|
||||
mouseWheelDisabled = config.GetBindable<bool>(OsuConfig.MouseDisableWheel);
|
||||
|
||||
try
|
||||
{
|
||||
if (Beatmap == null)
|
||||
@ -325,5 +328,9 @@ namespace osu.Game.Screens.Play
|
||||
{
|
||||
Background?.FadeTo((100f - dimLevel) / 100, 800);
|
||||
}
|
||||
|
||||
private Bindable<bool> mouseWheelDisabled;
|
||||
|
||||
protected override bool OnWheel(InputState state) => mouseWheelDisabled.Value && !isPaused;
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user