public static bool ChangeColor(InventoryItemElement theWidget, InventoryDataObject_ShopGear __instance)
 {
     try
     {
         theWidget.iconBGColors.SetColor(__instance.componentDef);
     }
     catch (Exception ex)
     {
         Control.LogError(ex);
     }
     return(false);
 }
 public static bool ChangeColor(InventoryItemElement theWidget, InventoryDataObject_ShopGear __instance)
 {
     try
     {
         ColorExtentions.ChangeBackColor(__instance.componentDef, theWidget);
         TColorExtentions.ChangeTextIconColor(__instance.componentDef, theWidget);
     }
     catch (Exception ex)
     {
         Control.LogError(ex);
     }
     return(false);
 }
Esempio n. 3
0
 public static void Postfix(InventoryDataObject_ShopGear __instance, InventoryItemElement theWidget)
 {
     try
     {
         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);
     }
 }