public static void ModifyDisplayValue(InfoDisplay info, ref string displayName) { foreach (GlobalInfoDisplay global in globalInfoDisplays) { global.ModifyDisplayValue(info, ref displayName); } }
public static bool Active(InfoDisplay info) { bool active = info.Active(); foreach (GlobalInfoDisplay global in globalInfoDisplays) { if (global.Active(info).HasValue) { active &= global.Active(info).Value; } } return(active); }
/// <summary> /// Allows you to modify the display value (the text displayed next to the icon) of an InfoDisplay. /// </summary> /// <param name="currentDisplay">The display you're modifying the display value for.</param> /// <param name="displayValue">The</param> public virtual void ModifyDisplayValue(InfoDisplay currentDisplay, ref string displayValue) { }
/// <summary> /// Allows you to modify whether or not a given InfoDisplay is active. Returns null (no change from default behavior) by default for all InfoDisplays. /// </summary> /// <param name="currentDisplay">The display you're deciding the active state for.</param> public virtual bool?Active(InfoDisplay currentDisplay) => null;
internal static int Add(InfoDisplay infoDisplay) { InfoDisplays.Add(infoDisplay); return(InfoDisplays.Count - 1); }