public static bool AddGuiItemToGroup(string name, Rect rect, GuiItemType type, ref List <GuiItem> guiItems, GuiItemColor itemColor, GuiItemState state = GuiItemState.NORMAL, bool enabled = true, FontStyle fontStyle = FontStyle.Normal, TextAnchor textAnchor = TextAnchor.MiddleCenter, Event <object> onChangedEvent = null) { guiItems.Add(new GuiItem() { Name = name, Type = type, Enabled = enabled, Rect = rect, ItemColor = itemColor, State = state, FontStyle = fontStyle, TextAnchor = textAnchor, OnChangedEvent = onChangedEvent }); return(true); }
public static void SetGuiItemsGroupLabel(string name, Rect rect, ref List <GuiItem> guiItems, GuiItemColor itemColor, FontStyle fontStyle = FontStyle.Normal, TextAnchor textAnchor = TextAnchor.MiddleLeft) { guiItems.Add(new GuiItem() { Name = name, Type = GuiItemType.LABEL, Enabled = true, Rect = rect, ItemColor = itemColor, FontStyle = fontStyle, TextAnchor = textAnchor }); }
public static bool CreateGuiItemsGroup(string[] names, List <Rect> rects, GuiItemType type, ref List <GuiItem> guiItems, GuiItemColor itemColor, GuiItemState state = GuiItemState.NORMAL, bool enabled = true, FontStyle fontStyle = FontStyle.Normal, TextAnchor textAnchor = TextAnchor.MiddleCenter, Event <object> onChangedEvent = null) { guiItems.Clear(); for (int i = 0; i < names.Length; i++) { guiItems.Add(new GuiItem() { Name = names[i], Type = type, Enabled = enabled, Rect = rects[i], ItemColor = itemColor, State = state, FontStyle = fontStyle, TextAnchor = textAnchor, OnChangedEvent = onChangedEvent }); } return(true); }