public void AddWidget(UIWidget w) { if (!Widgets.Contains(w)) { w.Surface = this; Widgets.Add(w); IsDirty = true; } }
public void RemoveWidget(UIWidget w) { if (Widgets.Contains(w)) { Widgets.Remove(w); w.Batch = null; w.Surface = null; IsDirty = true; } }
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; }