Example #1
0
        // Token: 0x060000AA RID: 170 RVA: 0x00005D28 File Offset: 0x00003F28
        private void RegisterEventButton(object objWin, string compName, UnityAction action)
        {
            UIBaseWindow uibaseWindow = (UIBaseWindow)objWin;
            Button       @ref         = uibaseWindow.GetRef <Button>(compName);
            bool         flag         = @ref != null;

            if (flag)
            {
                @ref.onClick.RemoveListener(action);
                @ref.onClick.AddListener(action);
            }
            else
            {
                Debug.Log(uibaseWindow.GetType() + " miss ref " + compName);
            }
        }
Example #2
0
        // Token: 0x060000A9 RID: 169 RVA: 0x00005CC4 File Offset: 0x00003EC4
        private void RegisterEventToggle(object objWin, string compName, UnityAction <bool> action)
        {
            UIBaseWindow uibaseWindow = (UIBaseWindow)objWin;
            Toggle       @ref         = uibaseWindow.GetRef <Toggle>(compName);
            bool         flag         = @ref != null;

            if (flag)
            {
                @ref.onValueChanged.RemoveListener(action);
                @ref.onValueChanged.AddListener(action);
            }
            else
            {
                Debug.Log(uibaseWindow.GetType() + " miss ref " + compName);
            }
        }