|
|
@ -2,9 +2,12 @@ |
|
|
|
|
|
|
|
|
|
|
|
using UnityEngine; |
|
|
|
using UnityEngine; |
|
|
|
|
|
|
|
|
|
|
|
// Helper Rect extension methods |
|
|
|
namespace Fungus |
|
|
|
public static class RectExtensions |
|
|
|
|
|
|
|
{ |
|
|
|
{ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Helper Rect extension methods |
|
|
|
|
|
|
|
public static class RectExtensions |
|
|
|
|
|
|
|
{ |
|
|
|
public static Vector2 TopLeft(this Rect rect) |
|
|
|
public static Vector2 TopLeft(this Rect rect) |
|
|
|
{ |
|
|
|
{ |
|
|
|
return new Vector2(rect.xMin, rect.yMin); |
|
|
|
return new Vector2(rect.xMin, rect.yMin); |
|
|
@ -47,10 +50,10 @@ public static class RectExtensions |
|
|
|
result.y += pivotPoint.y; |
|
|
|
result.y += pivotPoint.y; |
|
|
|
return result; |
|
|
|
return result; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public class EditorZoomArea |
|
|
|
public class EditorZoomArea |
|
|
|
{ |
|
|
|
{ |
|
|
|
private const float kEditorWindowTabHeight = 21.0f; |
|
|
|
private const float kEditorWindowTabHeight = 21.0f; |
|
|
|
private static Matrix4x4 _prevGuiMatrix; |
|
|
|
private static Matrix4x4 _prevGuiMatrix; |
|
|
|
|
|
|
|
|
|
|
@ -76,4 +79,6 @@ public class EditorZoomArea |
|
|
|
GUI.EndGroup(); |
|
|
|
GUI.EndGroup(); |
|
|
|
GUI.BeginGroup(new Rect(0.0f, kEditorWindowTabHeight, Screen.width, Screen.height)); |
|
|
|
GUI.BeginGroup(new Rect(0.0f, kEditorWindowTabHeight, Screen.width, Screen.height)); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |