1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-15 13:22:55 +08:00

Merge pull request #2398 from tgi74/rightclickscrolling

Add right click absolute scrolling in song select
This commit is contained in:
Dean Herbert 2018-04-18 19:57:52 +09:00 committed by GitHub
commit dd7020d5a4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 63 additions and 47 deletions

1
.gitattributes vendored
View File

@ -14,6 +14,7 @@ App.config text eol=crlf
*.bat text eol=crlf
*.cmd text eol=crlf
*.snippet text eol=crlf
*.manifest text eol=crlf
# Check out with lf (UNIX) line endings
*.sh text eol=lf

View File

@ -85,6 +85,8 @@ namespace osu.Game.Configuration
Set(OsuSetting.ScreenshotFormat, ScreenshotFormat.Jpg);
Set(OsuSetting.ScreenshotCaptureMenuCursor, false);
Set(OsuSetting.SongSelectRightMouseScroll, false);
}
public OsuConfigManager(Storage storage) : base(storage)
@ -130,6 +132,7 @@ namespace osu.Game.Configuration
SpeedChangeVisualisation,
Skin,
ScreenshotFormat,
ScreenshotCaptureMenuCursor
ScreenshotCaptureMenuCursor,
SongSelectRightMouseScroll
}
}

View File

@ -17,6 +17,11 @@ namespace osu.Game.Overlays.Settings.Sections.Gameplay
{
Children = new Drawable[]
{
new SettingsCheckbox
{
LabelText = "Right mouse drag to absolute scroll",
Bindable = config.GetBindable<bool>(OsuSetting.SongSelectRightMouseScroll),
},
new SettingsCheckbox
{
LabelText = "Show converted beatmaps",

View File

@ -97,6 +97,9 @@ namespace osu.Game.Screens.Select
private readonly Container<DrawableCarouselItem> scrollableContent;
public Bindable<bool> RightClickScrollingEnabled = new Bindable<bool>();
public Bindable<RandomSelectAlgorithm> RandomAlgorithm = new Bindable<RandomSelectAlgorithm>();
private readonly List<CarouselBeatmapSet> previouslyVisitedRandomSets = new List<CarouselBeatmapSet>();
private readonly Stack<CarouselBeatmap> randomSelectedBeatmaps = new Stack<CarouselBeatmap>();
@ -122,6 +125,10 @@ namespace osu.Game.Screens.Select
private void load(OsuConfigManager config)
{
config.BindWith(OsuSetting.RandomSelectAlgorithm, RandomAlgorithm);
config.BindWith(OsuSetting.SongSelectRightMouseScroll, RightClickScrollingEnabled);
RightClickScrollingEnabled.ValueChanged += v => RightMouseScrollbar = v;
RightClickScrollingEnabled.TriggerChange();
}
public void RemoveBeatmapSet(BeatmapSetInfo beatmapSet)