Example #1
0
 public void AddWidget(UIWidget w)
 {
     if (!Widgets.Contains(w))
     {
         w.Surface = this;
         Widgets.Add(w);
         IsDirty = true;
     }
 }
Example #2
0
 public void RemoveWidget(UIWidget w)
 {
     if (Widgets.Contains(w))
     {
         Widgets.Remove(w);
         w.Batch = null;
         w.Surface = null;
         IsDirty = true;
     }
 }
Example #3
0
 Material GetMaterial(UIWidget w)
 {
     if (w is UILabel)
     {
         var label = w as UILabel;
         if (label.Font == null) return null;
         else return mFontMaterialMgr.GetMaterial(label.Font);
     }
     else return null;
 }