public UIWindow CreateWindow(Scene creatingScene, WindowBuilder windowBuilder) { if (windowBuilder.CanBeClosed) { windowBuilder.OnClose(win => { this.windows.Remove(win); }); } var window = windowBuilder.Build(creatingScene, this.uiBuilder.style); window.AnyPartOfWindowClicked += win => { SelectWindow(win); }; this.windows.Add(window); SelectWindow(window); return(window); }
public App(string appName, bool isSingleton, WindowBuilder windowBuilder) { this.appName = appName; this.isSingleton = isSingleton; this.windowBuilder = windowBuilder; }