using System; using Cpp2IlInjected; using Newtonsoft.Json.Converters; using UnityEngine; using UnityEngine.UI; // Token: 0x0200024C RID: 588 [Token(Token = "0x200024C")] public class UISettingsAudio : UIValueBindingBase { // Token: 0x06001682 RID: 5762 RVA: 0x00034254 File Offset: 0x00032454 [Token(Token = "0x6001682")] [Address(RVA = "0xDDA530", Offset = "0xDD8D30", VA = "0x180DDA530", Slot = "11")] public override void Init(CanvasGroup mainCanvasGroup, Action cancelHandler, Text title) { UIValueBindingHandler uivalueBindingHandler4; Action action4; string[] array4; for (;;) { base.Init(mainCanvasGroup, cancelHandler, title); UIValueBindingHandler uivalueBindingHandler = this.topHandlers[0]; Action action = new Action(this.OnWholeVolumeValueChanged); string[] array = new string[11]; if ("0" == 0 || array != 0) { array[0] = "0"; if ("1" == 0 || "1" != 0) { array[1] = "1"; if ("2" == 0 || "2" != 0) { array[2] = "2"; if ("3" == 0 || "3" != 0) { array[3] = "3"; if ("4" == 0 || "4" != 0) { array[4] = "4"; if ("5" == 0 || "5" != 0) { array[5] = "5"; if ("6" == 0 || "6" != 0) { array[6] = "6"; if ("7" == 0 || "7" != 0) { array[7] = "7"; if ("8" == 0 || "8" != 0) { array[8] = "8"; if ("9" == 0 || "9" != 0) { array[9] = "9"; if ("10" == 0 || "10" != 0) { array[10] = "10"; uivalueBindingHandler.Init(action, array); UIValueBindingHandler uivalueBindingHandler2 = this.topHandlers[1]; Action action2 = new Action(this.OnBgmVolumeValueChanged); string[] array2 = new string[11]; if ("0" == 0 || array2 != 0) { array2[0] = "0"; if ("1" == 0 || "1" != 0) { array2[1] = "1"; if ("2" == 0 || "2" != 0) { array2[2] = "2"; if ("3" == 0 || "3" != 0) { array2[3] = "3"; if ("4" == 0 || "4" != 0) { array2[4] = "4"; if ("5" == 0 || "5" != 0) { array2[5] = "5"; if ("6" == 0 || "6" != 0) { array2[6] = "6"; if ("7" == 0 || "7" != 0) { array2[7] = "7"; if ("8" == 0 || "8" != 0) { array2[8] = "8"; if ("9" == 0 || "9" != 0) { array2[9] = "9"; if ("10" == 0 || "10" != 0) { array2[10] = "10"; uivalueBindingHandler2.Init(action2, array2); UIValueBindingHandler uivalueBindingHandler3 = this.topHandlers[2]; Action action3 = new Action(this.OnSfxVolumeValueChanged); string[] array3 = new string[11]; if ("0" == 0 || array3 != 0) { array3[0] = "0"; if ("1" == 0 || "1" != 0) { array3[1] = "1"; if ("2" == 0 || "2" != 0) { array3[2] = "2"; if ("3" == 0 || "3" != 0) { array3[3] = "3"; if ("4" == 0 || "4" != 0) { array3[4] = "4"; if ("5" == 0 || "5" != 0) { array3[5] = "5"; if ("6" == 0 || "6" != 0) { array3[6] = "6"; if ("7" == 0 || "7" != 0) { array3[7] = "7"; if ("8" == 0 || "8" != 0) { array3[8] = "8"; if ("9" == 0 || "9" != 0) { array3[9] = "9"; if ("10" == 0 || "10" != 0) { array3[10] = "10"; uivalueBindingHandler3.Init(action3, array3); uivalueBindingHandler4 = this.topHandlers[3]; action4 = new Action(this.OnVoiceVolumeValueChanged); array4 = new string[11]; if ("0" == 0 || array4 != 0) { array4[0] = "0"; if ("1" == 0 || "1" != 0) { array4[1] = "1"; if ("2" == 0 || "2" != 0) { array4[2] = "2"; if ("3" == 0 || "3" != 0) { array4[3] = "3"; if ("4" == 0 || "4" != 0) { array4[4] = "4"; if ("5" == 0 || "5" != 0) { array4[5] = "5"; if ("6" == 0 || "6" != 0) { array4[6] = "6"; if ("7" == 0 || "7" != 0) { array4[7] = "7"; if ("8" == 0 || "8" != 0) { array4[8] = "8"; if ("9" == 0 || "9" != 0) { array4[9] = "9"; if ("10" == 0 || "10" != 0) { break; } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } array4[10] = "10"; uivalueBindingHandler4.Init(action4, array4); UIValueBindingHandler[] topHandlers = this.topHandlers; base.InitHandlers(topHandlers); } // Token: 0x06001683 RID: 5763 RVA: 0x000348A4 File Offset: 0x00032AA4 [Token(Token = "0x6001683")] [Address(RVA = "0xDDBE60", Offset = "0xDDA660", VA = "0x180DDBE60")] private void OnWholeVolumeValueChanged(int value) { VolumeSettings volumeSettings = Game.Config.volumeSettings; int num = 0; int num2 = Mathf.Clamp(value, num, 10); volumeSettings.wholeVolume = num2; Game.EmitVolumeSettingsChangedEvent(); Game.PlayHandlerSE(UIHandlerSFX.Navigation); } // Token: 0x06001684 RID: 5764 RVA: 0x000348E8 File Offset: 0x00032AE8 [Token(Token = "0x6001684")] [Address(RVA = "0xDDBCB0", Offset = "0xDDA4B0", VA = "0x180DDBCB0")] private void OnBgmVolumeValueChanged(int value) { VolumeSettings volumeSettings = Game.Config.volumeSettings; int num = 0; int num2 = Mathf.Clamp(value, num, 10); volumeSettings.ambienceVolume = num2; Game.EmitVolumeSettingsChangedEvent(); Game.PlayHandlerSE(UIHandlerSFX.Navigation); } // Token: 0x06001685 RID: 5765 RVA: 0x0003492C File Offset: 0x00032B2C [Token(Token = "0x6001685")] [Address(RVA = "0xDDBD40", Offset = "0xDDA540", VA = "0x180DDBD40")] private void OnSfxVolumeValueChanged(int value) { VolumeSettings volumeSettings = Game.Config.volumeSettings; int num = 0; int num2 = Mathf.Clamp(value, num, 10); volumeSettings.sfxVolume = num2; Game.EmitVolumeSettingsChangedEvent(); Game.PlayHandlerSE(UIHandlerSFX.Navigation); } // Token: 0x06001686 RID: 5766 RVA: 0x00034970 File Offset: 0x00032B70 [Token(Token = "0x6001686")] [Address(RVA = "0xDDBDD0", Offset = "0xDDA5D0", VA = "0x180DDBDD0")] private void OnVoiceVolumeValueChanged(int value) { VolumeSettings volumeSettings = Game.Config.volumeSettings; int num = 0; int num2 = Mathf.Clamp(value, num, 10); volumeSettings.voiceVolume = num2; Game.EmitVolumeSettingsChangedEvent(); Game.PlayHandlerSE(UIHandlerSFX.Voice); } // Token: 0x06001687 RID: 5767 RVA: 0x000349B4 File Offset: 0x00032BB4 [Token(Token = "0x6001687")] [Address(RVA = "0xDDA270", Offset = "0xDD8A70", VA = "0x180DDA270", Slot = "23")] protected override ValueType[] GetConfigValues() { ValueType[] array; int num; for (;;) { array = new ValueType[4]; num = Game.Config.volumeSettings.wholeVolume; if (num == 0 || num != 0) { array[0] = num; int ambienceVolume = Game.Config.volumeSettings.ambienceVolume; num = ambienceVolume; if (ambienceVolume == 0 || ambienceVolume != 0) { array[1] = num; int sfxVolume = Game.Config.volumeSettings.sfxVolume; num = sfxVolume; if (sfxVolume == 0 || sfxVolume != 0) { array[2] = num; int voiceVolume = Game.Config.volumeSettings.voiceVolume; num = voiceVolume; if (voiceVolume == 0 || voiceVolume != 0) { break; } } } } } array[3] = num; return array; } // Token: 0x06001688 RID: 5768 RVA: 0x000020D3 File Offset: 0x000002D3 [Token(Token = "0x6001688")] [Address(RVA = "0xDDC000", Offset = "0xDDA800", VA = "0x180DDC000", Slot = "24")] protected override void UpdateTopHandlers() { throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method."); } // Token: 0x06001689 RID: 5769 RVA: 0x00034A70 File Offset: 0x00032C70 [Token(Token = "0x6001689")] [Address(RVA = "0xDDB9E0", Offset = "0xDDA1E0", VA = "0x180DDB9E0", Slot = "20")] public override void Localize(LocalizationData data) { string text = data.systemText.GetText(93); this.titleText = text; UIValueBindingHandler[] topHandlers = this.topHandlers; GameTextData systemText = data.systemText; UIValueBindingHandler uivalueBindingHandler = topHandlers[0]; string text2 = systemText.GetText(116); uivalueBindingHandler.UpdateLabelText(text2); UIValueBindingHandler[] topHandlers2 = this.topHandlers; GameTextData systemText2 = data.systemText; UIValueBindingHandler uivalueBindingHandler2 = topHandlers2[1]; string text3 = systemText2.GetText(117); uivalueBindingHandler2.UpdateLabelText(text3); UIValueBindingHandler[] topHandlers3 = this.topHandlers; GameTextData systemText3 = data.systemText; UIValueBindingHandler uivalueBindingHandler3 = topHandlers3[2]; string text4 = systemText3.GetText(118); uivalueBindingHandler3.UpdateLabelText(text4); UIValueBindingHandler[] topHandlers4 = this.topHandlers; GameTextData systemText4 = data.systemText; UIValueBindingHandler uivalueBindingHandler4 = topHandlers4[3]; string text5 = systemText4.GetText(119); uivalueBindingHandler4.UpdateLabelText(text5); GameTextData systemText5 = data.systemText; UILabelHandler resetHandler = this.resetHandler; string text6 = systemText5.GetText(15); resetHandler.SetLabel(text6); GameTextData systemText6 = data.systemText; UILabelHandler backHandler = this.backHandler; string text7 = systemText6.GetText(12); backHandler.SetLabel(text7); UIValueBindingHandler[] topHandlers5 = this.topHandlers; int num = 0; int length = topHandlers5.Length; if (num < length) { UIValueBindingHandler uivalueBindingHandler5 = topHandlers5[num]; GameFontPack fontPack = data.fontPack; uivalueBindingHandler5.UpdateFont(fontPack); num++; } GameFontPack fontPack2 = data.fontPack; UILabelHandler resetHandler2 = this.resetHandler; Font medium = fontPack2.medium; resetHandler2.SetFont(medium); GameFontPack fontPack3 = data.fontPack; UILabelHandler backHandler2 = this.backHandler; Font medium2 = fontPack3.medium; backHandler2.SetFont(medium2); } // Token: 0x0600168A RID: 5770 RVA: 0x00034C14 File Offset: 0x00032E14 [Token(Token = "0x600168A")] [Address(RVA = "0xDDBEF0", Offset = "0xDDA6F0", VA = "0x180DDBEF0", Slot = "22")] protected override void PlayHandlerMoveSE() { if (this.navigator.currentHandler.index != 3) { base.PlayHandlerMoveSE(); return; } Game.PlayHandlerSE(UIHandlerSFX.Voice); } // Token: 0x0600168B RID: 5771 RVA: 0x00034C48 File Offset: 0x00032E48 [Token(Token = "0x600168B")] [Address(RVA = "0xDDBF70", Offset = "0xDDA770", VA = "0x180DDBF70", Slot = "25")] protected override void SetDefault() { VolumeSettings volumeSettings = Game.Config.volumeSettings.SetDefault(); Game.EmitVolumeSettingsChangedEvent(); string system = ((IXmlDocumentType)this).System; } // Token: 0x0600168C RID: 5772 RVA: 0x00034C7C File Offset: 0x00032E7C [Token(Token = "0x600168C")] [Address(RVA = "0x3CB890", Offset = "0x3CA090", VA = "0x1803CB890")] public UISettingsAudio() { } // Token: 0x04002157 RID: 8535 [Token(Token = "0x4002157")] private const int VOICE_HANDLER_INDEX = 3; }