|
|
@ -35,7 +35,6 @@ namespace EGFramework{ |
|
|
|
window.PopupCentered(); |
|
|
|
window.PopupCentered(); |
|
|
|
this.CurrentWindow = window; |
|
|
|
this.CurrentWindow = window; |
|
|
|
CurrentWindow.VisibilityChanged += OnPopUpUnitVisibleChanged; |
|
|
|
CurrentWindow.VisibilityChanged += OnPopUpUnitVisibleChanged; |
|
|
|
GD.Print(WindowCache.Count); |
|
|
|
|
|
|
|
PopUpFlag = false; |
|
|
|
PopUpFlag = false; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -43,19 +42,16 @@ namespace EGFramework{ |
|
|
|
{ |
|
|
|
{ |
|
|
|
if (CurrentWindow != null && !CurrentWindow.Visible && !PopUpFlag) |
|
|
|
if (CurrentWindow != null && !CurrentWindow.Visible && !PopUpFlag) |
|
|
|
{ |
|
|
|
{ |
|
|
|
GD.Print("-----"); |
|
|
|
|
|
|
|
CurrentWindow.VisibilityChanged -= OnPopUpUnitVisibleChanged; |
|
|
|
CurrentWindow.VisibilityChanged -= OnPopUpUnitVisibleChanged; |
|
|
|
if (this.WindowCache.Count > 0) |
|
|
|
if (this.WindowCache.Count > 0) |
|
|
|
{ |
|
|
|
{ |
|
|
|
CurrentWindow.Hide(); |
|
|
|
|
|
|
|
Window lastWindow = WindowCache.Pop(); |
|
|
|
Window lastWindow = WindowCache.Pop(); |
|
|
|
CurrentWindow = lastWindow; |
|
|
|
CurrentWindow = lastWindow; |
|
|
|
CurrentWindow.PopupCentered(); |
|
|
|
Callable.From(() => CurrentWindow.PopupCentered()).CallDeferred(); |
|
|
|
CurrentWindow.VisibilityChanged += OnPopUpUnitVisibleChanged; |
|
|
|
CurrentWindow.VisibilityChanged += OnPopUpUnitVisibleChanged; |
|
|
|
} |
|
|
|
} |
|
|
|
else |
|
|
|
else |
|
|
|
{ |
|
|
|
{ |
|
|
|
CurrentWindow.Hide(); |
|
|
|
|
|
|
|
CurrentWindow = null; |
|
|
|
CurrentWindow = null; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|