Exemple #1
0
        /**
         * <summary>Adds a UISlotClick component to the Button, which acts as a click-handler.</summary>
         * <param name = "_menu">The Menu that the Button is linked to</param>
         * <param name = "_element">The MenuElement within _menu that the Button is linked to</param>
         * <param name = "_slot">The index number of the slot within _element that the Button is linked to</param>
         */
        public void AddClickHandler(AC.Menu _menu, MenuElement _element, int _slot)
        {
            UISlotClick uiSlotClick = uiButton.gameObject.AddComponent <UISlotClick>();

            uiSlotClick.Setup(_menu, _element, _slot);
        }