mirror of
https://github.com/sinai-dev/UnityExplorer.git
synced 2025-06-24 01:12:41 +08:00
almost done, just interactive unity structs and a few minor things to finish off.
This commit is contained in:
@ -1,7 +1,6 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using UnityExplorer.Unstrip;
|
||||
//using TMPro;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
using UnityExplorer.Config;
|
||||
|
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
@ -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>";
|
||||
|
Reference in New Issue
Block a user