示例#1
0
        public void ClearButtonEventHandler(
            string instanceName, ButtonEventHandlers.Type type)
        {
            int instId = SearchInstanceId(GetStringId(instanceName));

            if (instId >= 0)
            {
                ClearButtonEventHandler(instId, type);
                return;
            }

            if (m_buttonEventHandlersByFullName == null)
            {
                return;
            }

            ButtonEventHandlers handlers =
                m_buttonEventHandlersByFullName[instanceName];

            if (handlers == null)
            {
                return;
            }

            handlers.Clear(type);
        }
示例#2
0
 public void SetHandlers(ButtonEventHandlers handler)
 {
     if (m_handler == null)
     {
         m_handler = new ButtonEventHandlers();
     }
     else
     {
         m_handler.Clear();
     }
     m_handler.Add(handler);
 }
示例#3
0
        public void ClearButtonEventHandler(int instId)
        {
            if (instId < 0 || instId >= m_instances.Length)
            {
                return;
            }

            ButtonEventHandlers handlers = m_buttonEventHandlers[instId];

            if (handlers == null)
            {
                return;
            }

            handlers.Clear();
        }
示例#4
0
        public void ClearButtonEventHandler(int instId)
        {
            if (instId < 0 || instId >= m_instances.Length)
            {
                return;
            }

            ButtonEventHandlers handlers = m_buttonEventHandlers[instId];

            if (handlers == null)
            {
                return;
            }

            handlers.Clear();

            Button button = SearchButtonInstanceByInstanceId(instId);

            if (button != null)
            {
                button.SetHandlers(handlers);
            }
        }