mirror of
https://github.com/osukey/osukey.git
synced 2025-05-07 22:57:31 +09:00
Merge branch 'master' into update-beatmap-scores-design
This commit is contained in:
commit
88445647c8
@ -16,15 +16,16 @@ namespace osu.Game.Rulesets.Osu.Configuration
|
|||||||
protected override void InitialiseDefaults()
|
protected override void InitialiseDefaults()
|
||||||
{
|
{
|
||||||
base.InitialiseDefaults();
|
base.InitialiseDefaults();
|
||||||
|
|
||||||
Set(OsuRulesetSetting.SnakingInSliders, true);
|
Set(OsuRulesetSetting.SnakingInSliders, true);
|
||||||
Set(OsuRulesetSetting.SnakingOutSliders, true);
|
Set(OsuRulesetSetting.SnakingOutSliders, true);
|
||||||
|
Set(OsuRulesetSetting.ShowCursorTrail, true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public enum OsuRulesetSetting
|
public enum OsuRulesetSetting
|
||||||
{
|
{
|
||||||
SnakingInSliders,
|
SnakingInSliders,
|
||||||
SnakingOutSliders
|
SnakingOutSliders,
|
||||||
|
ShowCursorTrail
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,9 +1,12 @@
|
|||||||
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
||||||
// See the LICENCE file in the repository root for full licence text.
|
// See the LICENCE file in the repository root for full licence text.
|
||||||
|
|
||||||
|
using osu.Framework.Allocation;
|
||||||
|
using osu.Framework.Bindables;
|
||||||
using osu.Framework.Graphics;
|
using osu.Framework.Graphics;
|
||||||
using osu.Framework.Graphics.Containers;
|
using osu.Framework.Graphics.Containers;
|
||||||
using osu.Framework.Input.Bindings;
|
using osu.Framework.Input.Bindings;
|
||||||
|
using osu.Game.Rulesets.Osu.Configuration;
|
||||||
using osu.Game.Rulesets.UI;
|
using osu.Game.Rulesets.UI;
|
||||||
|
|
||||||
namespace osu.Game.Rulesets.Osu.UI.Cursor
|
namespace osu.Game.Rulesets.Osu.UI.Cursor
|
||||||
@ -16,6 +19,10 @@ namespace osu.Game.Rulesets.Osu.UI.Cursor
|
|||||||
|
|
||||||
private readonly Container<Drawable> fadeContainer;
|
private readonly Container<Drawable> fadeContainer;
|
||||||
|
|
||||||
|
private readonly Bindable<bool> showTrail = new Bindable<bool>(true);
|
||||||
|
|
||||||
|
private readonly CursorTrail cursorTrail;
|
||||||
|
|
||||||
public OsuCursorContainer()
|
public OsuCursorContainer()
|
||||||
{
|
{
|
||||||
InternalChild = fadeContainer = new Container
|
InternalChild = fadeContainer = new Container
|
||||||
@ -23,11 +30,19 @@ namespace osu.Game.Rulesets.Osu.UI.Cursor
|
|||||||
RelativeSizeAxes = Axes.Both,
|
RelativeSizeAxes = Axes.Both,
|
||||||
Children = new Drawable[]
|
Children = new Drawable[]
|
||||||
{
|
{
|
||||||
new CursorTrail { Depth = 1 }
|
cursorTrail = new CursorTrail { Depth = 1 }
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[BackgroundDependencyLoader(true)]
|
||||||
|
private void load(OsuRulesetConfigManager config)
|
||||||
|
{
|
||||||
|
config?.BindWith(OsuRulesetSetting.ShowCursorTrail, showTrail);
|
||||||
|
|
||||||
|
showTrail.BindValueChanged(v => cursorTrail.FadeTo(v.NewValue ? 1 : 0, 200), true);
|
||||||
|
}
|
||||||
|
|
||||||
private int downCount;
|
private int downCount;
|
||||||
|
|
||||||
private void updateExpandedState()
|
private void updateExpandedState()
|
||||||
|
@ -34,6 +34,11 @@ namespace osu.Game.Rulesets.Osu.UI
|
|||||||
LabelText = "Snaking out sliders",
|
LabelText = "Snaking out sliders",
|
||||||
Bindable = config.GetBindable<bool>(OsuRulesetSetting.SnakingOutSliders)
|
Bindable = config.GetBindable<bool>(OsuRulesetSetting.SnakingOutSliders)
|
||||||
},
|
},
|
||||||
|
new SettingsCheckbox
|
||||||
|
{
|
||||||
|
LabelText = "Cursor trail",
|
||||||
|
Bindable = config.GetBindable<bool>(OsuRulesetSetting.ShowCursorTrail)
|
||||||
|
},
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -254,6 +254,12 @@ namespace osu.Game
|
|||||||
if (menuScreen.IsCurrentScreen())
|
if (menuScreen.IsCurrentScreen())
|
||||||
menuScreen.LoadToSolo();
|
menuScreen.LoadToSolo();
|
||||||
|
|
||||||
|
// we might even already be at the song
|
||||||
|
if (Beatmap.Value.BeatmapSetInfo.Hash == databasedSet.Hash)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
// Use first beatmap available for current ruleset, else switch ruleset.
|
// Use first beatmap available for current ruleset, else switch ruleset.
|
||||||
var first = databasedSet.Beatmaps.Find(b => b.Ruleset == ruleset.Value) ?? databasedSet.Beatmaps.First();
|
var first = databasedSet.Beatmaps.Find(b => b.Ruleset == ruleset.Value) ?? databasedSet.Beatmaps.First();
|
||||||
|
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
// See the LICENCE file in the repository root for full licence text.
|
// See the LICENCE file in the repository root for full licence text.
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
using osu.Framework.Allocation;
|
using osu.Framework.Allocation;
|
||||||
using osu.Framework.Graphics;
|
using osu.Framework.Graphics;
|
||||||
using osu.Framework.Graphics.Colour;
|
using osu.Framework.Graphics.Colour;
|
||||||
@ -168,15 +169,22 @@ namespace osu.Game.Screens.Select.Carousel
|
|||||||
base.ApplyState();
|
base.ApplyState();
|
||||||
}
|
}
|
||||||
|
|
||||||
public MenuItem[] ContextMenuItems => new MenuItem[]
|
public MenuItem[] ContextMenuItems
|
||||||
{
|
{
|
||||||
new OsuMenuItem("Play", MenuItemType.Highlighted, () => startRequested?.Invoke(beatmap)),
|
get
|
||||||
new OsuMenuItem("Edit", MenuItemType.Standard, () => editRequested?.Invoke(beatmap)),
|
|
||||||
new OsuMenuItem("Hide", MenuItemType.Destructive, () => hideRequested?.Invoke(beatmap)),
|
|
||||||
new OsuMenuItem("Details", MenuItemType.Standard, () =>
|
|
||||||
{
|
{
|
||||||
if (beatmap.OnlineBeatmapID.HasValue) beatmapOverlay?.FetchAndShowBeatmap(beatmap.OnlineBeatmapID.Value);
|
List<MenuItem> items = new List<MenuItem>
|
||||||
}),
|
{
|
||||||
};
|
new OsuMenuItem("Play", MenuItemType.Highlighted, () => startRequested?.Invoke(beatmap)),
|
||||||
|
new OsuMenuItem("Edit", MenuItemType.Standard, () => editRequested?.Invoke(beatmap)),
|
||||||
|
new OsuMenuItem("Hide", MenuItemType.Destructive, () => hideRequested?.Invoke(beatmap)),
|
||||||
|
};
|
||||||
|
|
||||||
|
if (beatmap.OnlineBeatmapID.HasValue)
|
||||||
|
items.Add(new OsuMenuItem("Details", MenuItemType.Standard, () => beatmapOverlay?.FetchAndShowBeatmap(beatmap.OnlineBeatmapID.Value)));
|
||||||
|
|
||||||
|
return items.ToArray();
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user