From a534f75d38e9d9864de06c1afed79fb1a7e80d24 Mon Sep 17 00:00:00 2001
From: client_Wu Xijin <364452445@qq.com>
Date: 星期一, 27 八月 2018 10:15:02 +0800
Subject: [PATCH] 2948 修改窗口管理机制,移除子界面动画。
---
System/WindowBase/Window.cs | 25 +++++++++++++++++++------
1 files changed, 19 insertions(+), 6 deletions(-)
diff --git a/System/WindowBase/Window.cs b/System/WindowBase/Window.cs
index 0bbcd05..08490aa 100644
--- a/System/WindowBase/Window.cs
+++ b/System/WindowBase/Window.cs
@@ -65,9 +65,20 @@
Debug.Log(ex.StackTrace);
}
+ RectTransform parent = null;
try
{
windowTimer = 0f;
+ var parentName = string.Empty;
+ if (WindowConfig.Get().FindParentWindow(this.gameObject.name, out parentName))
+ {
+ var parentWindow = WindowCenter.Instance.Get(parentName);
+ if (parentWindow != null)
+ {
+ parent = parentWindow.transform as RectTransform;
+ rectTransform.MatchWhith(parent);
+ }
+ }
OnPreOpen();
WindowCenter.Instance.NotifyBeforeOpen(this);
}
@@ -77,14 +88,16 @@
}
finally
{
- var parent = FindParent(windowInfo.windowType);
-
- if (parent != null)
+ if (parent == null)
{
- rectTransform.MatchWhith(parent);
- if (windowInfo.windowType >= WindowType.Normal)
+ parent = FindParent(windowInfo.windowType);
+ if (parent != null)
{
- rectTransform.SetAsLastSibling();
+ rectTransform.MatchWhith(parent);
+ if (windowInfo.windowType >= WindowType.Normal)
+ {
+ rectTransform.SetAsLastSibling();
+ }
}
}
--
Gitblit v1.8.0