From 45bb7f24e1eec68a87b64b8de55a74547eb6972c Mon Sep 17 00:00:00 2001 From: NSGolova Date: Sun, 29 Sep 2024 21:42:23 +0100 Subject: [PATCH] Removed accidental changes and made constant for song filter button --- Source/2_Core/Managers/ReplayRecorder.cs | 2 +- Source/7_Utils/BSMLUtility.cs | 3 +-- .../BeatmapSelector/BeatmapSelectorViewController.cs | 6 ++++-- Source/8_UI/ModPanel/ModPanelUtils.cs | 2 +- Source/8_UI/ReeUIComponentV2.cs | 2 +- Source/8_UI/SettingsPanel/SettingsPanelUtils.cs | 2 +- 6 files changed, 9 insertions(+), 8 deletions(-) diff --git a/Source/2_Core/Managers/ReplayRecorder.cs b/Source/2_Core/Managers/ReplayRecorder.cs index 0f48da52..47814e30 100644 --- a/Source/2_Core/Managers/ReplayRecorder.cs +++ b/Source/2_Core/Managers/ReplayRecorder.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Generic; using System.Reflection; using BeatLeader.Core.Managers.NoteEnhancer; diff --git a/Source/7_Utils/BSMLUtility.cs b/Source/7_Utils/BSMLUtility.cs index 792c2e9f..ba680252 100644 --- a/Source/7_Utils/BSMLUtility.cs +++ b/Source/7_Utils/BSMLUtility.cs @@ -16,8 +16,7 @@ public static Sprite LoadSprite(string location) { string text = location.Substring(1); sprite = FindSpriteCached(text); } else { - var task = Task.Run(async () => await Utilities.LoadSpriteFromAssemblyAsync(location)); - sprite = task.GetAwaiter().GetResult(); + sprite = Utilities.LoadSpriteFromAssemblyAsync(location).GetAwaiter().GetResult(); sprite.texture.wrapMode = TextureWrapMode.Clamp; } diff --git a/Source/8_UI/FlowCoordinator/Components/ReplayLaunchView/SearchFiltersPanel/FiltersMenu/BeatmapSelector/BeatmapSelectorViewController.cs b/Source/8_UI/FlowCoordinator/Components/ReplayLaunchView/SearchFiltersPanel/FiltersMenu/BeatmapSelector/BeatmapSelectorViewController.cs index dca3a6df..3c3ffcbc 100644 --- a/Source/8_UI/FlowCoordinator/Components/ReplayLaunchView/SearchFiltersPanel/FiltersMenu/BeatmapSelector/BeatmapSelectorViewController.cs +++ b/Source/8_UI/FlowCoordinator/Components/ReplayLaunchView/SearchFiltersPanel/FiltersMenu/BeatmapSelector/BeatmapSelectorViewController.cs @@ -34,7 +34,9 @@ internal class BeatmapSelectorViewController : DummyViewController { private SelectLevelCategoryViewController.LevelCategory _lastSelectedLevelCategory = SelectLevelCategoryViewController.LevelCategory.All; private BeatmapLevel? _originalPreviewBeatmapLevel; private bool _isInitialized; + private string _defaultPlayButtonText = Localization.Get("BUTTON_PLAY"); + private static string CUSTOM_PLAY_BUTTON = "SELECT"; public void Init( LevelSelectionNavigationController levelSelectionNavigationController, @@ -75,7 +77,7 @@ public override void DidActivate(bool firstActivation, bool addedToHierarchy, bo Array.Empty(), false, false, - "SELECT", + CUSTOM_PLAY_BUTTON, null, SelectLevelCategoryViewController.LevelCategory.None, null, @@ -87,7 +89,7 @@ public override void DidActivate(bool firstActivation, bool addedToHierarchy, bo _closeButton.ManualInit(_closeButton.transform); _closeButton.ButtonPressedEvent += HandleCloseButtonPressed; } - _levelSelectionNavigationController._actionButtonText = "SELECT"; + _levelSelectionNavigationController._actionButtonText = CUSTOM_PLAY_BUTTON; _originalLevelCategory = _levelSelectionNavigationController.selectedLevelCategory; _originalPreviewBeatmapLevel = _levelCollectionNavigationController.beatmapLevel; diff --git a/Source/8_UI/ModPanel/ModPanelUtils.cs b/Source/8_UI/ModPanel/ModPanelUtils.cs index 4291ef93..18a6d7d6 100644 --- a/Source/8_UI/ModPanel/ModPanelUtils.cs +++ b/Source/8_UI/ModPanel/ModPanelUtils.cs @@ -1,4 +1,4 @@ -using BeatSaberMarkupLanguage.Util; +using BeatSaberMarkupLanguage.Util; namespace BeatLeader { internal partial class ModPanelUI { diff --git a/Source/8_UI/ReeUIComponentV2.cs b/Source/8_UI/ReeUIComponentV2.cs index 96c79cbb..e380f686 100644 --- a/Source/8_UI/ReeUIComponentV2.cs +++ b/Source/8_UI/ReeUIComponentV2.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Generic; using System.ComponentModel; using System.Reflection; diff --git a/Source/8_UI/SettingsPanel/SettingsPanelUtils.cs b/Source/8_UI/SettingsPanel/SettingsPanelUtils.cs index c44bfb57..73140973 100644 --- a/Source/8_UI/SettingsPanel/SettingsPanelUtils.cs +++ b/Source/8_UI/SettingsPanel/SettingsPanelUtils.cs @@ -1,4 +1,4 @@ -using BeatSaberMarkupLanguage.Util; +using BeatSaberMarkupLanguage.Util; namespace BeatLeader { internal partial class SettingsPanelUI {