public static string AddCount(this string txt, IGotCount obj) { var isNull = obj.IsNullOrDestroyed_Obj(); var cnt = isNull ? 0 : obj.CountForInspector(); return("{0} {1}".F(txt, !isNull ? (cnt > 0 ? (cnt == 1 ? "|" : "[{0}]".F(cnt)) : "") : "null")); }
public static bool enter(this string txt, ref int enteredOne, int thisOne, IGotCount forAddCount) => icon.Enter.enter(txt.AddCount(forAddCount), ref enteredOne, thisOne, enterLabelStyle: forAddCount.IsNullOrDestroyed_Obj() ? PEGI_Styles.EnterLabel : (forAddCount.CountForInspector() > 0 ? PEGI_Styles.EnterLabel : PEGI_Styles.ClippingText));