Esempio n. 1
0
        public bool Hook(Callback<bool> function, Callback<Callback<Texture>, bool> callback, Callback<Vector3> hover, Callback<Rect, bool> draw, Callback<Callback<string>> tooltip, string moduleName)
        {
            TaskBarDelegate temp = new TaskBarDelegate(function, callback, hover, draw, tooltip, moduleName);

            if (HookModule(temp, moduleName))
            {
                return true;
            }
            else
            {
                return false;
            }
        }
Esempio n. 2
0
        public bool HookModule(TaskBarDelegate hook, string moduleName)
        {
            if (m_Delegates == null)
                m_Delegates = new Dictionary<string, TaskBarDelegate>();

            foreach (KeyValuePair<string, TaskBarDelegate> kvp in m_Delegates)
            {
                if (kvp.Key.Equals(moduleName))
                {
                    //Debug.Log(String.Format("HOOKMODULE FALSE moduleName already in Dictionary: {0}", moduleName));
                    return false;
                }
            }

            showGUI = true;
            m_Delegates.Add(moduleName, hook);
            //Debug.Log("HOOKMODULE TRUE");
            return true;
        }