vovgou / loxodon-framework

An MVVM & Databinding framework that can use C# and Lua to develop games
MIT License
1.86k stars 363 forks source link

WindowManager #3

Closed fooliker closed 3 years ago

fooliker commented 4 years ago

WindowManager.Clear() 不能将当前容器下面的所有Window销毁 public virtual void Clear() { for (int i = this.windows.Count; i > 0; i--) {

this.windows[0].Dismiss(true);### issue

        }
        this.windows.Clear();
    }
vovgou commented 4 years ago

已修复

giangnb-dev commented 4 years ago

@cocowolf Instead of calling Dismiss() to destroy the window, I want to use the Hide() function to hide the window and reuse. Give me a solution, thank

giangnb-dev commented 4 years ago

And explain to me if I use Loadwindow and Dismiss to display the popup and close the popup ( Instantiate and Destroy ), does the large number of popups affect the performance of the game?

vovgou commented 4 years ago

@cocowolf Instead of calling Dismiss() to destroy the window, I want to use the Hide() function to hide the window and reuse. Give me a solution, thank

You can use the window.Hide() to hide the window.you can also dismiss the window, but keep WindowViewMode to restore the window state,or you cache the prefab of the view in the IUIViewLocator, so you can also quickly create a window.

vovgou commented 4 years ago

And explain to me if I use Loadwindow and Dismiss to display the popup and close the popup ( Instantiate and Destroy ), does the large number of popups affect the performance of the game?

If you cache the prefab of the window,so don't worry about this.