public TvDialog CreateDialog(IViewport viewport, Action <TvDialog> dialogSetup, string name = null) { var dialogViewport = viewport.Layer(ViewportLayer.Top, -1); var dialogName = name ?? $"TvDialog_{Guid.NewGuid()}"; var dialog = new TvDialog(_skinManager.CurrentSkin, dialogViewport, _ui, dialogName); dialogSetup.Invoke(dialog); foreach (var cmp in dialog.State.UI.Components) { cmp.UpdateViewport(cmp.Viewport.Layer(ViewportLayer.Top)); } return(dialog); }
public TvWindow(ISkin skin, IViewport boxModel, WindowState initialState) : base(skin, boxModel.Layer(ViewportLayer.Top, -1), initialState, $"TvWindow_{Guid.NewGuid()}") { initialState.SetOwnerWindow(this); AsComponent().Metadata.ViewportChanged += MyViewportChanged; }
internal TvDialog(ISkin skin, IViewport viewport, IComponentTree owner, string name = null) : base(skin, viewport.Layer(ViewportLayer.Top, -1), new DialogState(skin, name ?? $"TvDialog_{Guid.NewGuid()}")) { Metadata.CanFocus = false; State.Init(this, owner); }