|
|
@@ -176,7 +176,7 @@ namespace Fort23.Mono
|
|
|
UICamera = prefab.transform.GetComponentInChildren<Camera>();
|
|
|
}
|
|
|
|
|
|
- current = EventSystem.current;
|
|
|
+ current = Canvas.GetComponentInChildren<EventSystem>();
|
|
|
Assembly assembly = Assembly.Load("Fort23.Mono");
|
|
|
BackgroundPanelType = assembly.GetType(" Fort23.Mono.BackgroundPanel");
|
|
|
|
|
|
@@ -240,7 +240,7 @@ namespace Fort23.Mono
|
|
|
public void SetEventSystemEnable(bool value)
|
|
|
{
|
|
|
if (current != null)
|
|
|
- current.enabled = value;
|
|
|
+ current.gameObject.SetActive(value);
|
|
|
}
|
|
|
|
|
|
[CustomMethod(CustomMethodType.Update)]
|
|
|
@@ -362,7 +362,7 @@ namespace Fort23.Mono
|
|
|
{
|
|
|
if (current != null)
|
|
|
{
|
|
|
- SetEventSystemEnable(false);
|
|
|
+ // SetEventSystemEnable(false);
|
|
|
}
|
|
|
|
|
|
|
|
|
@@ -439,7 +439,7 @@ namespace Fort23.Mono
|
|
|
|
|
|
if (current != null)
|
|
|
{
|
|
|
- SetEventSystemEnable(true);
|
|
|
+ // SetEventSystemEnable(true);
|
|
|
}
|
|
|
|
|
|
|
|
|
@@ -464,7 +464,7 @@ namespace Fort23.Mono
|
|
|
{
|
|
|
if (current != null)
|
|
|
{
|
|
|
- SetEventSystemEnable(true);
|
|
|
+ // SetEventSystemEnable(true);
|
|
|
}
|
|
|
|
|
|
// 界面数据没准备好,因此本次操作将被销毁
|
|
|
@@ -581,8 +581,7 @@ namespace Fort23.Mono
|
|
|
if (isShowBG)
|
|
|
{
|
|
|
uiPanel.IsShowCustomBGPanel = true;
|
|
|
- if (!AllShowBGUIs.Contains(uiPanel))
|
|
|
- AllShowBGUIs.Add(uiPanel);
|
|
|
+
|
|
|
await GetBackgroundPanel(uiPanel, GetLayer(layer));
|
|
|
}
|
|
|
|
|
|
@@ -621,12 +620,6 @@ namespace Fort23.Mono
|
|
|
await uiPanel.Open();
|
|
|
|
|
|
|
|
|
- if (current != null)
|
|
|
- {
|
|
|
- SetEventSystemEnable(true);
|
|
|
- }
|
|
|
-
|
|
|
-
|
|
|
await TimerComponent.Instance.WaitAsync(1); //等待一帧 让渲染完成后在执行完成逻辑
|
|
|
callback?.Invoke(uiPanel);
|
|
|
|
|
|
@@ -636,14 +629,16 @@ namespace Fort23.Mono
|
|
|
|
|
|
if (isShowBG)
|
|
|
{
|
|
|
+ if (!AllShowBGUIs.Contains(uiPanel))
|
|
|
+ AllShowBGUIs.Add(uiPanel);
|
|
|
var popupPanel = GetComponent(BackgroundPanelType) as UIPanel;
|
|
|
- // popupPanel.transform.SetAsFirstSibling();
|
|
|
int index01 = uiPanel.GObjectPoolInterface.transform.GetSiblingIndex();
|
|
|
popupPanel.transform.SetSiblingIndex(index01 - 1);
|
|
|
- // uiPanel.IsShowCustomBGPanel = true;
|
|
|
- // if (!AllShowBGUIs.Contains(uiPanel))
|
|
|
- // AllShowBGUIs.Add(uiPanel);
|
|
|
- // await GetBackgroundPanel(uiPanel, GetLayer(layer));
|
|
|
+ }
|
|
|
+
|
|
|
+ if (current != null)
|
|
|
+ {
|
|
|
+ SetEventSystemEnable(true);
|
|
|
}
|
|
|
|
|
|
return uiPanel;
|