174 lines
6.7 KiB
C#
174 lines
6.7 KiB
C#
using System;
|
|
using Cpp2IlInjected;
|
|
using DG.Tweening;
|
|
using DG.Tweening.Core;
|
|
using DG.Tweening.Plugins.Options;
|
|
using MarsSDK;
|
|
using UnityEngine;
|
|
using UnityEngine.UI;
|
|
|
|
// Token: 0x02000290 RID: 656
|
|
[Token(Token = "0x2000290")]
|
|
public class UIToggleHandler : UIHandlerBase
|
|
{
|
|
// Token: 0x0600190A RID: 6410 RVA: 0x0003CF78 File Offset: 0x0003B178
|
|
[Token(Token = "0x600190A")]
|
|
[Address(RVA = "0xCC2C80", Offset = "0xCC1480", VA = "0x180CC2C80")]
|
|
public bool GetToggle()
|
|
{
|
|
return this.isToggle;
|
|
}
|
|
|
|
// Token: 0x0600190B RID: 6411 RVA: 0x0003CF8C File Offset: 0x0003B18C
|
|
[Token(Token = "0x600190B")]
|
|
[Address(RVA = "0xDF0030", Offset = "0xDEE830", VA = "0x180DF0030")]
|
|
public void Init(bool isToggle, Action<bool> valueChangedHandler)
|
|
{
|
|
this.isToggle = isToggle;
|
|
Text text = this.value;
|
|
string[] array = this.toggleText;
|
|
if (isToggle)
|
|
{
|
|
}
|
|
string text2 = array[0];
|
|
text.text = text2;
|
|
this.valueChangedHandler = valueChangedHandler;
|
|
throw new NullReferenceException();
|
|
}
|
|
|
|
// Token: 0x0600190C RID: 6412 RVA: 0x0003CFD0 File Offset: 0x0003B1D0
|
|
[Token(Token = "0x600190C")]
|
|
[Address(RVA = "0x65D0E0", Offset = "0x65B8E0", VA = "0x18065D0E0")]
|
|
public void SetToggleTextArray(params string[] array)
|
|
{
|
|
/*
|
|
An exception occurred when decompiling this method (0600190C)
|
|
|
|
ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Void UIToggleHandler::SetToggleTextArray(System.String[])
|
|
|
|
---> System.Exception: Basic block has to end with unconditional control flow.
|
|
{; Block_0:; stfld:string[](UIToggleHandler::toggleText, ldloc:UIToggleHandler(this), ldloc:string[](array)); };
|
|
at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1810
|
|
at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.Optimize(DecompilerContext context, ILBlock method, AutoPropertyProvider autoPropertyProvider, StateMachineKind& stateMachineKind, MethodDef& inlinedMethod, AsyncMethodDebugInfo& asyncInfo, ILAstOptimizationStep abortBeforeStep) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 344
|
|
at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(IEnumerable`1 parameters, MethodDebugInfoBuilder& builder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 123
|
|
at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(MethodDef methodDef, DecompilerContext context, AutoPropertyProvider autoPropertyProvider, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, StringBuilder sb, MethodDebugInfoBuilder& stmtsBuilder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 88
|
|
--- End of inner exception stack trace ---
|
|
at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(MethodDef methodDef, DecompilerContext context, AutoPropertyProvider autoPropertyProvider, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, StringBuilder sb, MethodDebugInfoBuilder& stmtsBuilder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 92
|
|
at ICSharpCode.Decompiler.Ast.AstBuilder.AddMethodBody(EntityDeclaration methodNode, EntityDeclaration& updatedNode, MethodDef method, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, MethodKind methodKind) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstBuilder.cs:line 1618
|
|
*/;
|
|
}
|
|
|
|
// Token: 0x0600190D RID: 6413 RVA: 0x0003CFE4 File Offset: 0x0003B1E4
|
|
[Token(Token = "0x600190D")]
|
|
[Address(RVA = "0xDF01B0", Offset = "0xDEE9B0", VA = "0x180DF01B0", Slot = "8")]
|
|
public override void OnSelect()
|
|
{
|
|
TweenerCore<Vector3, Vector3, VectorOptions> tweenerCore = ShortcutExtensions.DOScale(this.value.rectTransform, 1.25f, 0.2f).SetEase((Ease)((uint)3)).SetUpdate(true)
|
|
.Play<TweenerCore<Vector3, Vector3, VectorOptions>>();
|
|
Action<UIHandlerBase> onSelectedHandler = this.onSelectedHandler;
|
|
if (onSelectedHandler != 0)
|
|
{
|
|
onSelectedHandler(this);
|
|
return;
|
|
}
|
|
}
|
|
|
|
// Token: 0x0600190E RID: 6414 RVA: 0x0003D038 File Offset: 0x0003B238
|
|
[Token(Token = "0x600190E")]
|
|
[Address(RVA = "0xDF00D0", Offset = "0xDEE8D0", VA = "0x180DF00D0", Slot = "9")]
|
|
public override void OnDeselect()
|
|
{
|
|
TweenerCore<Vector3, Vector3, VectorOptions> tweenerCore = ShortcutExtensions.DOScale(this.value.rectTransform, 1f, 0.2f).SetEase((Ease)((uint)3)).SetUpdate(true)
|
|
.Play<TweenerCore<Vector3, Vector3, VectorOptions>>();
|
|
Action<UIHandlerBase> onDeselectedHandler = this.onDeselectedHandler;
|
|
if (onDeselectedHandler != 0)
|
|
{
|
|
onDeselectedHandler(this);
|
|
return;
|
|
}
|
|
}
|
|
|
|
// Token: 0x0600190F RID: 6415 RVA: 0x0003D08C File Offset: 0x0003B28C
|
|
[Token(Token = "0x600190F")]
|
|
[Address(RVA = "0xDF02C0", Offset = "0xDEEAC0", VA = "0x180DF02C0")]
|
|
public void Submit()
|
|
{
|
|
bool flag = this.isToggle;
|
|
Text text = this.value;
|
|
bool flag2 = !flag;
|
|
this.isToggle = flag2;
|
|
string[] array = this.toggleText;
|
|
if (!flag)
|
|
{
|
|
}
|
|
string text2 = array[0];
|
|
text.text = text2;
|
|
Action<bool> action = this.valueChangedHandler;
|
|
if (action != 0)
|
|
{
|
|
bool flag3 = this.isToggle;
|
|
action(flag3);
|
|
return;
|
|
}
|
|
}
|
|
|
|
// Token: 0x06001910 RID: 6416 RVA: 0x0003D0F4 File Offset: 0x0003B2F4
|
|
[Token(Token = "0x6001910")]
|
|
[Address(RVA = "0xDF0290", Offset = "0xDEEA90", VA = "0x180DF0290")]
|
|
public void SetLabel(string value)
|
|
{
|
|
bool flag = ((ICanvasElement)this.label).IsDestroyed();
|
|
}
|
|
|
|
// Token: 0x06001911 RID: 6417 RVA: 0x0003D114 File Offset: 0x0003B314
|
|
[Token(Token = "0x6001911")]
|
|
[Address(RVA = "0xDF0390", Offset = "0xDEEB90", VA = "0x180DF0390")]
|
|
public UIToggleHandler()
|
|
{
|
|
string[] array;
|
|
for (;;)
|
|
{
|
|
array = new string[2];
|
|
if ("Off" == 0 || "Off" != 0)
|
|
{
|
|
array[0] = "Off";
|
|
if ("ON" == 0 || "ON" != 0)
|
|
{
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
array[1] = "ON";
|
|
this.toggleText = array;
|
|
base..ctor();
|
|
}
|
|
|
|
// Token: 0x04002304 RID: 8964
|
|
[FieldOffset(Offset = "0x68")]
|
|
[Token(Token = "0x4002304")]
|
|
[SerializeField]
|
|
private Text label;
|
|
|
|
// Token: 0x04002305 RID: 8965
|
|
[FieldOffset(Offset = "0x70")]
|
|
[Token(Token = "0x4002305")]
|
|
[SerializeField]
|
|
private Text value;
|
|
|
|
// Token: 0x04002306 RID: 8966
|
|
[FieldOffset(Offset = "0x78")]
|
|
[Token(Token = "0x4002306")]
|
|
[SerializeField]
|
|
private bool isToggle;
|
|
|
|
// Token: 0x04002307 RID: 8967
|
|
[FieldOffset(Offset = "0x80")]
|
|
[Token(Token = "0x4002307")]
|
|
private Action<bool> valueChangedHandler;
|
|
|
|
// Token: 0x04002308 RID: 8968
|
|
[FieldOffset(Offset = "0x88")]
|
|
[Token(Token = "0x4002308")]
|
|
private string[] toggleText;
|
|
}
|