// Token: 0x06004BF2 RID: 19442 RVA: 0x00128C34 File Offset: 0x00126E34 public static void ScreenOrigin(global::UIAnchor.Side side, float xMin, float xMax, float yMin, float yMax, float relativeOffsetX, float relativeOffsetY, global::UIAnchor.Flags flags, out float x, out float y) { switch ((byte)(flags & (global::UIAnchor.Flags.CameraIsOrthographic | global::UIAnchor.Flags.HalfPixelOffset))) { case 1: { float num; float num2; global::UIAnchor.ScreenOrigin(side, xMin, xMax, yMin, yMax, relativeOffsetX, relativeOffsetY, out num, out num2); x = Mathf.Round(num); y = Mathf.Round(num2); return; } case 3: { float num3; float num4; global::UIAnchor.ScreenOrigin(side, xMin, xMax, yMin, yMax, relativeOffsetX, relativeOffsetY, out num3, out num4); x = Mathf.Round(num3) - 0.5f; y = Mathf.Round(num4) + 0.5f; return; } } global::UIAnchor.ScreenOrigin(side, xMin, xMax, yMin, yMax, relativeOffsetX, relativeOffsetY, out x, out y); }
static StackObject *Place_1(ILIntepreter __intp, StackObject *__esp, IList <object> __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject *ptr_of_this_method; StackObject *__ret = ILIntepreter.Minus(__esp, 4); ptr_of_this_method = ILIntepreter.Minus(__esp, 1); global::UIAnchor.Side @side = (global::UIAnchor.Side) typeof(global::UIAnchor.Side).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack)); __intp.Free(ptr_of_this_method); ptr_of_this_method = ILIntepreter.Minus(__esp, 2); global::UIHierarchyHelper.eUIType @type = (global::UIHierarchyHelper.eUIType) typeof(global::UIHierarchyHelper.eUIType).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack)); __intp.Free(ptr_of_this_method); ptr_of_this_method = ILIntepreter.Minus(__esp, 3); UnityEngine.GameObject @instance = (UnityEngine.GameObject) typeof(UnityEngine.GameObject).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack)); __intp.Free(ptr_of_this_method); ptr_of_this_method = ILIntepreter.Minus(__esp, 4); global::UIHierarchyHelper instance_of_this_method = (global::UIHierarchyHelper)typeof(global::UIHierarchyHelper).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack)); __intp.Free(ptr_of_this_method); instance_of_this_method.Place(@instance, @type, @side); return(__ret); }
// Token: 0x06002E0B RID: 11787 RVA: 0x000AE298 File Offset: 0x000AC498 private Target(string name, bool automatic, int manualSize, global::UIAnchor.Side side) { this.automatic = automatic; this.manualSize = manualSize; this.name = name; this.side = side; this._root = null; this._anchor = null; }
// Token: 0x06004BF1 RID: 19441 RVA: 0x00128C00 File Offset: 0x00126E00 public static void ScreenOrigin(global::UIAnchor.Side side, float xMin, float xMax, float yMin, float yMax, float relativeOffsetX, float relativeOffsetY, out float x, out float y) { float num; float num2; global::UIAnchor.ScreenOrigin(side, xMin, xMax, yMin, yMax, out num, out num2); x = num + relativeOffsetX * (xMax - xMin); y = num2 + relativeOffsetY * (yMax - yMin); }
// Token: 0x06004BF0 RID: 19440 RVA: 0x00128B10 File Offset: 0x00126D10 public static void ScreenOrigin(global::UIAnchor.Side side, float xMin, float xMax, float yMin, float yMax, out float x, out float y) { switch (side) { case global::UIAnchor.Side.BottomLeft: x = xMin; y = yMin; break; case global::UIAnchor.Side.Left: x = xMin; y = (yMin + yMax) / 2f; break; case global::UIAnchor.Side.TopLeft: x = xMin; y = yMax; break; case global::UIAnchor.Side.Top: x = (xMin + xMax) / 2f; y = yMax; break; case global::UIAnchor.Side.TopRight: x = xMax; y = yMax; break; case global::UIAnchor.Side.Right: x = xMax; y = (yMin + yMax) / 2f; break; case global::UIAnchor.Side.BottomRight: x = xMax; y = yMin; break; case global::UIAnchor.Side.Bottom: x = (xMin + xMax) / 2f; y = yMin; break; case global::UIAnchor.Side.Center: x = (xMin + xMax) / 2f; y = (yMin + yMax) / 2f; break; default: throw new ArgumentOutOfRangeException(); } }
// Token: 0x06004BFB RID: 19451 RVA: 0x00129178 File Offset: 0x00127378 public static Vector3 WorldOrigin(Camera camera, global::UIAnchor.Side side, RectOffset offset, bool halfPixel) { Vector3 vector; vector.z = 0f; Rect rect = offset.Add(camera.pixelRect); float xMin = rect.xMin; float xMax = rect.xMax; float yMin = rect.yMin; float yMax = rect.yMax; global::UIAnchor.ScreenOrigin(side, xMin, xMax, yMin, yMax, (!camera.isOrthoGraphic) ? ((!halfPixel) ? ((global::UIAnchor.Flags) 0) : global::UIAnchor.Flags.HalfPixelOffset) : ((!halfPixel) ? global::UIAnchor.Flags.CameraIsOrthographic : (global::UIAnchor.Flags.CameraIsOrthographic | global::UIAnchor.Flags.HalfPixelOffset)), out vector.x, out vector.y); return(camera.ScreenToWorldPoint(vector)); }
// Token: 0x06004BF4 RID: 19444 RVA: 0x00128D88 File Offset: 0x00126F88 public static Vector3 WorldOrigin(Camera camera, global::UIAnchor.Side side, float depthOffset, float relativeOffsetX, float relativeOffsetY, bool halfPixel) { Vector3 vector; vector.z = depthOffset; Rect pixelRect = camera.pixelRect; float xMin = pixelRect.xMin; float xMax = pixelRect.xMax; float yMin = pixelRect.yMin; float yMax = pixelRect.yMax; global::UIAnchor.ScreenOrigin(side, xMin, xMax, yMin, yMax, relativeOffsetX, relativeOffsetY, (!camera.isOrthoGraphic) ? ((!halfPixel) ? ((global::UIAnchor.Flags) 0) : global::UIAnchor.Flags.HalfPixelOffset) : ((!halfPixel) ? global::UIAnchor.Flags.CameraIsOrthographic : (global::UIAnchor.Flags.CameraIsOrthographic | global::UIAnchor.Flags.HalfPixelOffset)), out vector.x, out vector.y); return(camera.ScreenToWorldPoint(vector)); }
// Token: 0x06002E0A RID: 11786 RVA: 0x000AE28C File Offset: 0x000AC48C public Target(string name, int manualSize, global::UIAnchor.Side side) { this = new global::HUDIndicator.Target(name, false, manualSize, side); }
// Token: 0x06002E09 RID: 11785 RVA: 0x000AE27C File Offset: 0x000AC47C public Target(string name, global::UIAnchor.Side side) { this = new global::HUDIndicator.Target(name, true, 1000, side); }