Exemplo n.º 1
0
 private static void Postfix(uGUI_CraftingMenu __instance, uGUI_CraftingMenu.Node node)
 {
     if (!Active)
     {
         return;
     }
     if (__instance != CurrentMenu)
     {
         return;
     }
     GUIFormatter.SetNodeChroma(node, true);
 }
Exemplo n.º 2
0
                private static void Postfix(uGUI_CraftNode __instance)
                {
                    if (!Active)
                    {
                        return;
                    }
                    if (__instance.view != CurrentMenu)
                    {
                        return;
                    }

                    GUIFormatter.PaintNodeColor(__instance);
                }
Exemplo n.º 3
0
                private static void Postfix(uGUI_CraftNode __instance)
                {
                    if (!Active)
                    {
                        return;
                    }
                    if (uGUI_CraftNodeReflector.GetView(__instance) != CurrentMenu)
                    {
                        return;
                    }

                    GUIFormatter.PaintNodeColor(__instance);
                }
Exemplo n.º 4
0
        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));
        }
Exemplo n.º 5
0
                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);
                    }
                }
Exemplo n.º 6
0
                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);
                    }
                }
Exemplo n.º 7
0
        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));
            }
        }
Exemplo n.º 8
0
        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));
        }
Exemplo n.º 9
0
        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));
        }