1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-15 06:42:56 +08:00

Merge pull request #171 from huoyaoyuan/improvements

Various improvements
This commit is contained in:
Dean Herbert 2016-11-16 12:00:55 +09:00 committed by GitHub
commit 42d2d39ade
7 changed files with 22 additions and 21 deletions

View File

@ -14,11 +14,8 @@ namespace osu.Desktop.Beatmaps.IO
/// </summary>
public class LegacyFilesystemReader : ArchiveReader
{
static LegacyFilesystemReader()
{
AddReader<LegacyFilesystemReader>((storage, path) => Directory.Exists(path));
}
public static void Register() => AddReader<LegacyFilesystemReader>((storage, path) => Directory.Exists(path));
private string basePath { get; set; }
private string[] beatmaps { get; set; }
private Beatmap firstMap { get; set; }
@ -50,10 +47,10 @@ namespace osu.Desktop.Beatmaps.IO
{
return firstMap.BeatmapInfo.Metadata;
}
public override void Dispose()
{
// no-op
}
}
}
}

View File

@ -4,6 +4,7 @@
using System;
using System.IO;
using System.Linq;
using osu.Desktop.Beatmaps.IO;
using osu.Framework;
using osu.Framework.Desktop;
using osu.Framework.Desktop.Platform;
@ -23,6 +24,8 @@ namespace osu.Desktop
[STAThread]
public static int Main(string[] args)
{
LegacyFilesystemReader.Register();
using (DesktopGameHost host = Host.GetSuitableHost(@"osu", true))
{
if (!host.IsPrimaryInstance)

View File

@ -57,7 +57,7 @@ namespace osu.Game.Graphics.UserInterface
}
protected set
{
if (displayedCount.Equals(value))
if (EqualityComparer<T>.Default.Equals(displayedCount, value))
return;
displayedCount = value;
DisplayedCountSpriteText.Text = FormatCount(value);

View File

@ -57,6 +57,7 @@ namespace osu.Game.Online.Chat.Display
{
Text = Message.Content,
TextSize = text_size,
AutoSizeAxes = Axes.Y,
RelativeSizeAxes = Axes.X,
}
}

View File

@ -16,7 +16,7 @@ namespace osu.Game.Overlays.Options.Audio
public VolumeOptions()
{
}
[BackgroundDependencyLoader]
private void load(OsuConfigManager config)
{
@ -25,7 +25,7 @@ namespace osu.Game.Overlays.Options.Audio
new SpriteText { Text = "Master: TODO slider" },
new SpriteText { Text = "Music: TODO slider" },
new SpriteText { Text = "Effect: TODO slider" },
new CheckBoxOption
ignoreHitsounds = new CheckBoxOption
{
LabelText = "Ignore beatmap hitsounds",
Bindable = config.GetBindable<bool>(OsuConfig.IgnoreBeatmapSamples)
@ -33,4 +33,4 @@ namespace osu.Game.Overlays.Options.Audio
};
}
}
}
}

View File

@ -23,28 +23,28 @@ namespace osu.Game.Overlays.Options.Input
Children = new Drawable[]
{
new SpriteText { Text = "Sensitivity: TODO slider" },
new CheckBoxOption
rawInput = new CheckBoxOption
{
LabelText = "Raw input",
Bindable = config.GetBindable<bool>(OsuConfig.RawInput)
},
new CheckBoxOption
mapRawInput = new CheckBoxOption
{
LabelText = "Map absolute raw input to the osu! window",
Bindable = config.GetBindable<bool>(OsuConfig.AbsoluteToOsuWindow)
},
new SpriteText { Text = "Confine mouse cursor: TODO dropdown" },
new CheckBoxOption
disableWheel = new CheckBoxOption
{
LabelText = "Disable mouse wheel in play mode",
Bindable = config.GetBindable<bool>(OsuConfig.MouseDisableWheel)
},
new CheckBoxOption
disableButtons = new CheckBoxOption
{
LabelText = "Disable mouse buttons in play mode",
Bindable = config.GetBindable<bool>(OsuConfig.MouseDisableButtons)
},
new CheckBoxOption
enableRipples = new CheckBoxOption
{
LabelText = "Cursor ripples",
Bindable = config.GetBindable<bool>(OsuConfig.CursorRipple)
@ -52,4 +52,4 @@ namespace osu.Game.Overlays.Options.Input
};
}
}
}
}

View File

@ -22,7 +22,7 @@ namespace osu.Game.Screens.Play
{
public class Player : OsuGameMode
{
const bool autoplay = false;
public bool Autoplay;
protected override BackgroundMode CreateBackground() => new BackgroundModeCustom(@"Backgrounds/bg4");
@ -57,7 +57,7 @@ namespace osu.Game.Screens.Play
break;
}
}
}
}
@ -125,7 +125,7 @@ namespace osu.Game.Screens.Play
hitRenderer.OnHit += delegate (HitObject h) { scoreOverlay.OnHit(h); };
hitRenderer.OnMiss += delegate (HitObject h) { scoreOverlay.OnMiss(h); };
if (autoplay)
if (Autoplay)
hitRenderer.Schedule(() => hitRenderer.DrawableObjects.ForEach(h => h.State = ArmedState.Armed));
Children = new Drawable[]
@ -148,4 +148,4 @@ namespace osu.Game.Screens.Play
playerClock.ProcessFrame();
}
}
}
}