public UiFullState SetWidget(UiWidget widget)
 {
     foreach (var m in modals)
     {
         m.Widget.Dispose();
     }
     modals     = new Stack <ModalState>();
     baseWidget = widget;
     fullState  = new UiFullState()
     {
         Widget = baseWidget,
         Modals = modals
     };
     return(fullState);
 }
 public void SetFullState(UiFullState ctx)
 {
     modals     = ctx.Modals;
     baseWidget = ctx.Widget;
     fullState  = ctx;
 }