示例#1
0
        void Start()
        {
            var dropdownDispatcher = Type.GetType($"GUI.DropdownScripts.{name}Script");

            if (dropdownDispatcher == null)
            {
                Debug.Log($"Cannot find {name}Script");
                return;
            }

            mainDropdownDispatcher = (DropdownBase)Activator.CreateInstance(dropdownDispatcher, new object[] { UI });

            var allButtons = GetComponentsInChildren <Button>();

            foreach (var button in allButtons)
            {
                button.onClick.AddListener(delegate { ButtonClickedEvent(button.name); });
            }
        }
示例#2
0
        /// <summary>
        /// Sets the title of the tab panel with the specified value.
        /// </summary>
        /// <param name="dropdown">The value of the title.</param>
        /// <returns>Current component.</returns>
        public YimaTabPanel Title(DropdownBase dropdown)
        {
            Title(_htmlHelper.BootstrapTabPanelTitle().Title(dropdown));

            return(this);
        }