scripts
This commit is contained in:
@@ -0,0 +1,387 @@
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using System.Runtime.CompilerServices;
|
||||
using UnityEngine.Scripting;
|
||||
|
||||
namespace UnityEngine
|
||||
{
|
||||
// Token: 0x0200010B RID: 267
|
||||
[NativeClass("UI::RectTransform")]
|
||||
public sealed class RectTransform : Transform
|
||||
{
|
||||
// Token: 0x170003B3 RID: 947
|
||||
// (get) Token: 0x060012EA RID: 4842 RVA: 0x00018E84 File Offset: 0x00017084
|
||||
public Rect rect
|
||||
{
|
||||
get
|
||||
{
|
||||
Rect rect;
|
||||
this.INTERNAL_get_rect(out rect);
|
||||
return rect;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x060012EB RID: 4843
|
||||
[GeneratedByOldBindingsGenerator]
|
||||
[MethodImpl(MethodImplOptions.InternalCall)]
|
||||
private extern void INTERNAL_get_rect(out Rect value);
|
||||
|
||||
// Token: 0x170003B4 RID: 948
|
||||
// (get) Token: 0x060012EC RID: 4844 RVA: 0x00018EA4 File Offset: 0x000170A4
|
||||
// (set) Token: 0x060012ED RID: 4845 RVA: 0x00018EC4 File Offset: 0x000170C4
|
||||
public Vector2 anchorMin
|
||||
{
|
||||
get
|
||||
{
|
||||
Vector2 vector;
|
||||
this.INTERNAL_get_anchorMin(out vector);
|
||||
return vector;
|
||||
}
|
||||
set
|
||||
{
|
||||
this.INTERNAL_set_anchorMin(ref value);
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x060012EE RID: 4846
|
||||
[GeneratedByOldBindingsGenerator]
|
||||
[MethodImpl(MethodImplOptions.InternalCall)]
|
||||
private extern void INTERNAL_get_anchorMin(out Vector2 value);
|
||||
|
||||
// Token: 0x060012EF RID: 4847
|
||||
[GeneratedByOldBindingsGenerator]
|
||||
[MethodImpl(MethodImplOptions.InternalCall)]
|
||||
private extern void INTERNAL_set_anchorMin(ref Vector2 value);
|
||||
|
||||
// Token: 0x170003B5 RID: 949
|
||||
// (get) Token: 0x060012F0 RID: 4848 RVA: 0x00018ED0 File Offset: 0x000170D0
|
||||
// (set) Token: 0x060012F1 RID: 4849 RVA: 0x00018EF0 File Offset: 0x000170F0
|
||||
public Vector2 anchorMax
|
||||
{
|
||||
get
|
||||
{
|
||||
Vector2 vector;
|
||||
this.INTERNAL_get_anchorMax(out vector);
|
||||
return vector;
|
||||
}
|
||||
set
|
||||
{
|
||||
this.INTERNAL_set_anchorMax(ref value);
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x060012F2 RID: 4850
|
||||
[GeneratedByOldBindingsGenerator]
|
||||
[MethodImpl(MethodImplOptions.InternalCall)]
|
||||
private extern void INTERNAL_get_anchorMax(out Vector2 value);
|
||||
|
||||
// Token: 0x060012F3 RID: 4851
|
||||
[GeneratedByOldBindingsGenerator]
|
||||
[MethodImpl(MethodImplOptions.InternalCall)]
|
||||
private extern void INTERNAL_set_anchorMax(ref Vector2 value);
|
||||
|
||||
// Token: 0x170003B6 RID: 950
|
||||
// (get) Token: 0x060012F4 RID: 4852 RVA: 0x00018EFC File Offset: 0x000170FC
|
||||
// (set) Token: 0x060012F5 RID: 4853 RVA: 0x00018F3C File Offset: 0x0001713C
|
||||
public Vector3 anchoredPosition3D
|
||||
{
|
||||
get
|
||||
{
|
||||
Vector2 anchoredPosition = this.anchoredPosition;
|
||||
return new Vector3(anchoredPosition.x, anchoredPosition.y, base.localPosition.z);
|
||||
}
|
||||
set
|
||||
{
|
||||
this.anchoredPosition = new Vector2(value.x, value.y);
|
||||
Vector3 localPosition = base.localPosition;
|
||||
localPosition.z = value.z;
|
||||
base.localPosition = localPosition;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x170003B7 RID: 951
|
||||
// (get) Token: 0x060012F6 RID: 4854 RVA: 0x00018F80 File Offset: 0x00017180
|
||||
// (set) Token: 0x060012F7 RID: 4855 RVA: 0x00018FA0 File Offset: 0x000171A0
|
||||
public Vector2 anchoredPosition
|
||||
{
|
||||
get
|
||||
{
|
||||
Vector2 vector;
|
||||
this.INTERNAL_get_anchoredPosition(out vector);
|
||||
return vector;
|
||||
}
|
||||
set
|
||||
{
|
||||
this.INTERNAL_set_anchoredPosition(ref value);
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x060012F8 RID: 4856
|
||||
[GeneratedByOldBindingsGenerator]
|
||||
[MethodImpl(MethodImplOptions.InternalCall)]
|
||||
private extern void INTERNAL_get_anchoredPosition(out Vector2 value);
|
||||
|
||||
// Token: 0x060012F9 RID: 4857
|
||||
[GeneratedByOldBindingsGenerator]
|
||||
[MethodImpl(MethodImplOptions.InternalCall)]
|
||||
private extern void INTERNAL_set_anchoredPosition(ref Vector2 value);
|
||||
|
||||
// Token: 0x170003B8 RID: 952
|
||||
// (get) Token: 0x060012FA RID: 4858 RVA: 0x00018FAC File Offset: 0x000171AC
|
||||
// (set) Token: 0x060012FB RID: 4859 RVA: 0x00018FCC File Offset: 0x000171CC
|
||||
public Vector2 sizeDelta
|
||||
{
|
||||
get
|
||||
{
|
||||
Vector2 vector;
|
||||
this.INTERNAL_get_sizeDelta(out vector);
|
||||
return vector;
|
||||
}
|
||||
set
|
||||
{
|
||||
this.INTERNAL_set_sizeDelta(ref value);
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x060012FC RID: 4860
|
||||
[GeneratedByOldBindingsGenerator]
|
||||
[MethodImpl(MethodImplOptions.InternalCall)]
|
||||
private extern void INTERNAL_get_sizeDelta(out Vector2 value);
|
||||
|
||||
// Token: 0x060012FD RID: 4861
|
||||
[GeneratedByOldBindingsGenerator]
|
||||
[MethodImpl(MethodImplOptions.InternalCall)]
|
||||
private extern void INTERNAL_set_sizeDelta(ref Vector2 value);
|
||||
|
||||
// Token: 0x170003B9 RID: 953
|
||||
// (get) Token: 0x060012FE RID: 4862 RVA: 0x00018FD8 File Offset: 0x000171D8
|
||||
// (set) Token: 0x060012FF RID: 4863 RVA: 0x00018FF8 File Offset: 0x000171F8
|
||||
public Vector2 pivot
|
||||
{
|
||||
get
|
||||
{
|
||||
Vector2 vector;
|
||||
this.INTERNAL_get_pivot(out vector);
|
||||
return vector;
|
||||
}
|
||||
set
|
||||
{
|
||||
this.INTERNAL_set_pivot(ref value);
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06001300 RID: 4864
|
||||
[GeneratedByOldBindingsGenerator]
|
||||
[MethodImpl(MethodImplOptions.InternalCall)]
|
||||
private extern void INTERNAL_get_pivot(out Vector2 value);
|
||||
|
||||
// Token: 0x06001301 RID: 4865
|
||||
[GeneratedByOldBindingsGenerator]
|
||||
[MethodImpl(MethodImplOptions.InternalCall)]
|
||||
private extern void INTERNAL_set_pivot(ref Vector2 value);
|
||||
|
||||
// Token: 0x170003BA RID: 954
|
||||
// (get) Token: 0x06001302 RID: 4866
|
||||
// (set) Token: 0x06001303 RID: 4867
|
||||
internal extern Object drivenByObject
|
||||
{
|
||||
[GeneratedByOldBindingsGenerator]
|
||||
[MethodImpl(MethodImplOptions.InternalCall)]
|
||||
get;
|
||||
[GeneratedByOldBindingsGenerator]
|
||||
[MethodImpl(MethodImplOptions.InternalCall)]
|
||||
set;
|
||||
}
|
||||
|
||||
// Token: 0x170003BB RID: 955
|
||||
// (get) Token: 0x06001304 RID: 4868
|
||||
// (set) Token: 0x06001305 RID: 4869
|
||||
internal extern DrivenTransformProperties drivenProperties
|
||||
{
|
||||
[GeneratedByOldBindingsGenerator]
|
||||
[MethodImpl(MethodImplOptions.InternalCall)]
|
||||
get;
|
||||
[GeneratedByOldBindingsGenerator]
|
||||
[MethodImpl(MethodImplOptions.InternalCall)]
|
||||
set;
|
||||
}
|
||||
|
||||
// Token: 0x14000010 RID: 16
|
||||
// (add) Token: 0x06001306 RID: 4870 RVA: 0x00019004 File Offset: 0x00017204
|
||||
// (remove) Token: 0x06001307 RID: 4871 RVA: 0x00019038 File Offset: 0x00017238
|
||||
[field: DebuggerBrowsable(DebuggerBrowsableState.Never)]
|
||||
public static event RectTransform.ReapplyDrivenProperties reapplyDrivenProperties;
|
||||
|
||||
// Token: 0x06001308 RID: 4872 RVA: 0x0001906C File Offset: 0x0001726C
|
||||
[RequiredByNativeCode]
|
||||
internal static void SendReapplyDrivenProperties(RectTransform driven)
|
||||
{
|
||||
if (RectTransform.reapplyDrivenProperties != null)
|
||||
{
|
||||
RectTransform.reapplyDrivenProperties(driven);
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06001309 RID: 4873 RVA: 0x00019084 File Offset: 0x00017284
|
||||
public void GetLocalCorners(Vector3[] fourCornersArray)
|
||||
{
|
||||
if (fourCornersArray == null || fourCornersArray.Length < 4)
|
||||
{
|
||||
Debug.LogError("Calling GetLocalCorners with an array that is null or has less than 4 elements.");
|
||||
}
|
||||
else
|
||||
{
|
||||
Rect rect = this.rect;
|
||||
float x = rect.x;
|
||||
float y = rect.y;
|
||||
float xMax = rect.xMax;
|
||||
float yMax = rect.yMax;
|
||||
fourCornersArray[0] = new Vector3(x, y, 0f);
|
||||
fourCornersArray[1] = new Vector3(x, yMax, 0f);
|
||||
fourCornersArray[2] = new Vector3(xMax, yMax, 0f);
|
||||
fourCornersArray[3] = new Vector3(xMax, y, 0f);
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x0600130A RID: 4874 RVA: 0x0001913C File Offset: 0x0001733C
|
||||
public void GetWorldCorners(Vector3[] fourCornersArray)
|
||||
{
|
||||
if (fourCornersArray == null || fourCornersArray.Length < 4)
|
||||
{
|
||||
Debug.LogError("Calling GetWorldCorners with an array that is null or has less than 4 elements.");
|
||||
}
|
||||
else
|
||||
{
|
||||
this.GetLocalCorners(fourCornersArray);
|
||||
Transform transform = base.transform;
|
||||
for (int i = 0; i < 4; i++)
|
||||
{
|
||||
fourCornersArray[i] = transform.TransformPoint(fourCornersArray[i]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x0600130B RID: 4875 RVA: 0x000191A8 File Offset: 0x000173A8
|
||||
internal Rect GetRectInParentSpace()
|
||||
{
|
||||
Rect rect = this.rect;
|
||||
Vector2 vector = this.offsetMin + Vector2.Scale(this.pivot, rect.size);
|
||||
Transform parent = base.transform.parent;
|
||||
if (parent)
|
||||
{
|
||||
RectTransform component = parent.GetComponent<RectTransform>();
|
||||
if (component)
|
||||
{
|
||||
vector += Vector2.Scale(this.anchorMin, component.rect.size);
|
||||
}
|
||||
}
|
||||
rect.x += vector.x;
|
||||
rect.y += vector.y;
|
||||
return rect;
|
||||
}
|
||||
|
||||
// Token: 0x170003BC RID: 956
|
||||
// (get) Token: 0x0600130C RID: 4876 RVA: 0x0001925C File Offset: 0x0001745C
|
||||
// (set) Token: 0x0600130D RID: 4877 RVA: 0x00019290 File Offset: 0x00017490
|
||||
public Vector2 offsetMin
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.anchoredPosition - Vector2.Scale(this.sizeDelta, this.pivot);
|
||||
}
|
||||
set
|
||||
{
|
||||
Vector2 vector = value - (this.anchoredPosition - Vector2.Scale(this.sizeDelta, this.pivot));
|
||||
this.sizeDelta -= vector;
|
||||
this.anchoredPosition += Vector2.Scale(vector, Vector2.one - this.pivot);
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x170003BD RID: 957
|
||||
// (get) Token: 0x0600130E RID: 4878 RVA: 0x000192FC File Offset: 0x000174FC
|
||||
// (set) Token: 0x0600130F RID: 4879 RVA: 0x00019338 File Offset: 0x00017538
|
||||
public Vector2 offsetMax
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.anchoredPosition + Vector2.Scale(this.sizeDelta, Vector2.one - this.pivot);
|
||||
}
|
||||
set
|
||||
{
|
||||
Vector2 vector = value - (this.anchoredPosition + Vector2.Scale(this.sizeDelta, Vector2.one - this.pivot));
|
||||
this.sizeDelta += vector;
|
||||
this.anchoredPosition += Vector2.Scale(vector, this.pivot);
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06001310 RID: 4880 RVA: 0x000193A4 File Offset: 0x000175A4
|
||||
public void SetInsetAndSizeFromParentEdge(RectTransform.Edge edge, float inset, float size)
|
||||
{
|
||||
int num = ((edge != RectTransform.Edge.Top && edge != RectTransform.Edge.Bottom) ? 0 : 1);
|
||||
bool flag = edge == RectTransform.Edge.Top || edge == RectTransform.Edge.Right;
|
||||
float num2 = (float)((!flag) ? 0 : 1);
|
||||
Vector2 vector = this.anchorMin;
|
||||
vector[num] = num2;
|
||||
this.anchorMin = vector;
|
||||
vector = this.anchorMax;
|
||||
vector[num] = num2;
|
||||
this.anchorMax = vector;
|
||||
Vector2 sizeDelta = this.sizeDelta;
|
||||
sizeDelta[num] = size;
|
||||
this.sizeDelta = sizeDelta;
|
||||
Vector2 anchoredPosition = this.anchoredPosition;
|
||||
anchoredPosition[num] = ((!flag) ? (inset + size * this.pivot[num]) : (-inset - size * (1f - this.pivot[num])));
|
||||
this.anchoredPosition = anchoredPosition;
|
||||
}
|
||||
|
||||
// Token: 0x06001311 RID: 4881 RVA: 0x00019480 File Offset: 0x00017680
|
||||
public void SetSizeWithCurrentAnchors(RectTransform.Axis axis, float size)
|
||||
{
|
||||
Vector2 sizeDelta = this.sizeDelta;
|
||||
sizeDelta[(int)axis] = size - this.GetParentSize()[(int)axis] * (this.anchorMax[(int)axis] - this.anchorMin[(int)axis]);
|
||||
this.sizeDelta = sizeDelta;
|
||||
}
|
||||
|
||||
// Token: 0x06001312 RID: 4882 RVA: 0x000194D8 File Offset: 0x000176D8
|
||||
private Vector2 GetParentSize()
|
||||
{
|
||||
RectTransform rectTransform = base.parent as RectTransform;
|
||||
Vector2 vector;
|
||||
if (!rectTransform)
|
||||
{
|
||||
vector = Vector2.zero;
|
||||
}
|
||||
else
|
||||
{
|
||||
vector = rectTransform.rect.size;
|
||||
}
|
||||
return vector;
|
||||
}
|
||||
|
||||
// Token: 0x0200010C RID: 268
|
||||
// (Invoke) Token: 0x06001314 RID: 4884
|
||||
public delegate void ReapplyDrivenProperties(RectTransform driven);
|
||||
|
||||
// Token: 0x0200010D RID: 269
|
||||
public enum Edge
|
||||
{
|
||||
// Token: 0x0400028E RID: 654
|
||||
Left,
|
||||
// Token: 0x0400028F RID: 655
|
||||
Right,
|
||||
// Token: 0x04000290 RID: 656
|
||||
Top,
|
||||
// Token: 0x04000291 RID: 657
|
||||
Bottom
|
||||
}
|
||||
|
||||
// Token: 0x0200010E RID: 270
|
||||
public enum Axis
|
||||
{
|
||||
// Token: 0x04000293 RID: 659
|
||||
Horizontal,
|
||||
// Token: 0x04000294 RID: 660
|
||||
Vertical
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user