HandleControllerChanged() public method

public HandleControllerChanged ( FairyGUI.Controller c ) : void
c FairyGUI.Controller
return void
Example #1
0
        internal void ApplyController(Controller c)
        {
            int cnt = _children.Count;

            for (int i = 0; i < cnt; ++i)
            {
                GObject child = _children[i];
                child.HandleControllerChanged(c);
            }
        }
Example #2
0
        internal void ApplyController(Controller c)
        {
            _applyingController = c;
            int cnt = _children.Count;

            for (int i = 0; i < cnt; ++i)
            {
                GObject child = _children[i];
                child.HandleControllerChanged(c);
            }
            _applyingController = null;

            c.RunActions();
        }
Example #3
0
        /// <summary>
        /// Removes a controller from the container.
        /// </summary>
        /// <param name="c">Controller object.</param>
        public void RemoveController(Controller c)
        {
            int index = _controllers.IndexOf(c);

            if (index == -1)
            {
                throw new Exception("controller not exists: " + c.name);
            }

            c.parent = null;
            _controllers.RemoveAt(index);

            int cnt = _children.Count;

            for (int i = 0; i < cnt; ++i)
            {
                GObject child = _children[i];
                child.HandleControllerChanged(c);
            }
        }