Example #1
0
        public override bool Interactible(MemberInfo member, GameParameters parameters)
        {
            if (MMCheck.atMainMenu && MMCheck.useGlobalSettings4All)
            {
                return(false);
            }
            if (member.Name == "useGlobalSettings4Misc")
            {
                return(true);
            }
            if (MMCheck.atMainMenu && MMCheck.useGlobalSettings4Misc)
            {
                return(false);
            }

            if (getLogEntryKey)
            {
                // Use MapView.MapCamera to get a gameObject
                ManualEntrySelectHotKey gui = MapView.MapCamera.gameObject.GetComponent <ManualEntrySelectHotKey>();
                if (gui == null)
                {
                    Log.Info("Adding ManualEntrySelectHotKey");
                    gui = MapView.MapCamera.gameObject.AddComponent <ManualEntrySelectHotKey>();
                }
                if (ManualEntrySelectHotKey.Instance != null)
                {
                    if (ManualEntrySelectHotKey.Instance.completed)
                    {
                        getLogEntryKey = false;
                        ManualEntrySelectHotKey.Instance.EnableWindow(false);
                        if (ManualEntrySelectHotKey.Instance.keyOK)
                        {
                            ManualEntryKeycode = ManualEntrySelectHotKey.Instance.hotkey;
                        }
                        UnityEngine.Object.Destroy(gui);
                        gui = null;
                        ManualEntrySelectHotKey.Instance = null;
                    }
                    else
                    {
                        ManualEntrySelectHotKey.Instance.lastTimeTic = Time.realtimeSinceStartup;
                        if (!ManualEntrySelectHotKey.Instance.active)
                        {
                            ManualEntrySelectHotKey.Instance.EnableWindow();
                            ManualEntrySelectHotKey.Instance.hotkey = ManualEntryKeycode;
                        }
                    }
                }
                return(true);
            }
            return(true);
        }
Example #2
0
 void Start()
 {
     Log.Info("ManualEntrySelectHotKey.Start");
     Instance = this;
 }