public static bool Condition()
        {
            if (!MapUIContainer.IsInstance())
            {
                return(false);
            }

            if (current != null && !current.IsActiveControl)
            {
                Manager.Input input = Manager.Input.Instance;
                current = null;

                input.ReserveState(Manager.Input.ValidType.Action);
                input.SetupState();
                Map.Instance.Player.Controller.ChangeState("Normal");
            }

            SystemMenuUI ui = MapUIContainer.SystemMenuUI;

            if (!ui.IsActiveControl || !ui.HomeMenu.IsActiveControl)
            {
                return(false);
            }

            return(true);
        }
Beispiel #2
0
            static public void OnGUI()
            {
                if (PlayerDeath.Value == DeathType.None ||
                    playerController == null ||
                    playerController["health"] > 0 ||
                    !MapUIContainer.IsInstance() ||
                    MapUIContainer.AnyUIActive())
                {
                    return;
                }

                if (labelStyle == null)
                {
                    labelStyle = new GUIStyle(GUI.skin.label)
                    {
                        fontSize  = 14,
                        fontStyle = FontStyle.Bold,
                        alignment = TextAnchor.MiddleCenter
                    };

                    subLabelStyle = new GUIStyle(GUI.skin.label)
                    {
                        fontSize  = 12,
                        alignment = TextAnchor.MiddleCenter
                    };
                }

                rect = GUI.Window(
                    WindowIDDead.Value,
                    rect,
                    Draw,
                    "",
                    GUI.skin.box
                    );
            }
Beispiel #3
0
        internal static void LogError(Type source, string text)
        {
            string prefix = $"[{Name}]";

            Debug.LogError($"{prefix}\n{text}");

            if (NotifyCrash.Value && MapUIContainer.IsInstance())
            {
                MapUIContainer.AddNotify($"{prefix} '{source.Name}' crashed! Disabling then enabling will reload it.");
            }
        }
Beispiel #4
0
            static public void OnGUI()
            {
                if (!Map.IsInstance() ||
                    !MapUIContainer.IsInstance() ||
                    Map.Instance.Player == null)
                {
                    justHid = true;
                    return;
                }

                if (asleep)
                {
                    DrawSleep();
                }
                else
                {
                    DrawHours();
                }
            }
        public static void OnGUI()
        {
            if (!MapUIContainer.IsInstance())
            {
                return;
            }

            StatusUI ui = MapUIContainer.SystemMenuUI.StatusUI;

            if (!ui || !ui.EnabledInput)
            {
                if (selected != null)
                {
                    selected = null;
                }

                return;
            }

            if (selected == null)
            {
                selected = Traverse.Create(ui).Field("_selectedID").GetValue <IntReactiveProperty>();
            }

            if (selected == null || selected.Value == 0)
            {
                return;
            }

            agent = Map.Instance.AgentTable[selected.Value - 1];

            if (agent.ChaControl.fileGameInfo.phase < 2)
            {
                return;
            }

            if (headerStyle == null)
            {
                headerStyle = new GUIStyle(GUI.skin.label)
                {
                    fontStyle = FontStyle.Bold
                };

                addStyle = new GUIStyle(GUI.skin.button)
                {
                    fontStyle = FontStyle.Bold,
                    normal    =
                    {
                        textColor = Color.green
                    },
                    focused =
                    {
                        textColor = Color.green
                    },
                    active =
                    {
                        textColor = Color.green
                    },
                    hover =
                    {
                        textColor = Color.green
                    },
                };

                removeStyle = new GUIStyle(GUI.skin.button)
                {
                    fontStyle = FontStyle.Bold,
                    normal    =
                    {
                        textColor = Color.red
                    },
                    focused =
                    {
                        textColor = Color.red
                    },
                    active =
                    {
                        textColor = Color.red
                    },
                    hover =
                    {
                        textColor = Color.red
                    },
                };
            }

            rect = Window.Draw(WindowID.Value, rect, Draw, "Mad Skills");
        }
Beispiel #6
0
 public static bool Condition()
 {
     return
         (MapUIContainer.IsInstance() &&
          MapUIContainer.Instance.MinimapUI.AllAreaMap.activeSelf);
 }