Beispiel #1
0
 public void AddChild(UiWidget child)
 {
     addRemoves.Enqueue((ctx) =>
     {
         child.ApplyStylesheet(ctx.Data.Stylesheet);
         Children.Add(child);
     });
 }
Beispiel #2
0
 public void SetWidget(UiWidget widget)
 {
     widget.ApplyStylesheet(Data.Stylesheet);
     foreach (var m in modals)
     {
         m.Widget.Dispose();
     }
     modals     = new List <ModalState>();
     baseWidget = widget;
 }
Beispiel #3
0
        public int OpenModal(UiWidget widget)
        {
            var handle = _h++;

            widget.ApplyStylesheet(Data.Stylesheet);
            modals.Add(new ModalState()
            {
                Widget = widget, Handle = handle
            });
            return(handle);
        }
Beispiel #4
0
 public void SwapModal(UiWidget widget, int handle)
 {
     widget.ApplyStylesheet(Data.Stylesheet);
     for (int i = 0; i < modals.Count; i++)
     {
         if (modals[i].Handle == handle)
         {
             modals[i].Widget = widget;
             break;
         }
     }
 }