public void UpdateOSC() { Settings.Instance.OSC_IP = oscIP.text; Settings.Instance.OSC_Port = oscPort.text; Settings.Instance.OSC_Enabled = oscEnabled.isOn; OptionsController.Find <OSCMessageSender>()?.ReloadOSCStats(); }
public void UpdateChromaLite(bool enabled) { if (!enabled) { OptionsController.Find <PlatformDescriptor>()?.KillChromaLights(); } Settings.Instance.EmulateChromaLite = enabled; }
public void TogglePause() { IsPaused = !IsPaused; if (IsPaused) { foreach (LightsManager e in platform.gameObject.GetComponentsInChildren <LightsManager>()) { e.ChangeAlpha(0, 1); } OptionsController.Find <OptionsController>()?.Close(); } StartCoroutine(TransitionMenu()); }
private void Start() { _metronomeHandler = OptionsController.Find <MetronomeHandler>(); customLevelField.text = Settings.Instance.BeatSaberInstallation; discordToggle.isOn = Settings.Instance.DiscordRPCEnabled; volumeSlider.value = AudioListener.volume * 10; volumeSliderDisplay.text = $"{volumeSlider.value * 10}%"; initialBatchSizeSlider.value = Settings.Instance.InitialLoadBatchSize / 50; initialBatchSizeDisplay.text = $"{Settings.Instance.InitialLoadBatchSize}"; darkThemeToggle.isOn = Settings.Instance.DarkTheme; metronomeSlider.value = Settings.Instance.MetronomeVolume * 10; metronomeSliderDisplay.text = $"{metronomeSlider.value * 10}%"; }
void Start() { editorScaleSlider.value = Mathf.Sqrt(Settings.Instance.EditorScale); songSpeedSlider.value = OptionsController.Find <SongSpeedController>()?.source.pitch * 10f ?? 10f; chunkDistanceSlider.value = Settings.Instance.ChunkDistance; autoSaveInterval.text = Settings.Instance.AutoSaveInterval.ToString(); noteLanes.text = OptionsController.Find <NoteLanesController>()?.NoteLanes.ToString() ?? "4"; oscIP.text = Settings.Instance.OSC_IP; oscPort.text = Settings.Instance.OSC_Port; oscEnabled.isOn = Settings.Instance.OSC_Enabled; invertControls.isOn = Settings.Instance.InvertNoteControls; nodeEditor.isOn = OptionsController.Find <NodeEditorController>()?.AdvancedSetting ?? false; waveformGenerator.isOn = Settings.Instance.WaveformGenerator; countersPlus.isOn = CountersPlusController.IsActive; chromaOnly.isOn = Settings.Instance.PlaceOnlyChromaEvents; redNoteDing.isOn = DingOnNotePassingGrid.NoteTypeToDing[BeatmapNote.NOTE_TYPE_A]; blueNoteDing.isOn = DingOnNotePassingGrid.NoteTypeToDing[BeatmapNote.NOTE_TYPE_B]; bombDing.isOn = DingOnNotePassingGrid.NoteTypeToDing[BeatmapNote.NOTE_TYPE_BOMB]; }
void Start() { editorScaleSlider.value = Settings.Instance.EditorScale; songSpeedSlider.value = OptionsController.Find <SongSpeedController>()?.source.pitch * 10f ?? 10f; chunkDistanceSlider.value = Settings.Instance.ChunkDistance; autoSaveInterval.text = Settings.Instance.AutoSaveInterval.ToString(); noteLanes.text = OptionsController.Find <NoteLanesController>()?.NoteLanes.ToString(CultureInfo.InvariantCulture) ?? "4"; oscIP.text = Settings.Instance.OSC_IP; oscPort.text = Settings.Instance.OSC_Port; oscEnabled.isOn = Settings.Instance.OSC_Enabled; invertControls.isOn = Settings.Instance.InvertNoteControls; nodeEditor.isOn = Settings.Instance.NodeEditor_Enabled; waveformGenerator.isOn = Settings.Instance.WaveformGenerator; countersPlus.isOn = Settings.Instance.CountersPlus; chromaOnly.isOn = Settings.Instance.PlaceOnlyChromaEvents; redNoteDing.isOn = DingOnNotePassingGrid.NoteTypeToDing[BeatmapNote.NOTE_TYPE_A]; blueNoteDing.isOn = DingOnNotePassingGrid.NoteTypeToDing[BeatmapNote.NOTE_TYPE_B]; bombDing.isOn = DingOnNotePassingGrid.NoteTypeToDing[BeatmapNote.NOTE_TYPE_BOMB]; nodeEditorKeybind.isOn = Settings.Instance.NodeEditor_UseKeybind; boxSelect.isOn = Settings.Instance.BoxSelect; perfectWalls.isOn = Settings.Instance.DontPlacePerfectZeroDurationWalls; mouseSensSlider.value = Mathf.RoundToInt((Settings.Instance.Camera_MouseSensitivity - 0.5f) * 2); mouseSensDisplay.text = Settings.Instance.Camera_MouseSensitivity.ToString(CultureInfo.InvariantCulture); cameraSpeedSlider.value = Settings.Instance.Camera_MovementSpeed; cameraSpeedDisplay.text = Settings.Instance.Camera_MovementSpeed.ToString(CultureInfo.InvariantCulture); chromaLite.isOn = Settings.Instance.EmulateChromaLite; chroma.isOn = Settings.Instance.EmulateChromaAdvanced; rotateTrack.isOn = Settings.Instance.RotateTrack; highlightRecentlyPlaced.isOn = Settings.Instance.HighlightLastPlacedNotes; invertPrecisionScroll.isOn = Settings.Instance.InvertPrecisionScroll; spawnOffset.value = Settings.Instance.Offset_Spawning; spawnOffsetText.text = Settings.Instance.Offset_Spawning.ToString(); despawnOffset.value = Settings.Instance.Offset_Despawning; despawnOffsetText.text = Settings.Instance.Offset_Despawning.ToString(); noteHitSoundDropdown.value = Settings.Instance.NoteHitSound; noteHitVolumeSlider.value = Settings.Instance.NoteHitVolume * 10; noteHitVolumeSliderDisplay.text = $"{noteHitVolumeSlider.value * 10}%"; pastNotesGridScaleSlider.value = Settings.Instance.PastNotesGridScale * 10; pastNotesGridScaleSliderDisplay.text = $"{pastNotesGridScaleSlider.value * 10}%"; cameraFOVSlider.value = Settings.Instance.CameraFOV; cameraFOVSliderDisplay.text = $"{Math.Round(cameraFOVSlider.value, 1)}°"; waveformWorkflow.isOn = Settings.Instance.WaveformWorkflow; }
public void UpdateRotateTrack(bool enabled) { Settings.Instance.RotateTrack = enabled; OptionsController.Find <TracksManager>()?.RefreshTracks(); if (Settings.Instance.RotateTrack == enabled) { return; } RotationCallbackController callbackController = OptionsController.Find <RotationCallbackController>(); if (!Settings.Instance.RotateTrack) { callbackController?.RotationChangedEvent?.Invoke(false, 0); } PersistentUI.Instance.ShowDialogBox("If you are in the editor, side effects can happen." + "\n\nIf the rotation of the track is not aligned, going back to the beginning or reloading the editor should fix it." , null, PersistentUI.DialogBoxPresetType.Ok); }
void Start() { editorScaleSlider.value = Settings.Instance.EditorScale; songSpeedSlider.value = OptionsController.Find <SongSpeedController>()?.source.pitch * 10f ?? 10f; chunkDistanceSlider.value = Settings.Instance.ChunkDistance; autoSaveInterval.text = Settings.Instance.AutoSaveInterval.ToString(); noteLanes.text = OptionsController.Find <NoteLanesController>()?.NoteLanes.ToString() ?? "4"; oscIP.text = Settings.Instance.OSC_IP; oscPort.text = Settings.Instance.OSC_Port; oscEnabled.isOn = Settings.Instance.OSC_Enabled; invertControls.isOn = Settings.Instance.InvertNoteControls; nodeEditor.isOn = Settings.Instance.NodeEditor_Enabled; waveformGenerator.isOn = Settings.Instance.WaveformGenerator; countersPlus.isOn = Settings.Instance.CountersPlus; chromaOnly.isOn = Settings.Instance.PlaceOnlyChromaEvents; redNoteDing.isOn = DingOnNotePassingGrid.NoteTypeToDing[BeatmapNote.NOTE_TYPE_A]; blueNoteDing.isOn = DingOnNotePassingGrid.NoteTypeToDing[BeatmapNote.NOTE_TYPE_B]; bombDing.isOn = DingOnNotePassingGrid.NoteTypeToDing[BeatmapNote.NOTE_TYPE_BOMB]; nodeEditorKeybind.isOn = Settings.Instance.NodeEditor_UseKeybind; boxSelect.isOn = Settings.Instance.BoxSelect; perfectWalls.isOn = Settings.Instance.DontPlacePerfectZeroDurationWalls; }
public void UpdateCountersPlus(bool enabled) { Settings.Instance.CountersPlus = enabled; OptionsController.Find <CountersPlusController>()?.ToggleCounters(enabled); }
public void UpdateNodeEditor(bool enabled) { OptionsController.Find <NodeEditorController>()?.UpdateAdvancedSetting(enabled); }
public void UpdateNoteLanes(string value) { OptionsController.Find <NoteLanesController>()?.UpdateNoteLanes(value); }
public void ToggleAutoSave(bool enabled) { OptionsController.Find <AutoSaveController>()?.ToggleAutoSave(enabled); }
public void UpdateSongSpeed(float speed) { OptionsController.Find <SongSpeedController>()?.UpdateSongSpeed(speed); songSpeedDisplay.text = speed * 10 + "%"; }
public void UpdateEditorScale(float scale) { Settings.Instance.EditorScale = Mathf.RoundToInt(scale); OptionsController.Find <EditorScaleController>()?.UpdateEditorScale(scale); }