private static void Postfix(uGUI_CraftingMenu __instance, uGUI_CraftingMenu.Node node) { if (!Active) { return; } if (__instance != CurrentMenu) { return; } GUIFormatter.SetNodeChroma(node, true); }
private static void Postfix(uGUI_CraftNode __instance) { if (!Active) { return; } if (__instance.view != CurrentMenu) { return; } GUIFormatter.PaintNodeColor(__instance); }
private static void Postfix(uGUI_CraftNode __instance) { if (!Active) { return; } if (uGUI_CraftNodeReflector.GetView(__instance) != CurrentMenu) { return; } GUIFormatter.PaintNodeColor(__instance); }
private static void Deactivate() { if (!Active) { return; } Active = false; int c = 0, n = 0; uGUI_CraftNode menuRoot = GUIHandler.CurrentMenu.icons; ForeachChildRecursively(menuRoot, x => ReplaceNodeTech(x)); menuRoot?.UpdateRecursively(ref c, ref n); ForeachChildRecursively(menuRoot, x => GUIFormatter.RevertNodeColorAnimated(x)); }
private static void Postfix(uGUI_CraftNode __instance, bool available) { if (!Active) { return; } if (__instance.view != CurrentMenu) { return; } if (__instance.visible) { var enabled = available && !__instance.IsLockedInHierarchy(); GUIFormatter.SetNodeChroma(__instance, enabled); } }
private static void Postfix(uGUI_CraftNode __instance, bool available) { if (!Active) { return; } if (uGUI_CraftNodeReflector.GetView(__instance) != CurrentMenu) { return; } if (uGUI_CraftNodeReflector.GetVisible(__instance)) { var enabled = available && !uGUI_CraftNodeReflector.IsLockedInHierarchy(__instance); GUIFormatter.SetNodeChroma(__instance, enabled); } }
private static void Deactivate() { if (!Active) { return; } Active = false; int c = 0, n = 0; var menuRoot = GUIHandler.CurrentMenu.tree; if (menuRoot != null) { ForeachChildRecursively(menuRoot, x => ReplaceNodeTech(x)); GUIHandler.CurrentMenu.UpdateNotifications(menuRoot, ref c, ref n); ForeachChildRecursively(menuRoot, x => GUIFormatter.RevertNodeColorAnimated(x)); } }
private static void Deactivate() { if (!Active) { return; } Active = false; int c = 0, n = 0; var menuRoot = uGUI_CraftingMenuReflector.GetIcons(GUIHandler.CurrentMenu); replacedNodeTechs.ForEach(x => x.Key.techType0 = x.Value); replacedNodeTechs.Clear(); if (menuRoot != null) { menuRoot.UpdateRecursively(ref c, ref n); } ForeachChildRecursively(menuRoot, x => GUIFormatter.RevertNodeColorAnimated(x)); }
private static void Activate() { if (Active) { return; } if (!GUIHandler.CurrentMenu) { return; } Active = true; int c = 0, n = 0; var menuRoot = uGUI_CraftingMenuReflector.GetIcons(GUIHandler.CurrentMenu); ForeachChildRecursively(menuRoot, x => ReplaceNodeTech(x)); if (menuRoot != null) { menuRoot.UpdateRecursively(ref c, ref n); } ForeachChildRecursively(menuRoot, x => GUIFormatter.PaintNodeColorAnimated(x)); }