214 lines
11 KiB
C#
214 lines
11 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using Cpp2IlInjected;
|
|
using RecRoom.Core;
|
|
using UnityEngine;
|
|
using UnityEngine.EventSystems;
|
|
using UnityEngine.UI;
|
|
|
|
namespace RRUI
|
|
{
|
|
// Token: 0x020007D0 RID: 2000
|
|
[Token(Token = "0x20007D0")]
|
|
public class PressAndHoldButton : MonoBehaviour, IPointerDownHandler, IEventSystemHandler, IPointerUpHandler
|
|
{
|
|
// Token: 0x170009BF RID: 2495
|
|
// (get) Token: 0x06003868 RID: 14440 RVA: 0x000EB320 File Offset: 0x000E9520
|
|
// (set) Token: 0x06003869 RID: 14441 RVA: 0x000EB340 File Offset: 0x000E9540
|
|
[Token(Token = "0x170009BF")]
|
|
public bool ODBAFIFNIDO
|
|
{
|
|
[Token(Token = "0x6003868")]
|
|
[Address(RVA = "0x13AA410", Offset = "0x13A9210", VA = "0x1813AA410")]
|
|
get
|
|
{
|
|
return this.button.m_Interactable;
|
|
}
|
|
[Token(Token = "0x6003869")]
|
|
[Address(RVA = "0x13AA430", Offset = "0x13A9230", VA = "0x1813AA430")]
|
|
set
|
|
{
|
|
this.button.interactable = value;
|
|
if (!value && this.NKLGAGCHGPM != 0)
|
|
{
|
|
this.NKLGAGCHGPM = (ulong)0L;
|
|
}
|
|
}
|
|
}
|
|
|
|
// Token: 0x0600386A RID: 14442 RVA: 0x000EB378 File Offset: 0x000E9578
|
|
[Token(Token = "0x600386A")]
|
|
[Address(RVA = "0x13AA200", Offset = "0x13A9000", VA = "0x1813AA200", Slot = "4")]
|
|
public void OnPointerDown(PointerEventData OEKEOCOGKMG)
|
|
{
|
|
if (this.NKLGAGCHGPM != 0)
|
|
{
|
|
this.NKLGAGCHGPM = (ulong)0L;
|
|
}
|
|
Scheduler instance = SingletonMonoBehaviour.ONCPNMDGGKG;
|
|
PressAndHoldButton.GNKLNLBJHFM gnklnlbjhfm;
|
|
gnklnlbjhfm.System.IDisposable.Dispose();
|
|
gnklnlbjhfm.<>1__state = (int)((ulong)0L);
|
|
gnklnlbjhfm.<>4__this = this;
|
|
KFBABPAPIMB kfbabpapimb = instance.Run(gnklnlbjhfm);
|
|
this.NKLGAGCHGPM = kfbabpapimb;
|
|
}
|
|
|
|
// Token: 0x0600386B RID: 14443 RVA: 0x000EB3C8 File Offset: 0x000E95C8
|
|
[Token(Token = "0x600386B")]
|
|
[Address(RVA = "0x13AA300", Offset = "0x13A9100", VA = "0x1813AA300", Slot = "5")]
|
|
public void OnPointerUp(PointerEventData OEKEOCOGKMG)
|
|
{
|
|
float time = Time.time;
|
|
int num = 0;
|
|
float num2 = this.OIOLEMBCIMG((float)num);
|
|
this.OnClick.CNFDGDEOPPF();
|
|
if (this.NKLGAGCHGPM != 0)
|
|
{
|
|
this.NKLGAGCHGPM = (ulong)0L;
|
|
}
|
|
}
|
|
|
|
// Token: 0x0600386C RID: 14444 RVA: 0x000EB40C File Offset: 0x000E960C
|
|
[Token(Token = "0x600386C")]
|
|
[Address(RVA = "0x13AA0F0", Offset = "0x13A8EF0", VA = "0x1813AA0F0")]
|
|
private void OnDisable()
|
|
{
|
|
if (this.NKLGAGCHGPM != 0)
|
|
{
|
|
this.NKLGAGCHGPM = (ulong)0L;
|
|
}
|
|
}
|
|
|
|
// Token: 0x0600386D RID: 14445 RVA: 0x000EB42C File Offset: 0x000E962C
|
|
[Token(Token = "0x600386D")]
|
|
[Address(RVA = "0x13AA090", Offset = "0x13A8E90", VA = "0x1813AA090")]
|
|
private IEnumerator<KENFJGFMIPM> BMGPFLOFJKD()
|
|
{
|
|
/*
|
|
An exception occurred when decompiling this method (0600386D)
|
|
|
|
ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Collections.Generic.IEnumerator`1<KENFJGFMIPM> RRUI.PressAndHoldButton::BMGPFLOFJKD()
|
|
|
|
---> System.Exception: Basic block has to end with unconditional control flow.
|
|
{
|
|
Block_0:
|
|
call:void(GNKLNLBJHFM::System.IDisposable.Dispose, ldloc:GNKLNLBJHFM(var_0))
|
|
stfld:int32(GNKLNLBJHFM::<>1__state, ldloc:GNKLNLBJHFM(var_0), conv.u8:uint64[exp:int32](ldc.i8:int64[exp:uint64](0)))
|
|
stfld:PressAndHoldButton(GNKLNLBJHFM::<>4__this, ldloc:GNKLNLBJHFM(var_0), ldloc:PressAndHoldButton(this))
|
|
}
|
|
|
|
at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1852
|
|
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 355
|
|
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 1663
|
|
*/;
|
|
}
|
|
|
|
// Token: 0x0600386E RID: 14446 RVA: 0x000EB450 File Offset: 0x000E9650
|
|
[Token(Token = "0x600386E")]
|
|
[Address(RVA = "0x13AA0F0", Offset = "0x13A8EF0", VA = "0x1813AA0F0")]
|
|
private void IFMEGOFNBKC()
|
|
{
|
|
if (this.NKLGAGCHGPM != 0)
|
|
{
|
|
this.NKLGAGCHGPM = (ulong)0L;
|
|
}
|
|
}
|
|
|
|
// Token: 0x0600386F RID: 14447 RVA: 0x000EB470 File Offset: 0x000E9670
|
|
[Token(Token = "0x600386F")]
|
|
[Address(RVA = "0x13AA140", Offset = "0x13A8F40", VA = "0x1813AA140")]
|
|
private float OIOLEMBCIMG(float MOPKOPOKKEE)
|
|
{
|
|
/*
|
|
An exception occurred when decompiling this method (0600386F)
|
|
|
|
ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Single RRUI.PressAndHoldButton::OIOLEMBCIMG(System.Single)
|
|
|
|
---> System.Exception: Basic block has to end with unconditional control flow.
|
|
{
|
|
IL_00:
|
|
stloc:int32(var_0_01, ldc.i4:int32(0))
|
|
stloc:int32(var_1_03, ldc.i4:int32(0))
|
|
stloc:float32(var_2_0C, call:float32(Mathf::InverseLerp, ldloc:int32[exp:float32](var_0_01), ldloc:float32(MOPKOPOKKEE), ldloc:float32(MOPKOPOKKEE)))
|
|
stloc:float32(var_3_13, ldfld:float32(PressAndHoldButton::finalClickFrequency, ldloc:PressAndHoldButton(this)))
|
|
stloc:float32(var_3_21, call:float32(Mathf::SmoothStep, ldfld:float32(PressAndHoldButton::initialClickFrequency, ldloc:PressAndHoldButton(this)), ldloc:float32(var_3_13), ldloc:float32(MOPKOPOKKEE)))
|
|
brtrue(IL_00, cge:bool(ldloc:int32(var_1_03), ldloc:float32[exp:int32](var_3_21)))
|
|
}
|
|
|
|
at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1852
|
|
at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1878
|
|
at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1878
|
|
at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1846
|
|
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 355
|
|
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 1663
|
|
*/;
|
|
}
|
|
|
|
// Token: 0x06003870 RID: 14448 RVA: 0x000EB4A4 File Offset: 0x000E96A4
|
|
[Token(Token = "0x6003870")]
|
|
[Address(RVA = "0x13AA390", Offset = "0x13A9190", VA = "0x1813AA390")]
|
|
public PressAndHoldButton()
|
|
{
|
|
int num;
|
|
int num2;
|
|
OKNNKFGFODL oknnkfgfodl = new OKNNKFGFODL(32, num != 0, num2 != 0);
|
|
num2 = 0;
|
|
num = 0;
|
|
this.OnClick = oknnkfgfodl;
|
|
base..ctor();
|
|
}
|
|
|
|
// Token: 0x04003072 RID: 12402
|
|
[FieldOffset(Offset = "0x18")]
|
|
[Token(Token = "0x4003072")]
|
|
[SerializeField]
|
|
[DDPIINEJFMD(JIBDPHMGEGO.Self, false, false, false)]
|
|
private Button button;
|
|
|
|
// Token: 0x04003073 RID: 12403
|
|
[FieldOffset(Offset = "0x20")]
|
|
[Token(Token = "0x4003073")]
|
|
[SerializeField]
|
|
[Range(1f, 20f)]
|
|
private float initialClickFrequency = 3f;
|
|
|
|
// Token: 0x04003074 RID: 12404
|
|
[FieldOffset(Offset = "0x24")]
|
|
[Token(Token = "0x4003074")]
|
|
[SerializeField]
|
|
[Range(1f, 20f)]
|
|
private float finalClickFrequency = 10f;
|
|
|
|
// Token: 0x04003075 RID: 12405
|
|
[FieldOffset(Offset = "0x28")]
|
|
[Token(Token = "0x4003075")]
|
|
[SerializeField]
|
|
[Range(0.1f, 10f)]
|
|
private float timeToFinalFrequency = 2f;
|
|
|
|
// Token: 0x04003076 RID: 12406
|
|
[FieldOffset(Offset = "0x30")]
|
|
[Token(Token = "0x4003076")]
|
|
private KFBABPAPIMB NKLGAGCHGPM;
|
|
|
|
// Token: 0x04003077 RID: 12407
|
|
[FieldOffset(Offset = "0x38")]
|
|
[Token(Token = "0x4003077")]
|
|
private float AMKHIJBPAAN;
|
|
|
|
// Token: 0x04003078 RID: 12408
|
|
[FieldOffset(Offset = "0x40")]
|
|
[Token(Token = "0x4003078")]
|
|
public readonly OKNNKFGFODL OnClick;
|
|
}
|
|
}
|