2using System.Collections.Generic;
12 num = ((!(c.r + c.g + c.b > 1.5f)) ? (0.5f - @
default.strength) : (0.5f + @
default.strength));
13 c.r = Mathf.Clamp((c.r - 0.5f) * num2 + num, 0f, 1f);
14 c.g = Mathf.Clamp((c.g - 0.5f) * num2 + num, 0f, 1f);
15 c.b = Mathf.Clamp((c.b - 0.5f) * num2 + num, 0f, 1f);
19 public static string TagColorGoodBad(
this string s, Func<bool> funcGood,
bool dark =
false)
22 return "<color=" +
GetFixedColor(funcGood() ? @
default.textGood : @
default.textBad, dark).ToHex() +
">" + s +
"</color>";
25 public static string TagColorGoodBad(
this string s, Func<bool> funcGood, Func<bool> funcBad,
bool dark =
false)
28 bool flag = funcGood();
29 bool flag2 = funcBad();
34 return "<color=" +
GetFixedColor(flag ? @
default.textGood : @
default.textBad, dark).ToHex() +
">" + s +
"</color>";
39 return Util.Instantiate<
UICurrency>(
"UI/Util/UICurrency", window.transform);
50 return text.TagColor(funcGood() ? skinColorProfile.
textGood : skinColorProfile.
textBad);
56 return text.TagColor(funcGood() ? skinColorProfile.
textGood : ((funcBad !=
null && funcBad()) ? skinColorProfile.
textBad : skinColorProfile.
textDefault));
61 foreach (
Thing thing
in things)
71 return string.Compare(a.GetName(NameStyle.FullNoArticle, 1), b.GetName(NameStyle.FullNoArticle, 1));
77 return b.SecondaryCompare(m, a);
virtual void SetSortVal(UIList.SortMode m, CurrencyType currency=CurrencyType.Money)
static Color GetFixedColor(Color c, bool dark)
static string TagColor(this string text, Func< bool > funcGood, Func< bool > funcBad, SkinColorProfile colors=null)
static string TagColor(this string text, Func< bool > funcGood, SkinColorProfile colors=null)
static void Sort(this List< Thing > things, UIList.SortMode m, bool ascending=false)
static string TagColorGoodBad(this string s, Func< bool > funcGood, Func< bool > funcBad, bool dark=false)
static UICurrency AttachCurrency(this Window window)
static string TagColor(this string s, FontColor c, SkinColorProfile colors=null)
static string TagColorGoodBad(this string s, Func< bool > funcGood, bool dark=false)
static SkinColorProfile CurrentColors
static SkinRootStatic CurrentSkin
override string GetName(NameStyle style, int _num=-1)