Exemple #1
0
        public override void Update(OldNewInput input)
        {
            base.Update(input);

            if (enabled && input.MouseRec.Intersects(outsideRec) && input.SingleLeftClick())
            {
                pressed = true;

                if (onClickEvent != null)
                {
                    onClickEvent();
                }
            }
        }
Exemple #2
0
        public override void Update(OldNewInput input)
        {
            base.Update(input);

            if (enabled && input.MouseRec.Intersects(outsideRec) && input.SingleLeftClick())
            {
                isTrue = isTrue ? false : true; // Toggle

                if (checkedChangeEvent != null)
                {
                    checkedChangeEvent();
                }
            }
        }
Exemple #3
0
        virtual public void Update(OldNewInput input)
        {
            if (enabled && (input.MouseRec.Intersects(outsideRec) || active))
            {
                outSideColor = Color.DarkGray;
            }
            else
            {
                outSideColor = orgOutSideColor;
            }

            if (enabled && input.MouseRec.Intersects(outsideRec) && input.SingleLeftClick() && soundEffect)
            {
                clickSound.Play();
            }
        }