public static bool SetIconFontByTag(this Widget w, string iconFontTag) { if (w != null && !w.IsDisposed && ReflectionUtils.HasProperty(w.GetType(), "IconFont")) { IGUIContext ctx = SummerGUIWindow.CurrentContext; //IGUIContext ctx = w.ParentWindow as IGUIContext; if (ctx != null) { ReflectionUtils.SetPropertyValue(w, "IconFont", ctx.GetIconFont(iconFontTag)); return(true); } /*** * else { * w._IconFontTag = iconFontTag; * } ***/ } return(false); }
public static IGUIFont GetIconFont(this IGUIContext ctx, CommonFontTags tag) { return(ctx.GetIconFont(tag.ToString())); }