Introduce 'Capture menu cursor' setting

This commit is contained in:
TocoToucan 2018-03-23 22:53:06 +03:00
parent 092ba4833e
commit dd5cc59250
3 changed files with 11 additions and 1 deletions

View File

@ -84,6 +84,7 @@ protected override void InitialiseDefaults()
Set(OsuSetting.Version, string.Empty);
Set(OsuSetting.ScreenshotFormat, ScreenshotFormat.Jpg);
Set(OsuSetting.ScreenshotCaptureMenuCursor, false);
}
public OsuConfigManager(Storage storage) : base(storage)
@ -128,6 +129,7 @@ public enum OsuSetting
ShowConvertedBeatmaps,
SpeedChangeVisualisation,
Skin,
ScreenshotFormat
ScreenshotFormat,
ScreenshotCaptureMenuCursor
}
}

View File

@ -22,6 +22,8 @@ namespace osu.Game.Graphics
public class ScreenshotManager : Container, IKeyBindingHandler<GlobalAction>, IHandleGlobalInput
{
private Bindable<ScreenshotFormat> screenshotFormat;
private Bindable<bool> captureMenuCursor;
private GameHost host;
private Storage storage;
private NotificationOverlay notificationOverlay;
@ -36,6 +38,7 @@ private void load(GameHost host, OsuConfigManager config, Storage storage, Notif
this.notificationOverlay = notificationOverlay;
screenshotFormat = config.GetBindable<ScreenshotFormat>(OsuSetting.ScreenshotFormat);
captureMenuCursor = config.GetBindable<bool>(OsuSetting.ScreenshotCaptureMenuCursor);
shutter = audio.Sample.Get("UI/shutter");
}

View File

@ -30,6 +30,11 @@ private void load(OsuConfigManager config)
{
LabelText = "Screenshot format",
Bindable = config.GetBindable<ScreenshotFormat>(OsuSetting.ScreenshotFormat)
},
new SettingsCheckbox
{
LabelText = "Capture menu cursor",
Bindable = config.GetBindable<bool>(OsuSetting.ScreenshotCaptureMenuCursor)
}
};
}