public static bool ChangeColor(ListElementController_SalvageGear_NotListView __instance, InventoryItemElement_NotListView theWidget) { try { if (__instance.componentDef == null) { return(true); } theWidget.iconBGColors.SetColor(__instance.componentDef); return(false); } catch (Exception e) { Control.LogError(e); return(true); } }
public static bool ChangeColor(ListElementController_SalvageGear_NotListView __instance, InventoryItemElement_NotListView theWidget) { try { if (__instance.componentDef == null) { return(true); } ColorExtentions.ChangeBackColor(__instance.componentDef, theWidget); TColorExtentions.ChangeTextIconColor(__instance.componentDef, theWidget); return(false); } catch (Exception e) { Control.LogError(e); return(true); } }
public static void Postfix(ListElementController_SalvageGear_NotListView __instance, InventoryItemElement_NotListView theWidget) { try { if (__instance.componentDef == null) { return; } if (HasOverrideColor(__instance.componentDef, out Color overrideColor)) { UIColorRefTracker[] array = theWidget.iconBGColors; for (int i = 0; i < array.Length; i++) { array[i].OverrideWithColor(overrideColor); } } } catch (Exception e) { Logger.Error(e); } }