/// <summary> /// Add a widget into /// </summary> /// <param name="widget"></param> public void AddWidget(UControl widget) { if (widget != null) { _children.Add(widget); } }
/// <summary> /// /// </summary> /// <param name="widget"></param> public void RemoveWidget(UWidget widget) { _leftItems.Remove(widget); _rightItems.Remove(widget); UControl.UnActiveToolbarGuiStyle(widget); }
/// <summary> /// /// </summary> /// <param name="widget"></param> /// <param name="alignment"></param> public void AddWidget(UWidget widget, Alignment alignment = Alignment.Left) { if (alignment == Alignment.Left) { _leftItems.Add(widget); } else { _rightItems.Add(widget); } UControl.ActiveToolbarGuiStyle(widget); }
/// <summary> /// /// </summary> /// <param name="widget"></param> public void AddWidget(UControl widget) { _layout.AddWidget(widget); }
/// <summary> /// /// </summary> /// <param name="control"></param> protected static void UnActiveToolbarGuiStyle(UControl control) { control.attachOnToolbar = false; control._style = GUIStyle.none; }
/// <summary> /// /// </summary> /// <param name="control"></param> protected static void ActiveToolbarGuiStyle(UControl control) { control.attachOnToolbar = true; control.ActiveToolbarGuiStyle(); }