Skip to content

Commit

Permalink
Add option to always use QuickRun on normal run.
Browse files Browse the repository at this point in the history
  • Loading branch information
OliBomby committed Feb 10, 2025
1 parent a6d2a93 commit 159cfcd
Show file tree
Hide file tree
Showing 12 changed files with 19 additions and 10 deletions.
7 changes: 7 additions & 0 deletions Mapping_Tools/Classes/SystemTools/Settings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,12 @@ public bool AutoReload {
set => Set(ref autoReload, value);
}

private bool alwaysQuickRun;
public bool AlwaysQuickRun {
get => alwaysQuickRun;
set => Set(ref alwaysQuickRun, value);
}

private Hotkey quickRunHotkey;
public Hotkey QuickRunHotkey {
get => quickRunHotkey;
Expand Down Expand Up @@ -146,6 +152,7 @@ public Settings() {
UseEditorReader = true;
OverrideOsuSave = false;
AutoReload = true;
AlwaysQuickRun = false;
SmartQuickRunEnabled = true;
NoneQuickRunTool = "<Current Tool>";
SingleQuickRunTool = "<Current Tool>";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ public AutoFailDetectorView() {
public AutoFailDetectorVm ViewModel => (AutoFailDetectorVm) DataContext;

private void Start_Click(object sender, RoutedEventArgs e) {
RunTool(MainWindow.AppWindow.GetCurrentMaps(), quick: false);
RunTool(MainWindow.AppWindow.GetCurrentMaps(), quick: SettingsManager.Settings.AlwaysQuickRun);
}

/// <summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ private string PlaceHitsounds(Arguments args, BackgroundWorker worker, DoWorkEve

private void Start_Click(object sender, RoutedEventArgs e)
{
RunTool(MainWindow.AppWindow.GetCurrentMaps(), quick: false);
RunTool(MainWindow.AppWindow.GetCurrentMaps(), quick: SettingsManager.Settings.AlwaysQuickRun);
}

public void QuickRun()
Expand Down
2 changes: 1 addition & 1 deletion Mapping_Tools/Views/MapCleaner/CleanerView.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ public CleanerView() {
public MapCleanerVm ViewModel => (MapCleanerVm) DataContext;

private void Start_Click(object sender, RoutedEventArgs e) {
RunTool(MainWindow.AppWindow.GetCurrentMaps(), quick: false);
RunTool(MainWindow.AppWindow.GetCurrentMaps(), quick: SettingsManager.Settings.AlwaysQuickRun);
}

/// <summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ private void Start_Click(object sender, RoutedEventArgs e)
{
RunTool(ViewModel.ExportTimeMode == ExportTimeMode.Current
? new[] { IOHelper.GetCurrentBeatmapOrCurrentBeatmap() }
: MainWindow.AppWindow.GetCurrentMaps(), quick: false);
: MainWindow.AppWindow.GetCurrentMaps(), quick: SettingsManager.Settings.AlwaysQuickRun);
}

public void QuickRun()
Expand Down
2 changes: 2 additions & 0 deletions Mapping_Tools/Views/Preferences/PreferencesView.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,8 @@
ToolTip="Automatically BetterSave after every osu! save. As a side-effect, this will also overwrite manual .osu changes if you have the editor open."/>
<CheckBox HorizontalAlignment="Left" Content="Auto reload after QuickRun" IsChecked="{Binding AutoReload, Mode=TwoWay}"
ToolTip="Enable this to automatically reload the editor after every QuickRun."/>
<CheckBox HorizontalAlignment="Left" Content="Always use QuickRun" IsChecked="{Binding AlwaysQuickRun, Mode=TwoWay}"
ToolTip="Enable this to use QuickRun even when you press the button to run normally."/>
</StackPanel>

<StackPanel Margin="5 10 0 0">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ private void Start_Click(object sender, RoutedEventArgs e) {
// Get the current beatmap if the selection mode is 'Selected' because otherwise the selection would always fail
RunTool(SelectionModeBox.SelectedIndex == 0
? new[] {IOHelper.GetCurrentBeatmapOrCurrentBeatmap()}
: MainWindow.AppWindow.GetCurrentMaps());
: MainWindow.AppWindow.GetCurrentMaps(), SettingsManager.Settings.AlwaysQuickRun);
}

public void QuickRun() {
Expand Down
2 changes: 1 addition & 1 deletion Mapping_Tools/Views/SliderMerger/SliderMergerView.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ private void Start_Click(object sender, RoutedEventArgs e) {
// Get the current beatmap if the selection mode is 'Selected' because otherwise the selection would always fail
RunTool(SelectionModeBox.SelectedIndex == 0
? new[] {IOHelper.GetCurrentBeatmapOrCurrentBeatmap()}
: MainWindow.AppWindow.GetCurrentMaps());
: MainWindow.AppWindow.GetCurrentMaps(), SettingsManager.Settings.AlwaysQuickRun);
}

private void RunTool(string[] paths, bool quick = false) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ protected override void BackgroundWorker_DoWork(object sender, DoWorkEventArgs e


private void Start_Click(object sender, RoutedEventArgs e) {
RunTool(MainWindow.AppWindow.GetCurrentMaps()[0]);
RunTool(MainWindow.AppWindow.GetCurrentMaps()[0], SettingsManager.Settings.AlwaysQuickRun);
}

public void QuickRun() {
Expand Down
2 changes: 1 addition & 1 deletion Mapping_Tools/Views/Sliderator/SlideratorView.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -531,7 +531,7 @@ private bool ValidateToolInput(out string message) {
}

private void Start_Click(object sender, RoutedEventArgs e) {
RunTool(MainWindow.AppWindow.GetCurrentMaps()[0]);
RunTool(MainWindow.AppWindow.GetCurrentMaps()[0], SettingsManager.Settings.AlwaysQuickRun, SettingsManager.Settings.AlwaysQuickRun);
}

private async void RunTool(string path, bool quick = false, bool reload = false) {
Expand Down
2 changes: 1 addition & 1 deletion Mapping_Tools/Views/TimingHelper/TimingHelperView.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ protected override void BackgroundWorker_DoWork(object sender, DoWorkEventArgs e
}

private void Start_Click(object sender, RoutedEventArgs e) {
RunTool(MainWindow.AppWindow.GetCurrentMaps());
RunTool(MainWindow.AppWindow.GetCurrentMaps(), SettingsManager.Settings.AlwaysQuickRun);
}

public void QuickRun() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ private void OnLoaded(object sender, RoutedEventArgs e) {
private void Start_Click(object sender, RoutedEventArgs e) {
RunTool(SelectionModeBox.SelectedIndex == 0
? new[] {IOHelper.GetCurrentBeatmapOrCurrentBeatmap()}
: MainWindow.AppWindow.GetCurrentMaps());
: MainWindow.AppWindow.GetCurrentMaps(), SettingsManager.Settings.AlwaysQuickRun, SettingsManager.Settings.AlwaysQuickRun);
}

private bool ValidateToolInput(out string message) {
Expand Down

0 comments on commit 159cfcd

Please sign in to comment.