Browse Source

Merge pull request #355 from FungusGames/fungus-namespace-353

Fixed CustomGUI class not in Fungus namespace #353
master
Chris Gregan 9 years ago
parent
commit
b9a0c27b7d
  1. 11
      Assets/Fungus/Flowchart/Editor/CustomGUI.cs
  2. 7
      Assets/Fungus/Flowchart/Editor/EditorExtensions.cs
  3. 15
      Assets/Fungus/Flowchart/Editor/EditorZoomArea.cs
  4. 7
      Assets/Fungus/Flowchart/Editor/GLDraw.cs

11
Assets/Fungus/Flowchart/Editor/CustomGUI.cs

@ -4,11 +4,14 @@ using UnityEditor;
using System;
using System.Reflection;
/**
namespace Fungus
{
/**
* Utility functions for drawing custom UI in the editor
*/
public static class CustomGUI
{
public static class CustomGUI
{
public static Texture2D CreateBlackTexture()
{
Texture2D blackTex = new Texture2D(1,2);
@ -37,4 +40,6 @@ public static class CustomGUI
separatorStyle.margin.bottom = 10;
GUILayout.Box(blackTex,separatorStyle);
}
}
}

7
Assets/Fungus/Flowchart/Editor/EditorExtensions.cs

@ -3,8 +3,11 @@ using System.Collections;
using System.Collections.Generic;
using System.Linq;
public static class EditorExtensions
namespace Fungus
{
public static class EditorExtensions
{
/// <summary>
/// FindDerivedTypesFromAssembly allows a user to query all of types derived from a
/// particular Type at runtime.
@ -59,4 +62,6 @@ public static class EditorExtensions
{
return FindDerivedTypesFromAssembly(System.Reflection.Assembly.GetAssembly(baseType), baseType, classOnly);
}
}
}

15
Assets/Fungus/Flowchart/Editor/EditorZoomArea.cs

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

7
Assets/Fungus/Flowchart/Editor/GLDraw.cs

@ -2,8 +2,11 @@ using UnityEngine;
using System.Collections;
using System;
public class GLDraw
namespace Fungus
{
public class GLDraw
{
/*
* Clipping code: http://forum.unity3d.com/threads/17066-How-to-draw-a-GUI-2D-quot-line-quot?p=230386#post230386
* Thick line drawing code: http://unifycommunity.com/wiki/index.php?title=VectorLine
@ -285,4 +288,6 @@ public class GLDraw
float rtt = rt * t;
return rt * rt * rt * s + 3 * rt * rtt * st + 3 * rtt * t * et + t * t * t * e;
}
}
}
Loading…
Cancel
Save