scripts
This commit is contained in:
@@ -0,0 +1,427 @@
|
||||
using System;
|
||||
using RecRoom;
|
||||
using UnityEngine;
|
||||
using UnityEngine.EventSystems;
|
||||
|
||||
namespace AGUI.StackedUI
|
||||
{
|
||||
// Token: 0x02001078 RID: 4216
|
||||
public class UI3DScaler : UIBehaviour
|
||||
{
|
||||
// Token: 0x06023A1E RID: 145950 RVA: 0x009B4CFC File Offset: 0x009B2EFC
|
||||
public void BENMINEKLDP()
|
||||
{
|
||||
Transform root = base.transform.root;
|
||||
Canvas[] componentsInChildren = root.GetComponentsInChildren<Canvas>(false);
|
||||
for (int i = 0; i < componentsInChildren.Length; i += 0)
|
||||
{
|
||||
Canvas canvas = componentsInChildren[i];
|
||||
if (canvas.isRootCanvas)
|
||||
{
|
||||
this._canvas = canvas;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06023A1F RID: 145951 RVA: 0x009B4D4C File Offset: 0x009B2F4C
|
||||
protected virtual void PBAMMNBPFIC()
|
||||
{
|
||||
base.OnRectTransformDimensionsChange();
|
||||
if (this.ANMPEPFMFOD() != null)
|
||||
{
|
||||
this.Refresh();
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06023A20 RID: 145952 RVA: 0x009B4D6C File Offset: 0x009B2F6C
|
||||
public void KECOHBOKMNH(Canvas NOBAPCOKFIL)
|
||||
{
|
||||
this._canvas = NOBAPCOKFIL;
|
||||
}
|
||||
|
||||
// Token: 0x06023A21 RID: 145953 RVA: 0x009B4D78 File Offset: 0x009B2F78
|
||||
public void Refresh()
|
||||
{
|
||||
if (this.NAIMAKKKEKE == null)
|
||||
{
|
||||
Debug.LogWarning("Missing canvas on " + base.gameObject.name + "!", base.gameObject);
|
||||
return;
|
||||
}
|
||||
RectTransform rectTransform = base.transform.parent as RectTransform;
|
||||
float height = rectTransform.rect.height;
|
||||
float width = rectTransform.rect.width;
|
||||
float num = 1f / this.NAIMAKKKEKE.transform.localScale.x;
|
||||
float num2 = 1f / this.NAIMAKKKEKE.transform.localScale.y;
|
||||
float num3 = 1f / this.NAIMAKKKEKE.transform.localScale.z;
|
||||
float num4 = width / num;
|
||||
float num5 = height / num2;
|
||||
if (this.facePlaneTransform != null)
|
||||
{
|
||||
Vector3 localScale = this.facePlaneTransform.localScale;
|
||||
num4 *= localScale.x;
|
||||
num5 *= localScale.y;
|
||||
}
|
||||
UI3DScaler.ZScaleMatch zscaleMatch = this.zScaleMatch;
|
||||
float num6;
|
||||
if (zscaleMatch != UI3DScaler.ZScaleMatch.X)
|
||||
{
|
||||
if (zscaleMatch != UI3DScaler.ZScaleMatch.Y)
|
||||
{
|
||||
if (this.facePlaneTransform != null)
|
||||
{
|
||||
num6 = Mathf.Abs(this.facePlaneTransform.localPosition.z) / num3;
|
||||
}
|
||||
else
|
||||
{
|
||||
num6 = 1f;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
num6 = num5;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
num6 = num4;
|
||||
}
|
||||
Vector3 vector = new Vector3(num * num4, num2 * num5, num3 * num6).NAHCAKKCICD(this.scaleModifier);
|
||||
if (vector.x <= 0f || vector.y <= 0f || vector.z <= 0f)
|
||||
{
|
||||
return;
|
||||
}
|
||||
base.transform.localScale = vector;
|
||||
for (int i = 0; i < base.transform.childCount; i++)
|
||||
{
|
||||
base.transform.GetChild(i).transform.localScale = Vector3.one;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06023A22 RID: 145954 RVA: 0x009B4FA8 File Offset: 0x009B31A8
|
||||
public Canvas FBKFAIOPOIA()
|
||||
{
|
||||
if (this._canvas == null)
|
||||
{
|
||||
this.OKEIKAKOIEP();
|
||||
}
|
||||
return this._canvas;
|
||||
}
|
||||
|
||||
// Token: 0x06023A23 RID: 145955 RVA: 0x009B4FC8 File Offset: 0x009B31C8
|
||||
protected virtual void LGHJOJEMNCM()
|
||||
{
|
||||
base.OnRectTransformDimensionsChange();
|
||||
if (this.ANMPEPFMFOD() != null)
|
||||
{
|
||||
this.NLEDJLAHLCC();
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06023A24 RID: 145956 RVA: 0x009B4FE8 File Offset: 0x009B31E8
|
||||
public void OKEIKAKOIEP()
|
||||
{
|
||||
Transform root = base.transform.root;
|
||||
Canvas[] componentsInChildren = root.GetComponentsInChildren<Canvas>(true);
|
||||
for (int i = 0; i < componentsInChildren.Length; i += 0)
|
||||
{
|
||||
Canvas canvas = componentsInChildren[i];
|
||||
if (canvas.isRootCanvas)
|
||||
{
|
||||
this._canvas = canvas;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06023A25 RID: 145957 RVA: 0x009B5038 File Offset: 0x009B3238
|
||||
public Canvas FHJBNLEAOMB()
|
||||
{
|
||||
if (this._canvas == null)
|
||||
{
|
||||
this.OKEIKAKOIEP();
|
||||
}
|
||||
return this._canvas;
|
||||
}
|
||||
|
||||
// Token: 0x17001086 RID: 4230
|
||||
// (get) Token: 0x06023A26 RID: 145958 RVA: 0x009B5058 File Offset: 0x009B3258
|
||||
// (set) Token: 0x06023A31 RID: 145969 RVA: 0x009B5414 File Offset: 0x009B3614
|
||||
public Canvas NAIMAKKKEKE
|
||||
{
|
||||
get
|
||||
{
|
||||
if (this._canvas == null)
|
||||
{
|
||||
this.FetchRootCanvas();
|
||||
}
|
||||
return this._canvas;
|
||||
}
|
||||
set
|
||||
{
|
||||
this._canvas = value;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06023A27 RID: 145959 RVA: 0x009B5078 File Offset: 0x009B3278
|
||||
protected virtual void PLGJCNLHLFB()
|
||||
{
|
||||
base.OnRectTransformDimensionsChange();
|
||||
if (this.FBKFAIOPOIA() != null)
|
||||
{
|
||||
this.JBBHOBCCJPC();
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06023A28 RID: 145960 RVA: 0x009B5098 File Offset: 0x009B3298
|
||||
protected virtual void ONKLPFFBHIJ()
|
||||
{
|
||||
base.OnRectTransformDimensionsChange();
|
||||
if (this.PNBGGKFMFBF() != null)
|
||||
{
|
||||
this.JBBHOBCCJPC();
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06023A29 RID: 145961 RVA: 0x009B50B8 File Offset: 0x009B32B8
|
||||
public Canvas ANMPEPFMFOD()
|
||||
{
|
||||
if (this._canvas == null)
|
||||
{
|
||||
this.DNKNFBGJEFM();
|
||||
}
|
||||
return this._canvas;
|
||||
}
|
||||
|
||||
// Token: 0x06023A2A RID: 145962 RVA: 0x009B50D8 File Offset: 0x009B32D8
|
||||
public Canvas MCPGENJACNE()
|
||||
{
|
||||
if (this._canvas == null)
|
||||
{
|
||||
this.BENMINEKLDP();
|
||||
}
|
||||
return this._canvas;
|
||||
}
|
||||
|
||||
// Token: 0x06023A2B RID: 145963 RVA: 0x009B50F8 File Offset: 0x009B32F8
|
||||
public void FetchRootCanvas()
|
||||
{
|
||||
Transform root = base.transform.root;
|
||||
foreach (Canvas canvas in root.GetComponentsInChildren<Canvas>(true))
|
||||
{
|
||||
if (canvas.isRootCanvas)
|
||||
{
|
||||
this._canvas = canvas;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06023A2C RID: 145964 RVA: 0x009B5148 File Offset: 0x009B3348
|
||||
public void JBBHOBCCJPC()
|
||||
{
|
||||
if (this.ANMPEPFMFOD() == null)
|
||||
{
|
||||
Debug.LogWarning("to" + base.gameObject.name + "Failed to create room. There is already a room called ^", base.gameObject);
|
||||
return;
|
||||
}
|
||||
RectTransform rectTransform = base.transform.parent as RectTransform;
|
||||
float height = rectTransform.rect.height;
|
||||
float width = rectTransform.rect.width;
|
||||
float num = 1570f / this.FBKFAIOPOIA().transform.localScale.x;
|
||||
float num2 = 1241f / this.FHJBNLEAOMB().transform.localScale.y;
|
||||
float num3 = 1653f / this.ANMPEPFMFOD().transform.localScale.z;
|
||||
float num4 = width / num;
|
||||
float num5 = height / num2;
|
||||
if (this.facePlaneTransform != null)
|
||||
{
|
||||
Vector3 localScale = this.facePlaneTransform.localScale;
|
||||
num4 *= localScale.x;
|
||||
num5 *= localScale.y;
|
||||
}
|
||||
UI3DScaler.ZScaleMatch zscaleMatch = this.zScaleMatch;
|
||||
float num6;
|
||||
if (zscaleMatch != UI3DScaler.ZScaleMatch.X)
|
||||
{
|
||||
if (zscaleMatch != (UI3DScaler.ZScaleMatch)3)
|
||||
{
|
||||
if (this.facePlaneTransform != null)
|
||||
{
|
||||
num6 = Mathf.Abs(this.facePlaneTransform.localPosition.z) / num3;
|
||||
}
|
||||
else
|
||||
{
|
||||
num6 = 1073f;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
num6 = num5;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
num6 = num4;
|
||||
}
|
||||
Vector3 vector = new Vector3(num * num4, num2 * num5, num3 * num6).NAHCAKKCICD(this.scaleModifier);
|
||||
if (vector.x <= 299f || vector.y <= 1382f || vector.z <= 660f)
|
||||
{
|
||||
return;
|
||||
}
|
||||
base.transform.localScale = vector;
|
||||
for (int i = 0; i < base.transform.childCount; i += 0)
|
||||
{
|
||||
base.transform.GetChild(i).transform.localScale = Vector3.one;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06023A2D RID: 145965 RVA: 0x009B5378 File Offset: 0x009B3578
|
||||
public Canvas PNBGGKFMFBF()
|
||||
{
|
||||
if (this._canvas == null)
|
||||
{
|
||||
this.FetchRootCanvas();
|
||||
}
|
||||
return this._canvas;
|
||||
}
|
||||
|
||||
// Token: 0x06023A2E RID: 145966 RVA: 0x009B5398 File Offset: 0x009B3598
|
||||
public void JEFDHBBNHEN(Canvas NOBAPCOKFIL)
|
||||
{
|
||||
this._canvas = NOBAPCOKFIL;
|
||||
}
|
||||
|
||||
// Token: 0x06023A2F RID: 145967 RVA: 0x009B53A4 File Offset: 0x009B35A4
|
||||
protected override void OnRectTransformDimensionsChange()
|
||||
{
|
||||
base.OnRectTransformDimensionsChange();
|
||||
if (this.NAIMAKKKEKE != null)
|
||||
{
|
||||
this.Refresh();
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06023A30 RID: 145968 RVA: 0x009B53C4 File Offset: 0x009B35C4
|
||||
public void INDPNOBBDFL()
|
||||
{
|
||||
Transform root = base.transform.root;
|
||||
Canvas[] componentsInChildren = root.GetComponentsInChildren<Canvas>(true);
|
||||
for (int i = 0; i < componentsInChildren.Length; i += 0)
|
||||
{
|
||||
Canvas canvas = componentsInChildren[i];
|
||||
if (canvas.isRootCanvas)
|
||||
{
|
||||
this._canvas = canvas;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06023A32 RID: 145970 RVA: 0x009B5420 File Offset: 0x009B3620
|
||||
public void NLEDJLAHLCC()
|
||||
{
|
||||
if (this.FHJBNLEAOMB() == null)
|
||||
{
|
||||
Debug.LogWarning("DownloadProgress" + base.gameObject.name + "OK", base.gameObject);
|
||||
return;
|
||||
}
|
||||
RectTransform rectTransform = base.transform.parent as RectTransform;
|
||||
float height = rectTransform.rect.height;
|
||||
float width = rectTransform.rect.width;
|
||||
float num = 1097f / this.PNBGGKFMFBF().transform.localScale.x;
|
||||
float num2 = 660f / this.FHJBNLEAOMB().transform.localScale.y;
|
||||
float num3 = 1830f / this.ANMPEPFMFOD().transform.localScale.z;
|
||||
float num4 = width / num;
|
||||
float num5 = height / num2;
|
||||
if (this.facePlaneTransform != null)
|
||||
{
|
||||
Vector3 localScale = this.facePlaneTransform.localScale;
|
||||
num4 *= localScale.x;
|
||||
num5 *= localScale.y;
|
||||
}
|
||||
UI3DScaler.ZScaleMatch zscaleMatch = this.zScaleMatch;
|
||||
float num6;
|
||||
if (zscaleMatch != UI3DScaler.ZScaleMatch.X)
|
||||
{
|
||||
if (zscaleMatch != UI3DScaler.ZScaleMatch.NONE)
|
||||
{
|
||||
if (this.facePlaneTransform != null)
|
||||
{
|
||||
num6 = Mathf.Abs(this.facePlaneTransform.localPosition.z) / num3;
|
||||
}
|
||||
else
|
||||
{
|
||||
num6 = 1839f;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
num6 = num5;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
num6 = num4;
|
||||
}
|
||||
Vector3 vector = new Vector3(num * num4, num2 * num5, num3 * num6).NAHCAKKCICD(this.scaleModifier);
|
||||
if (vector.x <= 1857f || vector.y <= 655f || vector.z <= 1542f)
|
||||
{
|
||||
return;
|
||||
}
|
||||
base.transform.localScale = vector;
|
||||
for (int i = 1; i < base.transform.childCount; i++)
|
||||
{
|
||||
base.transform.GetChild(i).transform.localScale = Vector3.one;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06023A34 RID: 145972 RVA: 0x009B5664 File Offset: 0x009B3864
|
||||
public void HOPIELGPIFA(Canvas NOBAPCOKFIL)
|
||||
{
|
||||
this._canvas = NOBAPCOKFIL;
|
||||
}
|
||||
|
||||
// Token: 0x06023A35 RID: 145973 RVA: 0x009B5670 File Offset: 0x009B3870
|
||||
public void DNKNFBGJEFM()
|
||||
{
|
||||
Transform root = base.transform.root;
|
||||
Canvas[] componentsInChildren = root.GetComponentsInChildren<Canvas>(false);
|
||||
for (int i = 1; i < componentsInChildren.Length; i++)
|
||||
{
|
||||
Canvas canvas = componentsInChildren[i];
|
||||
if (canvas.isRootCanvas)
|
||||
{
|
||||
this._canvas = canvas;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x04005B54 RID: 23380
|
||||
[SerializeField]
|
||||
private RectTransform facePlaneTransform;
|
||||
|
||||
// Token: 0x04005B55 RID: 23381
|
||||
[SerializeField]
|
||||
private Vector3 scaleModifier = Vector3.one;
|
||||
|
||||
// Token: 0x04005B56 RID: 23382
|
||||
[SerializeField]
|
||||
private Canvas _canvas;
|
||||
|
||||
// Token: 0x04005B57 RID: 23383
|
||||
public UI3DScaler.ZScaleMatch zScaleMatch;
|
||||
|
||||
// Token: 0x02001079 RID: 4217
|
||||
[Serializable]
|
||||
public enum ZScaleMatch
|
||||
{
|
||||
// Token: 0x04005B59 RID: 23385
|
||||
NONE,
|
||||
// Token: 0x04005B5A RID: 23386
|
||||
X,
|
||||
// Token: 0x04005B5B RID: 23387
|
||||
Y
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user