mirror of
https://github.com/ppy/osu.git
synced 2025-01-27 11:12:59 +08:00
Merge remote-tracking branch 'refs/remotes/ppy/master' into hud_visibility
This commit is contained in:
commit
009909dd4b
@ -1 +1 @@
|
|||||||
Subproject commit 1c08c1fec496e9d64ba8f30ff0464cd5cdf567b6
|
Subproject commit e9b388934ed77cbc1af3cdfd213eb754f71554ae
|
@ -1 +1 @@
|
|||||||
Subproject commit 12bbab717d372dadbd3220d38da862276ac97e98
|
Subproject commit 0d6dc294738d433999c6c68ff61169d3a8e6ce5f
|
@ -3,15 +3,12 @@
|
|||||||
|
|
||||||
using osu.Framework.Testing;
|
using osu.Framework.Testing;
|
||||||
using osu.Framework.Graphics.Containers;
|
using osu.Framework.Graphics.Containers;
|
||||||
using osu.Framework.Threading;
|
|
||||||
using osu.Game.Overlays;
|
using osu.Game.Overlays;
|
||||||
|
|
||||||
namespace osu.Desktop.VisualTests.Tests
|
namespace osu.Desktop.VisualTests.Tests
|
||||||
{
|
{
|
||||||
internal class TestCaseChatDisplay : TestCase
|
internal class TestCaseChatDisplay : TestCase
|
||||||
{
|
{
|
||||||
private ScheduledDelegate messageRequest;
|
|
||||||
|
|
||||||
public override string Description => @"Testing chat api and overlay";
|
public override string Description => @"Testing chat api and overlay";
|
||||||
|
|
||||||
public override void Reset()
|
public override void Reset()
|
||||||
|
@ -112,7 +112,7 @@ namespace osu.Desktop.VisualTests.Tests
|
|||||||
Width = 150,
|
Width = 150,
|
||||||
Height = 10,
|
Height = 10,
|
||||||
SelectionColor = Color4.Orange,
|
SelectionColor = Color4.Orange,
|
||||||
Bindable = playbackSpeed
|
Value = playbackSpeed
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -57,7 +57,7 @@ namespace osu.Desktop.VisualTests.Tests
|
|||||||
Width = 150,
|
Width = 150,
|
||||||
Height = 10,
|
Height = 10,
|
||||||
SelectionColor = Color4.Orange,
|
SelectionColor = Color4.Orange,
|
||||||
Bindable = bindable
|
Value = bindable
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -14,7 +14,7 @@ namespace osu.Desktop.VisualTests.Tests
|
|||||||
{
|
{
|
||||||
internal class TestCasePlaySongSelect : TestCase
|
internal class TestCasePlaySongSelect : TestCase
|
||||||
{
|
{
|
||||||
private BeatmapDatabase db, oldDb;
|
private BeatmapDatabase db;
|
||||||
private TestStorage storage;
|
private TestStorage storage;
|
||||||
private PlaySongSelect songSelect;
|
private PlaySongSelect songSelect;
|
||||||
|
|
||||||
@ -44,13 +44,13 @@ namespace osu.Desktop.VisualTests.Tests
|
|||||||
AddStep(@"Sort by Difficulty", delegate { songSelect.FilterControl.Sort = SortMode.Difficulty; });
|
AddStep(@"Sort by Difficulty", delegate { songSelect.FilterControl.Sort = SortMode.Difficulty; });
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void Dispose(bool isDisposing)
|
//protected override void Dispose(bool isDisposing)
|
||||||
{
|
//{
|
||||||
if (oldDb != null)
|
// if (oldDb != null)
|
||||||
db = null;
|
// db = null;
|
||||||
|
|
||||||
base.Dispose(isDisposing);
|
// base.Dispose(isDisposing);
|
||||||
}
|
//}
|
||||||
|
|
||||||
private BeatmapSetInfo createTestBeatmapSet(int i)
|
private BeatmapSetInfo createTestBeatmapSet(int i)
|
||||||
{
|
{
|
||||||
|
@ -1,24 +1,15 @@
|
|||||||
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
|
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
|
||||||
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||||
|
|
||||||
using osu.Framework.Input.Handlers;
|
|
||||||
using osu.Game.Beatmaps;
|
using osu.Game.Beatmaps;
|
||||||
using osu.Game.Modes.Mods;
|
using osu.Game.Modes.Mods;
|
||||||
using osu.Game.Modes.Osu.Mods;
|
using osu.Game.Modes.Osu.Mods;
|
||||||
using osu.Game.Screens.Play;
|
using osu.Game.Screens.Play;
|
||||||
using System;
|
|
||||||
using System.IO;
|
|
||||||
|
|
||||||
namespace osu.Desktop.VisualTests.Tests
|
namespace osu.Desktop.VisualTests.Tests
|
||||||
{
|
{
|
||||||
internal class TestCaseReplay : TestCasePlayer
|
internal class TestCaseReplay : TestCasePlayer
|
||||||
{
|
{
|
||||||
private WorkingBeatmap beatmap;
|
|
||||||
|
|
||||||
private InputHandler replay;
|
|
||||||
|
|
||||||
private Func<Stream> getReplayStream;
|
|
||||||
|
|
||||||
public override string Description => @"Testing replay playback.";
|
public override string Description => @"Testing replay playback.";
|
||||||
|
|
||||||
protected override Player CreatePlayer(WorkingBeatmap beatmap)
|
protected override Player CreatePlayer(WorkingBeatmap beatmap)
|
||||||
|
@ -22,8 +22,6 @@ namespace osu.Desktop.VisualTests.Tests
|
|||||||
|
|
||||||
int numerator = 0, denominator = 0;
|
int numerator = 0, denominator = 0;
|
||||||
|
|
||||||
bool maniaHold = false;
|
|
||||||
|
|
||||||
ScoreCounter score = new ScoreCounter(7)
|
ScoreCounter score = new ScoreCounter(7)
|
||||||
{
|
{
|
||||||
Origin = Anchor.TopRight,
|
Origin = Anchor.TopRight,
|
||||||
|
@ -36,9 +36,9 @@ namespace osu.Desktop.VisualTests.Tests
|
|||||||
filter.PinItem(GroupMode.All);
|
filter.PinItem(GroupMode.All);
|
||||||
filter.PinItem(GroupMode.RecentlyPlayed);
|
filter.PinItem(GroupMode.RecentlyPlayed);
|
||||||
|
|
||||||
filter.ItemChanged += (sender, mode) =>
|
filter.SelectedItem.ValueChanged += newFilter =>
|
||||||
{
|
{
|
||||||
text.Text = "Currently Selected: " + mode.ToString();
|
text.Text = "Currently Selected: " + newFilter.ToString();
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -22,8 +22,9 @@ namespace osu.Game.Beatmaps.Drawables
|
|||||||
public Action<BeatmapSetHeader> GainedSelection;
|
public Action<BeatmapSetHeader> GainedSelection;
|
||||||
private readonly SpriteText title;
|
private readonly SpriteText title;
|
||||||
private readonly SpriteText artist;
|
private readonly SpriteText artist;
|
||||||
private OsuConfigManager config;
|
|
||||||
private Bindable<bool> preferUnicode;
|
private Bindable<bool> preferUnicode;
|
||||||
|
|
||||||
private readonly WorkingBeatmap beatmap;
|
private readonly WorkingBeatmap beatmap;
|
||||||
private readonly FillFlowContainer difficultyIcons;
|
private readonly FillFlowContainer difficultyIcons;
|
||||||
|
|
||||||
@ -83,24 +84,13 @@ namespace osu.Game.Beatmaps.Drawables
|
|||||||
[BackgroundDependencyLoader]
|
[BackgroundDependencyLoader]
|
||||||
private void load(OsuConfigManager config)
|
private void load(OsuConfigManager config)
|
||||||
{
|
{
|
||||||
this.config = config;
|
|
||||||
|
|
||||||
preferUnicode = config.GetBindable<bool>(OsuConfig.ShowUnicode);
|
preferUnicode = config.GetBindable<bool>(OsuConfig.ShowUnicode);
|
||||||
preferUnicode.ValueChanged += preferUnicode_changed;
|
preferUnicode.ValueChanged += unicode =>
|
||||||
preferUnicode_changed(preferUnicode, null);
|
{
|
||||||
}
|
title.Text = unicode ? beatmap.BeatmapSetInfo.Metadata.TitleUnicode : beatmap.BeatmapSetInfo.Metadata.Title;
|
||||||
|
artist.Text = unicode ? beatmap.BeatmapSetInfo.Metadata.ArtistUnicode : beatmap.BeatmapSetInfo.Metadata.Artist;
|
||||||
private void preferUnicode_changed(object sender, EventArgs e)
|
};
|
||||||
{
|
preferUnicode.TriggerChange();
|
||||||
title.Text = config.GetUnicodeString(beatmap.BeatmapSetInfo.Metadata.Title, beatmap.BeatmapSetInfo.Metadata.TitleUnicode);
|
|
||||||
artist.Text = config.GetUnicodeString(beatmap.BeatmapSetInfo.Metadata.Artist, beatmap.BeatmapSetInfo.Metadata.ArtistUnicode);
|
|
||||||
}
|
|
||||||
|
|
||||||
protected override void Dispose(bool isDisposing)
|
|
||||||
{
|
|
||||||
if (preferUnicode != null)
|
|
||||||
preferUnicode.ValueChanged -= preferUnicode_changed;
|
|
||||||
base.Dispose(isDisposing);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private class PanelBackground : BufferedContainer
|
private class PanelBackground : BufferedContainer
|
||||||
|
@ -187,10 +187,6 @@ namespace osu.Game.Configuration
|
|||||||
#pragma warning restore CS0612 // Type or member is obsolete
|
#pragma warning restore CS0612 // Type or member is obsolete
|
||||||
}
|
}
|
||||||
|
|
||||||
//todo: make a UnicodeString class/struct rather than requiring this helper method.
|
|
||||||
public string GetUnicodeString(string nonunicode, string unicode)
|
|
||||||
=> Get<bool>(OsuConfig.ShowUnicode) ? unicode ?? nonunicode : nonunicode ?? unicode;
|
|
||||||
|
|
||||||
public OsuConfigManager(Storage storage) : base(storage)
|
public OsuConfigManager(Storage storage) : base(storage)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
@ -12,7 +12,6 @@ using osu.Framework.Graphics.Cursor;
|
|||||||
using osu.Framework.Graphics.Sprites;
|
using osu.Framework.Graphics.Sprites;
|
||||||
using osu.Framework.Input;
|
using osu.Framework.Input;
|
||||||
using osu.Game.Configuration;
|
using osu.Game.Configuration;
|
||||||
using System;
|
|
||||||
|
|
||||||
namespace osu.Game.Graphics.Cursor
|
namespace osu.Game.Graphics.Cursor
|
||||||
{
|
{
|
||||||
@ -116,14 +115,9 @@ namespace osu.Game.Graphics.Cursor
|
|||||||
};
|
};
|
||||||
|
|
||||||
cursorScale = config.GetBindable<double>(OsuConfig.GameplayCursorSize);
|
cursorScale = config.GetBindable<double>(OsuConfig.GameplayCursorSize);
|
||||||
cursorScale.ValueChanged += scaleChanged;
|
cursorScale.ValueChanged += newScale => cursorContainer.Scale = new Vector2((float)cursorScale);
|
||||||
cursorScale.TriggerChange();
|
cursorScale.TriggerChange();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void scaleChanged(object sender, EventArgs e)
|
|
||||||
{
|
|
||||||
cursorContainer.Scale = new Vector2((float)cursorScale);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -131,14 +131,9 @@ namespace osu.Game.Graphics.Cursor
|
|||||||
};
|
};
|
||||||
|
|
||||||
cursorScale = config.GetBindable<double>(OsuConfig.MenuCursorSize);
|
cursorScale = config.GetBindable<double>(OsuConfig.MenuCursorSize);
|
||||||
cursorScale.ValueChanged += scaleChanged;
|
cursorScale.ValueChanged += newScale => cursorContainer.Scale = new Vector2((float)newScale);
|
||||||
cursorScale.TriggerChange();
|
cursorScale.TriggerChange();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void scaleChanged(object sender, EventArgs e)
|
|
||||||
{
|
|
||||||
cursorContainer.Scale = new Vector2((float)cursorScale);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
|
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
|
||||||
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||||
|
|
||||||
using System;
|
|
||||||
using osu.Framework.Allocation;
|
using osu.Framework.Allocation;
|
||||||
using osu.Framework.Audio;
|
using osu.Framework.Audio;
|
||||||
using osu.Framework.Audio.Sample;
|
using osu.Framework.Audio.Sample;
|
||||||
@ -86,9 +85,9 @@ namespace osu.Game.Graphics.UserInterface
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
private void bindableValueChanged(object sender, EventArgs e)
|
private void bindableValueChanged(bool isChecked)
|
||||||
{
|
{
|
||||||
State = bindable.Value ? CheckboxState.Checked : CheckboxState.Unchecked;
|
State = isChecked ? CheckboxState.Checked : CheckboxState.Unchecked;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void Dispose(bool isDisposing)
|
protected override void Dispose(bool isDisposing)
|
||||||
|
@ -21,7 +21,7 @@ namespace osu.Game.Graphics.UserInterface
|
|||||||
{
|
{
|
||||||
protected override Dropdown<T> CreateDropdown() => new OsuTabDropdown();
|
protected override Dropdown<T> CreateDropdown() => new OsuTabDropdown();
|
||||||
|
|
||||||
protected override TabItem<T> CreateTabItem(T value) => new OsuTabItem { Value = value };
|
protected override TabItem<T> CreateTabItem(T value) => new OsuTabItem(value);
|
||||||
|
|
||||||
protected override bool InternalContains(Vector2 screenSpacePos) => base.InternalContains(screenSpacePos) || Dropdown.Contains(screenSpacePos);
|
protected override bool InternalContains(Vector2 screenSpacePos) => base.InternalContains(screenSpacePos) || Dropdown.Contains(screenSpacePos);
|
||||||
|
|
||||||
@ -75,16 +75,6 @@ namespace osu.Game.Graphics.UserInterface
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public new T Value
|
|
||||||
{
|
|
||||||
get { return base.Value; }
|
|
||||||
set
|
|
||||||
{
|
|
||||||
base.Value = value;
|
|
||||||
text.Text = (value as Enum)?.GetDescription();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public override bool Active
|
public override bool Active
|
||||||
{
|
{
|
||||||
get { return base.Active; }
|
get { return base.Active; }
|
||||||
@ -134,30 +124,31 @@ namespace osu.Game.Graphics.UserInterface
|
|||||||
AccentColour = colours.Blue;
|
AccentColour = colours.Blue;
|
||||||
}
|
}
|
||||||
|
|
||||||
public OsuTabItem()
|
public OsuTabItem(T value) : base(value)
|
||||||
{
|
{
|
||||||
AutoSizeAxes = Axes.X;
|
AutoSizeAxes = Axes.X;
|
||||||
RelativeSizeAxes = Axes.Y;
|
RelativeSizeAxes = Axes.Y;
|
||||||
|
|
||||||
Children = new Drawable[]
|
Children = new Drawable[]
|
||||||
{
|
{
|
||||||
text = new OsuSpriteText
|
text = new OsuSpriteText
|
||||||
{
|
{
|
||||||
Margin = new MarginPadding { Top = 5, Bottom = 5 },
|
Margin = new MarginPadding { Top = 5, Bottom = 5 },
|
||||||
Origin = Anchor.BottomLeft,
|
Origin = Anchor.BottomLeft,
|
||||||
Anchor = Anchor.BottomLeft,
|
Anchor = Anchor.BottomLeft,
|
||||||
TextSize = 14,
|
Text = (value as Enum)?.GetDescription(),
|
||||||
Font = @"Exo2.0-Bold", // Font should only turn bold when active?
|
TextSize = 14,
|
||||||
},
|
Font = @"Exo2.0-Bold", // Font should only turn bold when active?
|
||||||
box = new Box
|
},
|
||||||
{
|
box = new Box
|
||||||
RelativeSizeAxes = Axes.X,
|
{
|
||||||
Height = 1,
|
RelativeSizeAxes = Axes.X,
|
||||||
Alpha = 0,
|
Height = 1,
|
||||||
Colour = Color4.White,
|
Alpha = 0,
|
||||||
Origin = Anchor.BottomLeft,
|
Colour = Color4.White,
|
||||||
Anchor = Anchor.BottomLeft,
|
Origin = Anchor.BottomLeft,
|
||||||
}
|
Anchor = Anchor.BottomLeft,
|
||||||
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -98,13 +98,10 @@ namespace osu.Game.Graphics.UserInterface
|
|||||||
|
|
||||||
DisplayedCount = Current;
|
DisplayedCount = Current;
|
||||||
|
|
||||||
Current.ValueChanged += currentChanged;
|
Current.ValueChanged += newValue =>
|
||||||
}
|
{
|
||||||
|
if (IsLoaded) TransformCount(displayedCount, newValue);
|
||||||
private void currentChanged(object sender, EventArgs e)
|
};
|
||||||
{
|
|
||||||
if (IsLoaded)
|
|
||||||
TransformCount(displayedCount, Current);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void LoadComplete()
|
protected override void LoadComplete()
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
|
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
|
||||||
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||||
|
|
||||||
using System;
|
|
||||||
using osu.Framework.Graphics;
|
using osu.Framework.Graphics;
|
||||||
using osu.Framework.Graphics.Containers;
|
using osu.Framework.Graphics.Containers;
|
||||||
using osu.Framework.Input;
|
using osu.Framework.Input;
|
||||||
@ -19,7 +18,7 @@ namespace osu.Game.Graphics.UserInterface.Volume
|
|||||||
|
|
||||||
protected override bool HideOnEscape => false;
|
protected override bool HideOnEscape => false;
|
||||||
|
|
||||||
private void volumeChanged(object sender, EventArgs e)
|
private void volumeChanged(double newVolume)
|
||||||
{
|
{
|
||||||
Show();
|
Show();
|
||||||
schedulePopOut();
|
schedulePopOut();
|
||||||
|
@ -66,12 +66,7 @@ namespace osu.Game.Modes.UI
|
|||||||
|
|
||||||
TextSize = 80;
|
TextSize = 80;
|
||||||
|
|
||||||
Current.ValueChanged += comboChanged;
|
Current.ValueChanged += newValue => updateCount(newValue == 0);
|
||||||
}
|
|
||||||
|
|
||||||
private void comboChanged(object sender, System.EventArgs e)
|
|
||||||
{
|
|
||||||
updateCount(Current.Value == 0);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void LoadComplete()
|
protected override void LoadComplete()
|
||||||
|
@ -16,7 +16,7 @@ namespace osu.Game.Modes.UI
|
|||||||
|
|
||||||
protected HealthDisplay()
|
protected HealthDisplay()
|
||||||
{
|
{
|
||||||
Current.ValueChanged += (s, e) => SetHealth((float)Current);
|
Current.ValueChanged += newValue => SetHealth((float)newValue);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected abstract void SetHealth(float value);
|
protected abstract void SetHealth(float value);
|
||||||
|
@ -8,7 +8,6 @@ using osu.Framework.Graphics.Containers;
|
|||||||
using osu.Game.Configuration;
|
using osu.Game.Configuration;
|
||||||
using osu.Game.Graphics.UserInterface;
|
using osu.Game.Graphics.UserInterface;
|
||||||
using osu.Game.Screens.Play;
|
using osu.Game.Screens.Play;
|
||||||
using System;
|
|
||||||
using osu.Game.Modes.Scoring;
|
using osu.Game.Modes.Scoring;
|
||||||
using osu.Framework.Input;
|
using osu.Framework.Input;
|
||||||
using OpenTK.Input;
|
using OpenTK.Input;
|
||||||
@ -62,7 +61,13 @@ namespace osu.Game.Modes.UI
|
|||||||
private void load(OsuConfigManager config, NotificationManager notificationManager)
|
private void load(OsuConfigManager config, NotificationManager notificationManager)
|
||||||
{
|
{
|
||||||
showKeyCounter = config.GetBindable<bool>(OsuConfig.KeyOverlay);
|
showKeyCounter = config.GetBindable<bool>(OsuConfig.KeyOverlay);
|
||||||
showKeyCounter.ValueChanged += keyCounterVisibilityChanged;
|
showKeyCounter.ValueChanged += visibility =>
|
||||||
|
{
|
||||||
|
if (visibility)
|
||||||
|
KeyCounter.Show();
|
||||||
|
else
|
||||||
|
KeyCounter.Hide();
|
||||||
|
};
|
||||||
showKeyCounter.TriggerChange();
|
showKeyCounter.TriggerChange();
|
||||||
|
|
||||||
showHud = config.GetBindable<bool>(OsuConfig.ShowInterface);
|
showHud = config.GetBindable<bool>(OsuConfig.ShowInterface);
|
||||||
@ -80,14 +85,6 @@ namespace osu.Game.Modes.UI
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void keyCounterVisibilityChanged(object sender, EventArgs e)
|
|
||||||
{
|
|
||||||
if (showKeyCounter)
|
|
||||||
KeyCounter.Show();
|
|
||||||
else
|
|
||||||
KeyCounter.Hide();
|
|
||||||
}
|
|
||||||
|
|
||||||
private void hudVisibilityChanged(object sender, EventArgs e)
|
private void hudVisibilityChanged(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
if (showHud)
|
if (showHud)
|
||||||
@ -98,8 +95,6 @@ namespace osu.Game.Modes.UI
|
|||||||
|
|
||||||
public void BindProcessor(ScoreProcessor processor)
|
public void BindProcessor(ScoreProcessor processor)
|
||||||
{
|
{
|
||||||
//bind processor bindables to combocounter, score display etc.
|
|
||||||
//TODO: these should be bindable binds, not events!
|
|
||||||
ScoreCounter?.Current.BindTo(processor.TotalScore);
|
ScoreCounter?.Current.BindTo(processor.TotalScore);
|
||||||
AccuracyCounter?.Current.BindTo(processor.Accuracy);
|
AccuracyCounter?.Current.BindTo(processor.Accuracy);
|
||||||
ComboCounter?.Current.BindTo(processor.Combo);
|
ComboCounter?.Current.BindTo(processor.Combo);
|
||||||
|
@ -92,7 +92,10 @@ namespace osu.Game
|
|||||||
Fonts.AddStore(new GlyphStore(Resources, @"Fonts/Exo2.0-Medium"));
|
Fonts.AddStore(new GlyphStore(Resources, @"Fonts/Exo2.0-Medium"));
|
||||||
Fonts.AddStore(new GlyphStore(Resources, @"Fonts/Exo2.0-MediumItalic"));
|
Fonts.AddStore(new GlyphStore(Resources, @"Fonts/Exo2.0-MediumItalic"));
|
||||||
|
|
||||||
Fonts.AddStore(new GlyphStore(Resources, @"Fonts/Noto"));
|
Fonts.AddStore(new GlyphStore(Resources, @"Fonts/Noto-Basic"));
|
||||||
|
Fonts.AddStore(new GlyphStore(Resources, @"Fonts/Noto-Hangul"));
|
||||||
|
Fonts.AddStore(new GlyphStore(Resources, @"Fonts/Noto-CJK-Basic"));
|
||||||
|
Fonts.AddStore(new GlyphStore(Resources, @"Fonts/Noto-CJK-Compatibility"));
|
||||||
|
|
||||||
Fonts.AddStore(new GlyphStore(Resources, @"Fonts/Exo2.0-Regular"));
|
Fonts.AddStore(new GlyphStore(Resources, @"Fonts/Exo2.0-Regular"));
|
||||||
Fonts.AddStore(new GlyphStore(Resources, @"Fonts/Exo2.0-RegularItalic"));
|
Fonts.AddStore(new GlyphStore(Resources, @"Fonts/Exo2.0-RegularItalic"));
|
||||||
|
@ -39,9 +39,9 @@ namespace osu.Game.Overlays.Mods
|
|||||||
|
|
||||||
public readonly Bindable<PlayMode> PlayMode = new Bindable<PlayMode>();
|
public readonly Bindable<PlayMode> PlayMode = new Bindable<PlayMode>();
|
||||||
|
|
||||||
private void modeChanged(object sender, EventArgs eventArgs)
|
private void modeChanged(PlayMode newMode)
|
||||||
{
|
{
|
||||||
var ruleset = Ruleset.GetRuleset(PlayMode);
|
var ruleset = Ruleset.GetRuleset(newMode);
|
||||||
foreach (ModSection section in modSectionsContainer.Children)
|
foreach (ModSection section in modSectionsContainer.Children)
|
||||||
section.Buttons = ruleset.GetModsFor(section.ModType).Select(m => new ModButton(m)).ToArray();
|
section.Buttons = ruleset.GetModsFor(section.ModType).Select(m => new ModButton(m)).ToArray();
|
||||||
refreshSelectedMods();
|
refreshSelectedMods();
|
||||||
@ -56,7 +56,7 @@ namespace osu.Game.Overlays.Mods
|
|||||||
if (osu != null)
|
if (osu != null)
|
||||||
PlayMode.BindTo(osu.PlayMode);
|
PlayMode.BindTo(osu.PlayMode);
|
||||||
PlayMode.ValueChanged += modeChanged;
|
PlayMode.ValueChanged += modeChanged;
|
||||||
modeChanged(null, null);
|
PlayMode.TriggerChange();
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void PopOut()
|
protected override void PopOut()
|
||||||
|
@ -78,8 +78,6 @@ namespace osu.Game.Overlays
|
|||||||
[BackgroundDependencyLoader]
|
[BackgroundDependencyLoader]
|
||||||
private void load(OsuGameBase game, OsuConfigManager config, BeatmapDatabase beatmaps, OsuColour colours)
|
private void load(OsuGameBase game, OsuConfigManager config, BeatmapDatabase beatmaps, OsuColour colours)
|
||||||
{
|
{
|
||||||
unicodeString = config.GetUnicodeString;
|
|
||||||
|
|
||||||
Children = new Drawable[]
|
Children = new Drawable[]
|
||||||
{
|
{
|
||||||
dragContainer = new Container
|
dragContainer = new Container
|
||||||
@ -210,7 +208,7 @@ namespace osu.Game.Overlays
|
|||||||
this.beatmaps = beatmaps;
|
this.beatmaps = beatmaps;
|
||||||
trackManager = game.Audio.Track;
|
trackManager = game.Audio.Track;
|
||||||
preferUnicode = config.GetBindable<bool>(OsuConfig.ShowUnicode);
|
preferUnicode = config.GetBindable<bool>(OsuConfig.ShowUnicode);
|
||||||
preferUnicode.ValueChanged += preferUnicode_changed;
|
preferUnicode.ValueChanged += unicode => updateDisplay(current, TransformDirection.None);
|
||||||
|
|
||||||
beatmapSource = game.Beatmap ?? new Bindable<WorkingBeatmap>();
|
beatmapSource = game.Beatmap ?? new Bindable<WorkingBeatmap>();
|
||||||
playList = beatmaps.GetAllWithChildren<BeatmapSetInfo>();
|
playList = beatmaps.GetAllWithChildren<BeatmapSetInfo>();
|
||||||
@ -222,7 +220,8 @@ namespace osu.Game.Overlays
|
|||||||
protected override void LoadComplete()
|
protected override void LoadComplete()
|
||||||
{
|
{
|
||||||
beatmapSource.ValueChanged += workingChanged;
|
beatmapSource.ValueChanged += workingChanged;
|
||||||
workingChanged();
|
beatmapSource.TriggerChange();
|
||||||
|
|
||||||
base.LoadComplete();
|
base.LoadComplete();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -247,17 +246,12 @@ namespace osu.Game.Overlays
|
|||||||
playButton.Icon = FontAwesome.fa_play_circle_o;
|
playButton.Icon = FontAwesome.fa_play_circle_o;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void preferUnicode_changed(object sender, EventArgs e)
|
private void workingChanged(WorkingBeatmap beatmap)
|
||||||
{
|
{
|
||||||
updateDisplay(current, TransformDirection.None);
|
progress.IsEnabled = beatmap != null;
|
||||||
}
|
if (beatmap == current) return;
|
||||||
|
bool audioEquals = current?.BeatmapInfo?.AudioEquals(beatmap?.BeatmapInfo) ?? false;
|
||||||
private void workingChanged(object sender = null, EventArgs e = null)
|
current = beatmap;
|
||||||
{
|
|
||||||
progress.IsEnabled = beatmapSource.Value != null;
|
|
||||||
if (beatmapSource.Value == current) return;
|
|
||||||
bool audioEquals = current?.BeatmapInfo?.AudioEquals(beatmapSource?.Value?.BeatmapInfo) ?? false;
|
|
||||||
current = beatmapSource.Value;
|
|
||||||
updateDisplay(current, audioEquals ? TransformDirection.None : TransformDirection.Next);
|
updateDisplay(current, audioEquals ? TransformDirection.None : TransformDirection.Next);
|
||||||
appendToHistory(current?.BeatmapInfo);
|
appendToHistory(current?.BeatmapInfo);
|
||||||
}
|
}
|
||||||
@ -342,8 +336,8 @@ namespace osu.Game.Overlays
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
BeatmapMetadata metadata = beatmap.Beatmap.BeatmapInfo.Metadata;
|
BeatmapMetadata metadata = beatmap.Beatmap.BeatmapInfo.Metadata;
|
||||||
title.Text = unicodeString(metadata.Title, metadata.TitleUnicode);
|
title.Text = preferUnicode ? metadata.TitleUnicode : metadata.Title;
|
||||||
artist.Text = unicodeString(metadata.Artist, metadata.ArtistUnicode);
|
artist.Text = preferUnicode ? metadata.ArtistUnicode : metadata.Artist;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -374,21 +368,12 @@ namespace osu.Game.Overlays
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
private Func<string, string, string> unicodeString;
|
|
||||||
|
|
||||||
private void seek(float position)
|
private void seek(float position)
|
||||||
{
|
{
|
||||||
current?.Track?.Seek(current.Track.Length * position);
|
current?.Track?.Seek(current.Track.Length * position);
|
||||||
current?.Track?.Start();
|
current?.Track?.Start();
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void Dispose(bool isDisposing)
|
|
||||||
{
|
|
||||||
if (preferUnicode != null)
|
|
||||||
preferUnicode.ValueChanged -= preferUnicode_changed;
|
|
||||||
base.Dispose(isDisposing);
|
|
||||||
}
|
|
||||||
|
|
||||||
private const float transition_length = 800;
|
private const float transition_length = 800;
|
||||||
|
|
||||||
protected override void PopIn()
|
protected override void PopIn()
|
||||||
|
@ -29,10 +29,10 @@ namespace osu.Game.Overlays.Options
|
|||||||
|
|
||||||
public BindableNumber<T> Bindable
|
public BindableNumber<T> Bindable
|
||||||
{
|
{
|
||||||
get { return slider.Bindable; }
|
get { return slider.Value; }
|
||||||
set
|
set
|
||||||
{
|
{
|
||||||
slider.Bindable = value;
|
slider.Value = value;
|
||||||
if (value?.Disabled ?? true)
|
if (value?.Disabled ?? true)
|
||||||
Alpha = 0.3f;
|
Alpha = 0.3f;
|
||||||
}
|
}
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
|
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
|
||||||
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||||
|
|
||||||
using System;
|
|
||||||
using osu.Framework.Configuration;
|
using osu.Framework.Configuration;
|
||||||
using osu.Framework.Graphics.UserInterface;
|
using osu.Framework.Graphics.UserInterface;
|
||||||
using osu.Game.Graphics.UserInterface;
|
using osu.Game.Graphics.UserInterface;
|
||||||
@ -41,10 +40,7 @@ namespace osu.Game.Overlays.Options
|
|||||||
bindable.Value = Text;
|
bindable.Value = Text;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void bindableValueChanged(object sender, EventArgs e)
|
private void bindableValueChanged(string newValue) => Text = newValue;
|
||||||
{
|
|
||||||
Text = bindable.Value;
|
|
||||||
}
|
|
||||||
|
|
||||||
protected override void Dispose(bool isDisposing)
|
protected override void Dispose(bool isDisposing)
|
||||||
{
|
{
|
||||||
|
@ -5,7 +5,6 @@ using osu.Framework.Allocation;
|
|||||||
using osu.Framework.Configuration;
|
using osu.Framework.Configuration;
|
||||||
using osu.Framework.Graphics;
|
using osu.Framework.Graphics;
|
||||||
using osu.Game.Graphics.UserInterface;
|
using osu.Game.Graphics.UserInterface;
|
||||||
using System;
|
|
||||||
|
|
||||||
namespace osu.Game.Overlays.Options.Sections.Graphics
|
namespace osu.Game.Overlays.Options.Sections.Graphics
|
||||||
{
|
{
|
||||||
@ -52,9 +51,9 @@ namespace osu.Game.Overlays.Options.Sections.Graphics
|
|||||||
letterboxing.TriggerChange();
|
letterboxing.TriggerChange();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void visibilityChanged(object sender, EventArgs e)
|
private void visibilityChanged(bool newVisibility)
|
||||||
{
|
{
|
||||||
if (letterboxing)
|
if (newVisibility)
|
||||||
{
|
{
|
||||||
letterboxPositionX.Show();
|
letterboxPositionX.Show();
|
||||||
letterboxPositionY.Show();
|
letterboxPositionY.Show();
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
|
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
|
||||||
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||||
|
|
||||||
using System;
|
|
||||||
using osu.Framework.Allocation;
|
using osu.Framework.Allocation;
|
||||||
using osu.Framework.Configuration;
|
using osu.Framework.Configuration;
|
||||||
using osu.Framework.Screens;
|
using osu.Framework.Screens;
|
||||||
@ -40,11 +39,6 @@ namespace osu.Game.Screens
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void beatmap_ValueChanged(object sender, EventArgs e)
|
|
||||||
{
|
|
||||||
OnBeatmapChanged(beatmap.Value);
|
|
||||||
}
|
|
||||||
|
|
||||||
[BackgroundDependencyLoader(permitNulls: true)]
|
[BackgroundDependencyLoader(permitNulls: true)]
|
||||||
private void load(OsuGameBase game)
|
private void load(OsuGameBase game)
|
||||||
{
|
{
|
||||||
@ -57,7 +51,7 @@ namespace osu.Game.Screens
|
|||||||
beatmap.Value = localMap;
|
beatmap.Value = localMap;
|
||||||
}
|
}
|
||||||
|
|
||||||
beatmap.ValueChanged += beatmap_ValueChanged;
|
beatmap.ValueChanged += OnBeatmapChanged;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected virtual void OnBeatmapChanged(WorkingBeatmap beatmap)
|
protected virtual void OnBeatmapChanged(WorkingBeatmap beatmap)
|
||||||
|
@ -275,7 +275,8 @@ namespace osu.Game.Screens.Play
|
|||||||
Background?.FadeTo((100f - dimLevel) / 100, 1500, EasingTypes.OutQuint);
|
Background?.FadeTo((100f - dimLevel) / 100, 1500, EasingTypes.OutQuint);
|
||||||
|
|
||||||
Content.Alpha = 0;
|
Content.Alpha = 0;
|
||||||
dimLevel.ValueChanged += dimChanged;
|
|
||||||
|
dimLevel.ValueChanged += newDim => Background?.FadeTo((100f - newDim) / 100, 800);
|
||||||
|
|
||||||
Content.ScaleTo(0.7f);
|
Content.ScaleTo(0.7f);
|
||||||
|
|
||||||
@ -318,18 +319,11 @@ namespace osu.Game.Screens.Play
|
|||||||
{
|
{
|
||||||
FadeOut(250);
|
FadeOut(250);
|
||||||
Content.ScaleTo(0.7f, 750, EasingTypes.InQuint);
|
Content.ScaleTo(0.7f, 750, EasingTypes.InQuint);
|
||||||
|
|
||||||
dimLevel.ValueChanged -= dimChanged;
|
|
||||||
Background?.FadeTo(1f, 200);
|
Background?.FadeTo(1f, 200);
|
||||||
return base.OnExiting(next);
|
return base.OnExiting(next);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void dimChanged(object sender, EventArgs e)
|
|
||||||
{
|
|
||||||
Background?.FadeTo((100f - dimLevel) / 100, 800);
|
|
||||||
}
|
|
||||||
|
|
||||||
private Bindable<bool> mouseWheelDisabled;
|
private Bindable<bool> mouseWheelDisabled;
|
||||||
|
|
||||||
protected override bool OnWheel(InputState state) => mouseWheelDisabled.Value && !IsPaused;
|
protected override bool OnWheel(InputState state) => mouseWheelDisabled.Value && !IsPaused;
|
||||||
|
@ -61,10 +61,10 @@ namespace osu.Game.Screens.Select
|
|||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
tabs.ItemChanged += (sender, e) => invokeOnFilter();
|
tabs.SelectedItem.ValueChanged += item => invokeOnFilter();
|
||||||
modsCheckbox.Action += (sender, e) => invokeOnFilter();
|
modsCheckbox.Action += (sender, e) => invokeOnFilter();
|
||||||
|
|
||||||
tabs.SelectedItem = BeatmapDetailTab.Global;
|
tabs.SelectedItem.Value = BeatmapDetailTab.Global;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -151,8 +151,8 @@ namespace osu.Game.Screens.Select
|
|||||||
|
|
||||||
groupTabs.PinItem(GroupMode.All);
|
groupTabs.PinItem(GroupMode.All);
|
||||||
groupTabs.PinItem(GroupMode.RecentlyPlayed);
|
groupTabs.PinItem(GroupMode.RecentlyPlayed);
|
||||||
groupTabs.ItemChanged += (sender, value) => Group = value;
|
groupTabs.SelectedItem.ValueChanged += val => Group = val;
|
||||||
sortTabs.ItemChanged += (sender, value) => Sort = value;
|
sortTabs.SelectedItem.ValueChanged += val => Sort = val;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Deactivate()
|
public void Deactivate()
|
||||||
@ -175,7 +175,7 @@ namespace osu.Game.Screens.Select
|
|||||||
|
|
||||||
if (osu != null)
|
if (osu != null)
|
||||||
playMode.BindTo(osu.PlayMode);
|
playMode.BindTo(osu.PlayMode);
|
||||||
playMode.ValueChanged += (s, e) => FilterChanged?.Invoke(CreateCriteria());
|
playMode.ValueChanged += val => FilterChanged?.Invoke(CreateCriteria());
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override bool OnMouseDown(InputState state, MouseDownEventArgs args) => true;
|
protected override bool OnMouseDown(InputState state, MouseDownEventArgs args) => true;
|
||||||
|
@ -157,6 +157,7 @@ namespace osu.Game.Screens.Select.Leaderboards
|
|||||||
})
|
})
|
||||||
{
|
{
|
||||||
TimeBeforeLoad = 500,
|
TimeBeforeLoad = 500,
|
||||||
|
RelativeSizeAxes = Axes.None,
|
||||||
Size = new Vector2(HEIGHT - edge_margin * 2, HEIGHT - edge_margin * 2),
|
Size = new Vector2(HEIGHT - edge_margin * 2, HEIGHT - edge_margin * 2),
|
||||||
},
|
},
|
||||||
new Container
|
new Container
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
|
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
|
||||||
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||||
|
|
||||||
using System;
|
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
using OpenTK;
|
using OpenTK;
|
||||||
@ -170,7 +169,7 @@ namespace osu.Game.Screens.Select
|
|||||||
|
|
||||||
if (osu != null)
|
if (osu != null)
|
||||||
playMode.BindTo(osu.PlayMode);
|
playMode.BindTo(osu.PlayMode);
|
||||||
playMode.ValueChanged += playMode_ValueChanged;
|
playMode.ValueChanged += val => Beatmap.PreferredPlayMode = val;
|
||||||
|
|
||||||
if (database == null)
|
if (database == null)
|
||||||
database = beatmaps;
|
database = beatmaps;
|
||||||
@ -276,8 +275,6 @@ namespace osu.Game.Screens.Select
|
|||||||
initialAddSetsTask.Cancel();
|
initialAddSetsTask.Cancel();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void playMode_ValueChanged(object sender, EventArgs e) => Beatmap.PreferredPlayMode = playMode;
|
|
||||||
|
|
||||||
private void changeBackground(WorkingBeatmap beatmap)
|
private void changeBackground(WorkingBeatmap beatmap)
|
||||||
{
|
{
|
||||||
var backgroundModeBeatmap = Background as BackgroundScreenBeatmap;
|
var backgroundModeBeatmap = Background as BackgroundScreenBeatmap;
|
||||||
|
Loading…
Reference in New Issue
Block a user