提交 7fbc2854 编写于 作者: 魔术师Dix's avatar 魔术师Dix

【UpmGitTool】更新依赖引用类目的显示;

上级 8aa4811b
......@@ -33,10 +33,10 @@ RectTransform:
m_Father: {fileID: 7529971250023223843}
m_RootOrder: -1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0.5}
m_AnchorMin: {x: 1, y: 0.5}
m_AnchorMax: {x: 1, y: 0.5}
m_AnchoredPosition: {x: 88.95, y: 0}
m_SizeDelta: {x: -277.88, y: 50}
m_AnchoredPosition: {x: -115.5703, y: 0}
m_SizeDelta: {x: 131.16058, y: 50}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &7170240937554170899
CanvasRenderer:
......@@ -111,7 +111,7 @@ MonoBehaviour:
m_charWidthMaxAdj: 0
m_enableWordWrapping: 1
m_wordWrappingRatios: 0.4
m_overflowMode: 0
m_overflowMode: 1
m_linkedTextComponent: {fileID: 0}
parentLinkedComponent: {fileID: 0}
m_enableKerning: 1
......@@ -246,8 +246,8 @@ RectTransform:
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0.5}
m_AnchorMax: {x: 1, y: 0.5}
m_AnchoredPosition: {x: -76.118, y: 0}
m_SizeDelta: {x: -191.99, y: 50}
m_AnchoredPosition: {x: -80.637, y: 0}
m_SizeDelta: {x: -201.03, y: 50}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &7529971249123660027
CanvasRenderer:
......@@ -386,7 +386,7 @@ RectTransform:
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 0}
m_SizeDelta: {x: 660, y: 60}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &7529971250023223853
CanvasRenderer:
......@@ -442,3 +442,6 @@ MonoBehaviour:
PkgLabel: {fileID: 7529971249123660026}
Version: {fileID: 1505428119831149407}
CheckMark: {fileID: 7529971248797218896}
Depency:
m_Name:
m_Version:
......@@ -905,9 +905,9 @@ RectTransform:
m_RootOrder: -1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 1, y: 1}
m_AnchorMax: {x: 0, y: 0}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: -17, y: 0}
m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0, y: 1}
--- !u!114 &183257256
MonoBehaviour:
......@@ -1070,7 +1070,7 @@ RectTransform:
m_RootOrder: -1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0}
m_AnchorMax: {x: 1, y: 0.99999404}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 20, y: 20}
m_Pivot: {x: 0.5, y: 0.5}
......@@ -1147,7 +1147,7 @@ RectTransform:
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: -501.01, y: -46.385025}
m_AnchoredPosition: {x: -384.00998, y: -46.385025}
m_SizeDelta: {x: 409.99, y: 450}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &244727598
......@@ -2071,7 +2071,7 @@ GameObject:
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 0
m_IsActive: 1
--- !u!224 &336766289
RectTransform:
m_ObjectHideFlags: 0
......@@ -2950,9 +2950,9 @@ RectTransform:
m_RootOrder: -1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0}
m_AnchorMax: {x: 1, y: 1}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 0}
m_SizeDelta: {x: -17, y: 0}
m_Pivot: {x: 0, y: 1}
--- !u!114 &482842297
MonoBehaviour:
......@@ -3940,7 +3940,7 @@ MonoBehaviour:
m_ChildAlignment: 1
m_StartCorner: 0
m_StartAxis: 0
m_CellSize: {x: 400, y: 60}
m_CellSize: {x: 650, y: 60}
m_Spacing: {x: 0, y: 0}
m_Constraint: 0
m_ConstraintCount: 2
......@@ -4279,9 +4279,9 @@ RectTransform:
m_RootOrder: -1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 1, y: 1}
m_AnchorMax: {x: 0, y: 0}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: -17, y: 0}
m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0, y: 1}
--- !u!114 &836546333
MonoBehaviour:
......@@ -4550,7 +4550,7 @@ RectTransform:
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: -7.005, y: -46.385}
m_AnchoredPosition: {x: 370.00003, y: -46.385}
m_SizeDelta: {x: 409.99, y: 450}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &904953575
......@@ -4853,7 +4853,7 @@ RectTransform:
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: -501, y: 207.88}
m_AnchoredPosition: {x: -384, y: 207.88}
m_SizeDelta: {x: 409.99, y: 58.53}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &1089878373
......@@ -5282,7 +5282,7 @@ MonoBehaviour:
m_ChildAlignment: 1
m_StartCorner: 0
m_StartAxis: 0
m_CellSize: {x: 400, y: 60}
m_CellSize: {x: 650, y: 60}
m_Spacing: {x: 0, y: 0}
m_Constraint: 0
m_ConstraintCount: 2
......@@ -5631,7 +5631,7 @@ GameObject:
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 0
m_IsActive: 1
--- !u!224 &1197479974
RectTransform:
m_ObjectHideFlags: 0
......@@ -5651,8 +5651,8 @@ RectTransform:
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: -7, y: -46.385}
m_SizeDelta: {x: 410, y: 450}
m_AnchoredPosition: {x: 363, y: -46.385}
m_SizeDelta: {x: 660, y: 450}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &1197479975
MonoBehaviour:
......@@ -5885,7 +5885,7 @@ RectTransform:
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 1}
m_AnchorMax: {x: 0.5, y: 1}
m_AnchoredPosition: {x: -152.56996, y: 0.00047928447}
m_AnchoredPosition: {x: -152.56996, y: 0.0007197563}
m_SizeDelta: {x: 305.14, y: 400.68}
m_Pivot: {x: 0, y: 1}
--- !u!114 &1245554590
......@@ -6285,8 +6285,8 @@ RectTransform:
m_Father: {fileID: 894184815}
m_RootOrder: -1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0.021185536}
m_AnchorMax: {x: 1, y: 0.9999996}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 20, y: 20}
m_Pivot: {x: 0.5, y: 0.5}
......@@ -6547,7 +6547,7 @@ MonoBehaviour:
m_HandleRect: {fileID: 202069241}
m_Direction: 2
m_Value: 0
m_Size: 0.9999631
m_Size: 0.99999404
m_NumberOfSteps: 0
m_OnValueChanged:
m_PersistentCalls:
......@@ -7525,7 +7525,7 @@ GameObject:
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
m_IsActive: 0
--- !u!224 &1662431187
RectTransform:
m_ObjectHideFlags: 0
......@@ -7678,7 +7678,7 @@ GameObject:
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 0
m_IsActive: 1
--- !u!224 &1706021652
RectTransform:
m_ObjectHideFlags: 0
......@@ -7698,8 +7698,8 @@ RectTransform:
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: -501, y: -46.385}
m_SizeDelta: {x: 410, y: 450}
m_AnchoredPosition: {x: -375.99, y: -46.385}
m_SizeDelta: {x: 660, y: 450}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &1706021653
MonoBehaviour:
......@@ -7966,7 +7966,7 @@ RectTransform:
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: -7.005005, y: 207.88004}
m_AnchoredPosition: {x: 370, y: 207.88004}
m_SizeDelta: {x: 409.99, y: 58.53}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &1774942672
......@@ -9681,8 +9681,8 @@ RectTransform:
m_Father: {fileID: 1234652790}
m_RootOrder: -1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0.021185536}
m_AnchorMax: {x: 1, y: 0.9999996}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 20, y: 20}
m_Pivot: {x: 0.5, y: 0.5}
......
......@@ -10,6 +10,7 @@
using Sirenix.OdinInspector;
using System;
using UnityEngine;
using UpmGitTool.UI;
namespace UpmGitTool
{
......@@ -17,7 +18,7 @@ namespace UpmGitTool
/// 包依赖
/// </summary>
[Serializable]
public struct DependencyInfo
public struct DependencyInfo : IListViewData
{
[HideLabel, DisplayAsString, VerticalGroup("包名")]
......
......@@ -8,6 +8,7 @@
*/
using Sirenix.OdinInspector;
using System.Collections.Generic;
using System.Drawing.Printing;
using UnityEngine;
......@@ -31,13 +32,39 @@ namespace UpmGitTool.UI
[LabelText("被引用包列表")]
public ListViewContent UsingByContent;
private UPackage Package;
public void Start()
{
GYEventsCenter.RegisterEventMsg(Lib.ON_SELECT_UPACKAGE_VERSION, OnSelectUpackageVersion);
}
private void OnDestroy()
{
GYEventsCenter.RemoveEventMsg(Lib.ON_SELECT_UPACKAGE_VERSION, OnSelectUpackageVersion);
}
public void InitData(UPackage package)
public void InitData(UpmPackageVersion version)
{
Package = package;
if (package == null) return;
if (version == null) return;
if (version.Dependencies != null && version.Dependencies.Length > 0)
{
UsingObj.SetActive(true);
var L = new List<IListViewData>();
foreach (var v in version.Dependencies)
L.Add(v);
UsingContent.UpdateList(L);
}
else
UsingObj.SetActive(false);
UsingByObj.SetActive(false);
}
private void OnSelectUpackageVersion(string msgId, object data)
{
var version = data as UpmPackageVersion;
InitData(version);
}
......
......@@ -8,6 +8,7 @@
*/
using Sirenix.OdinInspector;
using System;
using TMPro;
using UnityEngine;
using UnityEngine.UI;
......@@ -17,7 +18,7 @@ namespace UpmGitTool.UI
/// <summary>
/// 依赖项预制
/// </summary>
public class UICtrl_DepencyItem : MonoBehaviour
public class UICtrl_DepencyItem : MonoBehaviour, IListViewItem
{
[LabelText("背景")]
......@@ -32,5 +33,29 @@ namespace UpmGitTool.UI
[LabelText("已安装标记")]
public GameObject CheckMark;
[HideInInspector]
public DependencyInfo Depency;
public void SetData(IListViewData data)
{
Depency = (DependencyInfo)data;
PkgLabel.SetText(Depency.name);
Version.SetText(Depency.version);
CheckMark.SetActive(false);
}
public void SetActive(bool active) { gameObject.SetActive(active); }
public void SetSelected(bool selected)
{
}
public void AddClickAction(Action<IListViewItem> callBack) { OnClickCallBack = callBack; }
private Action<IListViewItem> OnClickCallBack;
public IListViewData GetData => Depency;
}
}
\ No newline at end of file
......@@ -107,6 +107,8 @@ namespace UpmGitTool.UI
BtnDocumentation.gameObject.SetActive(!string.IsNullOrEmpty(CurrentVersion.DocumentationUrl));
BtnChangeLog.gameObject.SetActive(!string.IsNullOrEmpty(CurrentVersion.ChangelogUrl));
}
GYEventsCenter.PostNotification(Lib.ON_SELECT_UPACKAGE_VERSION, v);
}
public void OnClickUpmVersion(IListViewItem item) { InitVersion(item.GetData as UpmPackageVersion); }
......
......@@ -64,6 +64,11 @@
/// </summary>
public const string ON_PACKAGE_DATA_REFRESH = "ON_PACKAGE_DATA_REFRESH";
/// <summary>
/// 选择了一个包的版本
/// </summary>
public const string ON_SELECT_UPACKAGE_VERSION = "ON_SELECT_UPACKAGE_VERSION";
#region 通用方法
public static string GetGitLastName(this string url)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册