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