almost done, just interactive unity structs and a few minor things to finish off.

This commit is contained in:
sinaioutlander
2020-11-16 21:21:04 +11:00
parent 4a1125cf1d
commit 91d5fc284f
26 changed files with 1020 additions and 232 deletions

View File

@ -1,7 +1,6 @@
using System;
using System.Collections.Generic;
using UnityExplorer.Unstrip;
//using TMPro;
using UnityEngine;
using UnityEngine.UI;
using UnityExplorer.Config;

View File

@ -295,8 +295,8 @@ namespace UnityExplorer.UI
else if (m_currentResizeType.HasFlag(ResizeTypes.Bottom))
anchorMin.y -= diffY;
//Panel.anchorMin = new Vector2(anchorMin.x, anchorMin.y);
//Panel.anchorMax = new Vector2(anchorMax.x, anchorMax.y);
Panel.anchorMin = new Vector2(anchorMin.x, anchorMin.y);
Panel.anchorMax = new Vector2(anchorMax.x, anchorMax.y);
var newWidth = (anchorMax.x - anchorMin.x) * Screen.width;
var newHeight = (anchorMax.y - anchorMin.y) * Screen.height;
@ -346,4 +346,14 @@ namespace UnityExplorer.UI
#endregion
}
// Just to allow Enum to do .HasFlag() in NET 3.5
public static class Net35FlagsEx
{
public static bool HasFlag(this Enum flags, Enum value)
{
ulong num = Convert.ToUInt64(value);
return (Convert.ToUInt64(flags) & num) == num;
}
}
}

View File

@ -44,6 +44,9 @@ namespace UnityExplorer.UI
{
string ret = "";
if (type == null)
return "????????????";
if (type.IsGenericParameter || (type.HasElementType && type.GetElementType().IsGenericParameter))
{
ret = $"<color={Enum}>{type.Name}</color>";