332 lines
13 KiB
C#
332 lines
13 KiB
C#
using System;
|
|
using Cpp2IlInjected;
|
|
using Newtonsoft.Json.Converters;
|
|
using UnityEngine;
|
|
using UnityEngine.UI;
|
|
|
|
// Token: 0x02000252 RID: 594
|
|
[Token(Token = "0x2000252")]
|
|
public class UISettingsScreen : UIValueBindingBase
|
|
{
|
|
// Token: 0x060016B8 RID: 5816 RVA: 0x000020D3 File Offset: 0x000002D3
|
|
[Token(Token = "0x60016B8")]
|
|
[Address(RVA = "0xDE23E0", Offset = "0xDE0BE0", VA = "0x180DE23E0", Slot = "11")]
|
|
public override void Init(CanvasGroup mainCanvasGroup, Action cancelHandler, Text title)
|
|
{
|
|
throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
|
|
}
|
|
|
|
// Token: 0x060016B9 RID: 5817 RVA: 0x000020D3 File Offset: 0x000002D3
|
|
[Token(Token = "0x60016B9")]
|
|
[Address(RVA = "0xDE18F0", Offset = "0xDE00F0", VA = "0x180DE18F0")]
|
|
private UIValueBindingHandler[] GetActiveHandlers()
|
|
{
|
|
throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
|
|
}
|
|
|
|
// Token: 0x060016BA RID: 5818 RVA: 0x000020D3 File Offset: 0x000002D3
|
|
[Token(Token = "0x60016BA")]
|
|
[Address(RVA = "0xDE2260", Offset = "0xDE0A60", VA = "0x180DE2260")]
|
|
private string[] GetResolutionContents()
|
|
{
|
|
throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
|
|
}
|
|
|
|
// Token: 0x060016BB RID: 5819 RVA: 0x0003665C File Offset: 0x0003485C
|
|
[Token(Token = "0x60016BB")]
|
|
[Address(RVA = "0xDE3B80", Offset = "0xDE2380", VA = "0x180DE3B80")]
|
|
private void OnFullScreenValueChanged(int value)
|
|
{
|
|
ScreenSettings screenSettings = Game.Config.screenSettings;
|
|
bool flag = value == 1;
|
|
screenSettings.fullScreen = flag;
|
|
Game.UpdateResolutionSettings(Game.Config.screenSettings);
|
|
Game.PlayHandlerSE(UIHandlerSFX.Navigation);
|
|
}
|
|
|
|
// Token: 0x060016BC RID: 5820 RVA: 0x000366A0 File Offset: 0x000348A0
|
|
[Token(Token = "0x60016BC")]
|
|
[Address(RVA = "0xDE3CA0", Offset = "0xDE24A0", VA = "0x180DE3CA0")]
|
|
private void OnResolutionValueChanged(int value)
|
|
{
|
|
Game.Config.screenSettings.resolutionSet = value;
|
|
Game.UpdateResolutionSettings(Game.Config.screenSettings);
|
|
Game.PlayHandlerSE(UIHandlerSFX.Navigation);
|
|
}
|
|
|
|
// Token: 0x060016BD RID: 5821 RVA: 0x000366DC File Offset: 0x000348DC
|
|
[Token(Token = "0x60016BD")]
|
|
[Address(RVA = "0xDE3D30", Offset = "0xDE2530", VA = "0x180DE3D30")]
|
|
private void OnVSyncValueChanged(int value)
|
|
{
|
|
ScreenSettings screenSettings = Game.Config.screenSettings;
|
|
bool flag = value == 1;
|
|
screenSettings.vSync = flag;
|
|
Game.UpdateVSyncSettings(Game.Config.screenSettings);
|
|
Game.PlayHandlerSE(UIHandlerSFX.Navigation);
|
|
this.UpdateFpsHandlerLockState();
|
|
}
|
|
|
|
// Token: 0x060016BE RID: 5822 RVA: 0x00036728 File Offset: 0x00034928
|
|
[Token(Token = "0x60016BE")]
|
|
[Address(RVA = "0xDE3AF0", Offset = "0xDE22F0", VA = "0x180DE3AF0")]
|
|
private void OnFpsValueChanged(int value)
|
|
{
|
|
Game.Config.screenSettings.fps = (FPSLimitation)value;
|
|
Game.UpdateFPSSettings(Game.Config.screenSettings);
|
|
Game.PlayHandlerSE(UIHandlerSFX.Navigation);
|
|
}
|
|
|
|
// Token: 0x060016BF RID: 5823 RVA: 0x00036764 File Offset: 0x00034964
|
|
[Token(Token = "0x60016BF")]
|
|
[Address(RVA = "0xDE3C10", Offset = "0xDE2410", VA = "0x180DE3C10")]
|
|
private void OnQualityValueChanged(int value)
|
|
{
|
|
Game.Config.screenSettings.qualitySet = value;
|
|
Game.UpdateQualitySettings(Game.Config.screenSettings);
|
|
Game.PlayHandlerSE(UIHandlerSFX.Navigation);
|
|
}
|
|
|
|
// Token: 0x060016C0 RID: 5824 RVA: 0x000367A0 File Offset: 0x000349A0
|
|
[Token(Token = "0x60016C0")]
|
|
[Address(RVA = "0xDE3A70", Offset = "0xDE2270", VA = "0x180DE3A70")]
|
|
private void OnDofValueChanged(int value)
|
|
{
|
|
ScreenSettings screenSettings = Game.Config.screenSettings;
|
|
bool flag = value == 1;
|
|
screenSettings.depthOfField = flag;
|
|
Game.EmitScreenSettingChangedEvent();
|
|
Game.PlayHandlerSE(UIHandlerSFX.Navigation);
|
|
}
|
|
|
|
// Token: 0x060016C1 RID: 5825 RVA: 0x000367DC File Offset: 0x000349DC
|
|
[Token(Token = "0x60016C1")]
|
|
[Address(RVA = "0xDE3970", Offset = "0xDE2170", VA = "0x180DE3970")]
|
|
private void OnBloomValueChanged(int value)
|
|
{
|
|
ScreenSettings screenSettings = Game.Config.screenSettings;
|
|
bool flag = value == 1;
|
|
screenSettings.bloomEffect = flag;
|
|
Game.EmitScreenSettingChangedEvent();
|
|
Game.PlayHandlerSE(UIHandlerSFX.Navigation);
|
|
}
|
|
|
|
// Token: 0x060016C2 RID: 5826 RVA: 0x00036818 File Offset: 0x00034A18
|
|
[Token(Token = "0x60016C2")]
|
|
[Address(RVA = "0xDE39F0", Offset = "0xDE21F0", VA = "0x180DE39F0")]
|
|
private void OnBrightnessValueChanged(int value)
|
|
{
|
|
Game.Config.screenSettings.brightnessSet = value;
|
|
Game.EmitScreenSettingChangedEvent();
|
|
Game.PlayHandlerSE(UIHandlerSFX.Navigation);
|
|
}
|
|
|
|
// Token: 0x060016C3 RID: 5827 RVA: 0x0003684C File Offset: 0x00034A4C
|
|
[Token(Token = "0x60016C3")]
|
|
[Address(RVA = "0xDE32F0", Offset = "0xDE1AF0", VA = "0x180DE32F0", Slot = "20")]
|
|
public override void Localize(LocalizationData data)
|
|
{
|
|
string text = data.systemText.GetText(91);
|
|
this.titleText = text;
|
|
UIValueBindingHandler[] topHandlers = this.topHandlers;
|
|
GameTextData systemText = data.systemText;
|
|
UIValueBindingHandler uivalueBindingHandler = topHandlers[0];
|
|
string text2 = systemText.GetText(104);
|
|
uivalueBindingHandler.UpdateLabelText(text2);
|
|
UIValueBindingHandler[] topHandlers2 = this.topHandlers;
|
|
GameTextData systemText2 = data.systemText;
|
|
UIValueBindingHandler uivalueBindingHandler2 = topHandlers2[1];
|
|
string text3 = systemText2.GetText(105);
|
|
uivalueBindingHandler2.UpdateLabelText(text3);
|
|
UIValueBindingHandler[] topHandlers3 = this.topHandlers;
|
|
GameTextData systemText3 = data.systemText;
|
|
UIValueBindingHandler uivalueBindingHandler3 = topHandlers3[2];
|
|
string text4 = systemText3.GetText(108);
|
|
uivalueBindingHandler3.UpdateLabelText(text4);
|
|
UIValueBindingHandler[] topHandlers4 = this.topHandlers;
|
|
GameTextData systemText4 = data.systemText;
|
|
UIValueBindingHandler uivalueBindingHandler4 = topHandlers4[3];
|
|
string text5 = systemText4.GetText(120);
|
|
uivalueBindingHandler4.UpdateLabelText(text5);
|
|
UIValueBindingHandler[] topHandlers5 = this.topHandlers;
|
|
GameTextData systemText5 = data.systemText;
|
|
UIValueBindingHandler uivalueBindingHandler5 = topHandlers5[4];
|
|
string text6 = systemText5.GetText(106);
|
|
uivalueBindingHandler5.UpdateLabelText(text6);
|
|
UIValueBindingHandler[] topHandlers6 = this.topHandlers;
|
|
GameTextData systemText6 = data.systemText;
|
|
UIValueBindingHandler uivalueBindingHandler6 = topHandlers6[5];
|
|
string text7 = systemText6.GetText(107);
|
|
uivalueBindingHandler6.UpdateLabelText(text7);
|
|
UIValueBindingHandler[] topHandlers7 = this.topHandlers;
|
|
GameTextData systemText7 = data.systemText;
|
|
UIValueBindingHandler uivalueBindingHandler7 = topHandlers7[6];
|
|
string text8 = systemText7.GetText(103);
|
|
uivalueBindingHandler7.UpdateLabelText(text8);
|
|
UIValueBindingHandler[] topHandlers8 = this.topHandlers;
|
|
GameTextData systemText8 = data.systemText;
|
|
UIValueBindingHandler uivalueBindingHandler8 = topHandlers8[7];
|
|
string text9 = systemText8.GetText(96);
|
|
uivalueBindingHandler8.UpdateLabelText(text9);
|
|
UIValueBindingHandler[] topHandlers9 = this.topHandlers;
|
|
GameTextData systemText9 = data.systemText;
|
|
UIValueBindingHandler uivalueBindingHandler9 = topHandlers9[0];
|
|
string[] switchText = base.GetSwitchText(systemText9);
|
|
uivalueBindingHandler9.UpdateValueText(switchText);
|
|
UIValueBindingHandler[] topHandlers10 = this.topHandlers;
|
|
GameTextData systemText10 = data.systemText;
|
|
UIValueBindingHandler uivalueBindingHandler10 = topHandlers10[2];
|
|
string[] switchText2 = base.GetSwitchText(systemText10);
|
|
uivalueBindingHandler10.UpdateValueText(switchText2);
|
|
UIValueBindingHandler[] topHandlers11 = this.topHandlers;
|
|
GameTextData systemText11 = data.systemText;
|
|
UIValueBindingHandler uivalueBindingHandler11 = topHandlers11[3];
|
|
string[] fpsText = base.GetFpsText(systemText11);
|
|
uivalueBindingHandler11.UpdateValueText(fpsText);
|
|
UIValueBindingHandler[] topHandlers12 = this.topHandlers;
|
|
GameTextData systemText12 = data.systemText;
|
|
UIValueBindingHandler uivalueBindingHandler12 = topHandlers12[3];
|
|
string text10 = systemText12.GetText(331);
|
|
uivalueBindingHandler12.UpdateLockText(text10);
|
|
UIValueBindingHandler[] topHandlers13 = this.topHandlers;
|
|
GameTextData systemText13 = data.systemText;
|
|
UIValueBindingHandler uivalueBindingHandler13 = topHandlers13[4];
|
|
string[] qualityText = base.GetQualityText(systemText13);
|
|
uivalueBindingHandler13.UpdateValueText(qualityText);
|
|
UIValueBindingHandler[] topHandlers14 = this.topHandlers;
|
|
GameTextData systemText14 = data.systemText;
|
|
UIValueBindingHandler uivalueBindingHandler14 = topHandlers14[5];
|
|
string[] switchText3 = base.GetSwitchText(systemText14);
|
|
uivalueBindingHandler14.UpdateValueText(switchText3);
|
|
UIValueBindingHandler[] topHandlers15 = this.topHandlers;
|
|
GameTextData systemText15 = data.systemText;
|
|
UIValueBindingHandler uivalueBindingHandler15 = topHandlers15[6];
|
|
string[] switchText4 = base.GetSwitchText(systemText15);
|
|
uivalueBindingHandler15.UpdateValueText(switchText4);
|
|
GameTextData systemText16 = data.systemText;
|
|
UILabelHandler resetHandler = this.resetHandler;
|
|
string text11 = systemText16.GetText(15);
|
|
resetHandler.SetLabel(text11);
|
|
GameTextData systemText17 = data.systemText;
|
|
UILabelHandler backHandler = this.backHandler;
|
|
string text12 = systemText17.GetText(12);
|
|
backHandler.SetLabel(text12);
|
|
UIValueBindingHandler[] topHandlers16 = this.topHandlers;
|
|
int num = 0;
|
|
int length = topHandlers16.Length;
|
|
if (num < length)
|
|
{
|
|
UIValueBindingHandler uivalueBindingHandler16 = topHandlers16[num];
|
|
GameFontPack fontPack = data.fontPack;
|
|
uivalueBindingHandler16.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: 0x060016C4 RID: 5828 RVA: 0x00036BE8 File Offset: 0x00034DE8
|
|
[Token(Token = "0x60016C4")]
|
|
[Address(RVA = "0xDE1D50", Offset = "0xDE0550", VA = "0x180DE1D50", Slot = "23")]
|
|
protected override ValueType[] GetConfigValues()
|
|
{
|
|
ValueType[] array;
|
|
int brightnessSet;
|
|
for (;;)
|
|
{
|
|
array = new ValueType[8];
|
|
bool fullScreen = Game.Config.screenSettings.fullScreen;
|
|
if (!fullScreen || fullScreen)
|
|
{
|
|
array[0] = fullScreen;
|
|
int resolutionSet = Game.Config.screenSettings.resolutionSet;
|
|
if (resolutionSet == 0 || resolutionSet != 0)
|
|
{
|
|
array[1] = resolutionSet;
|
|
bool vSync = Game.Config.screenSettings.vSync;
|
|
if (!vSync || vSync)
|
|
{
|
|
array[2] = vSync;
|
|
FPSLimitation fps = Game.Config.screenSettings.fps;
|
|
if (fps == FPSLimitation.FPS30 || fps != FPSLimitation.FPS30)
|
|
{
|
|
array[3] = fps;
|
|
int qualitySet = Game.Config.screenSettings.qualitySet;
|
|
if (qualitySet == 0 || qualitySet != 0)
|
|
{
|
|
array[4] = qualitySet;
|
|
bool flag = Game.Config.screenSettings.depthOfField;
|
|
if (!flag || flag)
|
|
{
|
|
array[5] = flag;
|
|
bool bloomEffect = Game.Config.screenSettings.bloomEffect;
|
|
flag = bloomEffect;
|
|
if (!bloomEffect || bloomEffect)
|
|
{
|
|
array[6] = flag;
|
|
brightnessSet = Game.Config.screenSettings.brightnessSet;
|
|
if (brightnessSet == 0 || brightnessSet != 0)
|
|
{
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
array[7] = brightnessSet;
|
|
return array;
|
|
}
|
|
|
|
// Token: 0x060016C5 RID: 5829 RVA: 0x000020D3 File Offset: 0x000002D3
|
|
[Token(Token = "0x60016C5")]
|
|
[Address(RVA = "0xDE3FF0", Offset = "0xDE27F0", VA = "0x180DE3FF0", Slot = "24")]
|
|
protected override void UpdateTopHandlers()
|
|
{
|
|
throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
|
|
}
|
|
|
|
// Token: 0x060016C6 RID: 5830 RVA: 0x00036D48 File Offset: 0x00034F48
|
|
[Token(Token = "0x60016C6")]
|
|
[Address(RVA = "0xDE3E70", Offset = "0xDE2670", VA = "0x180DE3E70")]
|
|
private void UpdateFpsHandlerLockState()
|
|
{
|
|
ScreenSettings screenSettings = Game.Config.screenSettings;
|
|
UIValueBindingHandler[] topHandlers = this.topHandlers;
|
|
if (!screenSettings.vSync)
|
|
{
|
|
topHandlers[3].UnLock();
|
|
return;
|
|
}
|
|
UIValueBindingHandler uivalueBindingHandler = topHandlers[3];
|
|
string text = Game.<UISystemText>k__BackingField.GetText(331);
|
|
uivalueBindingHandler.Lock(text);
|
|
}
|
|
|
|
// Token: 0x060016C7 RID: 5831 RVA: 0x00036DA8 File Offset: 0x00034FA8
|
|
[Token(Token = "0x60016C7")]
|
|
[Address(RVA = "0xDE3DE0", Offset = "0xDE25E0", VA = "0x180DE3DE0", Slot = "25")]
|
|
protected override void SetDefault()
|
|
{
|
|
Game.UpdateVSyncSettings(Game.Config.screenSettings.SetDefault());
|
|
Game.EmitScreenSettingChangedEvent();
|
|
string system = ((IXmlDocumentType)this).System;
|
|
}
|
|
|
|
// Token: 0x060016C8 RID: 5832 RVA: 0x00036DE0 File Offset: 0x00034FE0
|
|
[Token(Token = "0x60016C8")]
|
|
[Address(RVA = "0x3CB890", Offset = "0x3CA090", VA = "0x1803CB890")]
|
|
public UISettingsScreen()
|
|
{
|
|
}
|
|
}
|