Browse Source

Merge branch 'develop'

master
Steve Halliwell 4 years ago
parent
commit
ed688e1a09
  1. 10
      Assets/Fungus/Scripts/Editor/ViewEditor.cs
  2. 10
      Assets/Fungus/Scripts/Utils/TMProLinkAnimLookup.cs
  3. 5
      Assets/Fungus/Scripts/Utils/VariableUtil.cs

10
Assets/Fungus/Scripts/Editor/ViewEditor.cs

@ -18,18 +18,14 @@ namespace Fungus.EditorUtils
// Draw Views when they're not selected
#if UNITY_5_0
[DrawGizmo(GizmoType.NotSelected | GizmoType.SelectedOrChild)]
[DrawGizmo(GizmoType.NotSelected | GizmoType.SelectedOrChild, typeof(View))]
#else
[DrawGizmo(GizmoType.NotInSelectionHierarchy | GizmoType.InSelectionHierarchy)]
[DrawGizmo(GizmoType.NotInSelectionHierarchy | GizmoType.InSelectionHierarchy, typeof(View))]
#endif
static void RenderCustomGizmo(Transform objectTransform, GizmoType gizmoType)
{
View view = objectTransform.gameObject.GetComponent<View>();
if (view != null)
public static void RenderCustomGizmo(View view, GizmoType gizmoType)
{
DrawView(view, false);
}
}
protected virtual Vector2 LookupAspectRatio(int index)
{

10
Assets/Fungus/Scripts/Utils/TMProLinkAnimLookup.cs

@ -81,17 +81,23 @@ namespace Fungus
static public void AddHelper(string linkIdText, TMProAnimFunc func)
{
LinkHashToEffect.Add(TMPro.TMP_TextUtilities.GetSimpleHashCode(linkIdText), func);
var hashCode = TMPro.TMP_TextUtilities.GetSimpleHashCode(linkIdText);
if(!LinkHashToEffect.ContainsKey(hashCode))
LinkHashToEffect.Add(hashCode, func);
}
static public void AddHelper(string linkIdText, TMProLinkAnimEffects.BaseEffect baseEffect)
{
var hashCode = TMPro.TMP_TextUtilities.GetSimpleHashCode(linkIdText);
if (!LinkHashToEffect.ContainsKey(hashCode))
LinkHashToEffect.Add(TMPro.TMP_TextUtilities.GetSimpleHashCode(linkIdText), baseEffect.DoEffect);
}
static public void Remove(string linkIdText)
{
LinkHashToEffect.Remove(TMPro.TMP_TextUtilities.GetSimpleHashCode(linkIdText));
var hashCode = TMPro.TMP_TextUtilities.GetSimpleHashCode(linkIdText);
if (LinkHashToEffect.ContainsKey(hashCode))
LinkHashToEffect.Remove(hashCode);
}
static public void RemoveAll()

5
Assets/Fungus/Scripts/Utils/VariableUtil.cs

@ -65,7 +65,10 @@ namespace Fungus
break;
case SetOperator.Divide:
return "/=";
//https://answers.unity.com/questions/398495/can-genericmenu-item-content-display-.html
// '/' in a menu means submenu and because it had no leading text, Unity thinks we want a spacer
// using unicode alternates for / fix the problem.
return "\u200A\u2215\u200A=";
break;
}

Loading…
Cancel
Save