예제 #1
0
        public static void OnRightClick(this Button button, OnClickDelegate callback)
        {
            TooltipTrigger trig = button.gameObject.GetComponent <TooltipTrigger>();

            if (trig == null)
            {
                trig = button.gameObject.AddComponent <TooltipTrigger>();
            }
            trig.AddRightClick(callback);
        }
예제 #2
0
        public static void RemoveAllEvents(this Button button)
        {
            TooltipTrigger trig = button.gameObject.GetComponent <TooltipTrigger>();

            if (trig == null)
            {
                return;
            }
            trig.removeAllEvents();
        }
예제 #3
0
        public static void AddHover(this Button button, OnHoverDelegate callback, bool redrawOnUpdate)
        {
            TooltipTrigger trig = button.gameObject.GetComponent <TooltipTrigger>();

            if (trig == null)
            {
                trig = button.gameObject.AddComponent <TooltipTrigger>();
            }
            trig.AddHover(callback, redrawOnUpdate);
        }
예제 #4
0
        public static void AddHover(this Toggle button, OnHoverDelegate callback, bool redrawOnUpdate)
        {
            TooltipTrigger trig = button.gameObject.GetComponent <TooltipTrigger>();

            if (trig == null)
            {
                trig = button.gameObject.AddComponent <TooltipTrigger>();
            }
            trig.AddHover(callback, redrawOnUpdate);
            //EventTrigger trig = button.gameObject.GetComponent<EventTrigger>();
            //trig.OnPointerEnter.
        }