using System; using Cpp2IlInjected; using Newtonsoft.Json.Converters; using UnityEngine; using UnityEngine.UI; // Token: 0x0200028E RID: 654 [Token(Token = "0x200028E")] public class UISettingsAudio : UIValueBindingBase { // Token: 0x06001882 RID: 6274 RVA: 0x00038BD8 File Offset: 0x00036DD8 [Token(Token = "0x6001882")] [Address(RVA = "0x950DD0", Offset = "0x94FDD0", VA = "0x180950DD0", 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: 0x06001883 RID: 6275 RVA: 0x00039228 File Offset: 0x00037428 [Token(Token = "0x6001883")] [Address(RVA = "0x952700", Offset = "0x951700", VA = "0x180952700")] 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: 0x06001884 RID: 6276 RVA: 0x0003926C File Offset: 0x0003746C [Token(Token = "0x6001884")] [Address(RVA = "0x952550", Offset = "0x951550", VA = "0x180952550")] 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: 0x06001885 RID: 6277 RVA: 0x000392B0 File Offset: 0x000374B0 [Token(Token = "0x6001885")] [Address(RVA = "0x9525E0", Offset = "0x9515E0", VA = "0x1809525E0")] 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: 0x06001886 RID: 6278 RVA: 0x000392F4 File Offset: 0x000374F4 [Token(Token = "0x6001886")] [Address(RVA = "0x952670", Offset = "0x951670", VA = "0x180952670")] 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: 0x06001887 RID: 6279 RVA: 0x00039338 File Offset: 0x00037538 [Token(Token = "0x6001887")] [Address(RVA = "0x950B10", Offset = "0x94FB10", VA = "0x180950B10", 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: 0x06001888 RID: 6280 RVA: 0x000393F4 File Offset: 0x000375F4 [Token(Token = "0x6001888")] [Address(RVA = "0x9528A0", Offset = "0x9518A0", VA = "0x1809528A0", Slot = "24")] protected override void UpdateTopHandlers() { UIValueBindingHandler uivalueBindingHandler = this.topHandlers[0]; int wholeVolume = Game.Config.volumeSettings.wholeVolume; uivalueBindingHandler.UpdatePointer(wholeVolume); UIValueBindingHandler uivalueBindingHandler2 = this.topHandlers[1]; int ambienceVolume = Game.Config.volumeSettings.ambienceVolume; uivalueBindingHandler2.UpdatePointer(ambienceVolume); UIValueBindingHandler uivalueBindingHandler3 = this.topHandlers[2]; int sfxVolume = Game.Config.volumeSettings.sfxVolume; uivalueBindingHandler3.UpdatePointer(sfxVolume); UIValueBindingHandler uivalueBindingHandler4 = this.topHandlers[3]; int voiceVolume = Game.Config.volumeSettings.voiceVolume; uivalueBindingHandler4.UpdatePointer(voiceVolume); } // Token: 0x06001889 RID: 6281 RVA: 0x000394AC File Offset: 0x000376AC [Token(Token = "0x6001889")] [Address(RVA = "0x952280", Offset = "0x951280", VA = "0x180952280", 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: 0x0600188A RID: 6282 RVA: 0x00039650 File Offset: 0x00037850 [Token(Token = "0x600188A")] [Address(RVA = "0x952790", Offset = "0x951790", VA = "0x180952790", Slot = "22")] protected override void PlayHandlerMoveSE() { if (this.navigator.currentHandler.index != 3) { base.PlayHandlerMoveSE(); return; } Game.PlayHandlerSE(UIHandlerSFX.Voice); } // Token: 0x0600188B RID: 6283 RVA: 0x00039684 File Offset: 0x00037884 [Token(Token = "0x600188B")] [Address(RVA = "0x952810", Offset = "0x951810", VA = "0x180952810", Slot = "25")] protected override void SetDefault() { VolumeSettings volumeSettings = Game.Config.volumeSettings.SetDefault(); Game.EmitVolumeSettingsChangedEvent(); string system = ((IXmlDocumentType)this).System; } // Token: 0x0600188C RID: 6284 RVA: 0x000396B8 File Offset: 0x000378B8 [Token(Token = "0x600188C")] [Address(RVA = "0x3ED6F0", Offset = "0x3EC6F0", VA = "0x1803ED6F0")] public UISettingsAudio() { } // Token: 0x0400236F RID: 9071 [Token(Token = "0x400236F")] private const int VOICE_HANDLER_INDEX = 3; }