Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
stevehalliwell committed Jul 19, 2020
2 parents 22aca98 + 2580345 commit ed688e1
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 14 deletions.
14 changes: 5 additions & 9 deletions Assets/Fungus/Scripts/Editor/ViewEditor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,17 +18,13 @@ public class ViewEditor : Editor

// 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)
public static void RenderCustomGizmo(View view, GizmoType gizmoType)
{
View view = objectTransform.gameObject.GetComponent<View>();
if (view != null)
{
DrawView(view, false);
}
DrawView(view, false);
}

protected virtual Vector2 LookupAspectRatio(int index)
Expand Down Expand Up @@ -264,4 +260,4 @@ static float CalculateLocalViewSize(View view)
return view.transform.InverseTransformPoint(view.transform.position + new Vector3(0, view.ViewSize, 0)).magnitude;
}
}
}
}
12 changes: 9 additions & 3 deletions Assets/Fungus/Scripts/Utils/TMProLinkAnimLookup.cs
Original file line number Diff line number Diff line change
Expand Up @@ -81,17 +81,23 @@ public static class TMProLinkAnimLookup

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)
{
LinkHashToEffect.Add(TMPro.TMP_TextUtilities.GetSimpleHashCode(linkIdText), baseEffect.DoEffect);
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()
Expand Down
7 changes: 5 additions & 2 deletions Assets/Fungus/Scripts/Utils/VariableUtil.cs
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,11 @@ public static string GetSetOperatorDescription(SetOperator setOperator)
break;

case SetOperator.Divide:
return "/=";
break;
//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;
}

return string.Empty;
Expand Down

0 comments on commit ed688e1

Please sign in to comment.