summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorchai <chaifix@163.com>2018-07-10 14:14:03 +0800
committerchai <chaifix@163.com>2018-07-10 14:14:03 +0800
commite24d18a50ae70ded57ba9ee9cd47a3ab43dbc027 (patch)
treefd40c38ce5034ebf822b1924b5fb3a7bc54bd963
parent3bc38cd9ec5629ee59bb134a5d7b57b829c6c61d (diff)
缩略图
-rw-r--r--AssetBrowser.cs12
1 files changed, 7 insertions, 5 deletions
diff --git a/AssetBrowser.cs b/AssetBrowser.cs
index 748c329..e0741a9 100644
--- a/AssetBrowser.cs
+++ b/AssetBrowser.cs
@@ -800,21 +800,21 @@ class AssetBrowser : EditorWindow
drawer.DrawFoldout(new Rect(hierachy * kTabWidth + 7, offsetY, kLineHeight, kLineHeight), ref node.Foldout);
// draw selector
bool clicked;
- drawer.DrawSelector(new Rect(hierachy * kTabWidth + 19 + 7, offsetY, contentWidth, kLineHeight), selectedNode == node, out clicked);
+ drawer.DrawSelector(new Rect(hierachy * kTabWidth + 17 + 7, offsetY, contentWidth, kLineHeight), selectedNode == node, out clicked);
if (clicked)
{
if (selectedNode != node)
selectedNode = node;
else
{
- AssetReverse.ShowWindow(node.GUID);
+ AssetReverse.ShowWindow(node.GUID, thumbs);
selectedNode = null;
}
}
if (selectedNode == node)
drawer.SetTextColor(Color.white);
// draw asset icon
- drawer.DrawAssetIcon(new Rect(hierachy * kTabWidth + 19 + 7, offsetY, ColumWidth[Colum.Name], kLineHeight), asset, thumbs);
+ drawer.DrawAssetIcon(new Rect(hierachy * kTabWidth + 17 + 7, offsetY, ColumWidth[Colum.Name], kLineHeight), asset, thumbs);
// draw reference count
drawer.DrawLabel(new Rect(ColumOffsetX[Colum.Ref], offsetY, 100, kLineHeight), asset.RefCount.ToString());
// draw referenced count
@@ -945,13 +945,15 @@ public class AssetReverse : EditorWindow
private static AssetDataManager assetDataManager;
private static string GUID;
private static AssetData resource = null;
- public static void ShowWindow(string guid)
+ private static bool thumb;
+ public static void ShowWindow(string guid, bool thumbs)
{
editor = GetWindow<AssetReverse>();
editor.titleContent = new GUIContent("Asset Reverse");
drawer = Drawer.Get();
assetDataManager = AssetDataManager.Get();
AdjustkColumOffset();
+ thumb = thumbs;
GUID = guid;
if (!assetDataManager.AllAssets.TryGetValue(GUID, out resource))
resource = null;
@@ -1027,7 +1029,7 @@ public class AssetReverse : EditorWindow
if (assetDataManager.AllAssets.TryGetValue(guid, out resource))
{
drawer.DrawBackground(new Rect(0, yoffset, ContentWidth, kLineHeight), (count & 1) == 1 ? drawer.ColorHeavy : drawer.ColorLight);
- drawer.DrawAssetIcon(new Rect(0, yoffset, 1000, kLineHeight), resource, true);
+ drawer.DrawAssetIcon(new Rect(0, yoffset, 1000, kLineHeight), resource, thumb);
drawer.DrawLabel(new Rect(kColumOffset[Colums.cLocation], yoffset, 1000, kLineHeight), resource.AssetPath);
yoffset += kLineHeight;
ContentHeight += kLineHeight;