public static IIgniteGUIGroup AddMonitoringLabel(this IIgniteGUIGroup group, Func <string> monitor) { var labelChangeEvent = new IgniteLabel.LabelChangeEvent(); var label = IgniteLabel.Create(""); label.StartCoroutine(MonitoringCoroutine(() => { if (label == null) { return; } label.labelText.text = monitor(); })); return(group.Add(label)); }
public static IIgniteGUIGroup AddMonitoringHighligtedLabel(this IIgniteGUIGroup group, Func <string> monitor, Func <Color> colorMonitor) { var labelChangeEvent = new IgniteLabel.LabelChangeEvent(); var label = IgniteLabel.Create(""); label.StartCoroutine(MonitoringCoroutine(() => { if (label == null) { return; } var color = colorMonitor(); label.labelText.text = monitor(); label.labelText.color = LuminanceUtility.ChooseFontColor(color); label.backgroundImage.color = color; label.highlightBackgroundColor = color; label.defaultBackgroundColor = color; })); return(group.Add(label)); }
public static IIgniteGUIGroup AddLabel(this IIgniteGUIGroup group, string label, Color?fontColor = null, Color?defaultBackgroundColor = null, Color?highlightBackgroundColor = null) { return(group.Add(IgniteLabel.Create(label, fontColor, defaultBackgroundColor, highlightBackgroundColor))); }
public static IIgniteGUIGroup AddLabel(this IIgniteGUIGroup group, string label, UnityEvent <string> labelChangeEvent = null) { return(group.Add(IgniteLabel.Create(label, labelChangeEvent))); }