public override void Update(OldNewInput input) { base.Update(input); if (enabled && input.MouseRec.Intersects(outsideRec) && input.SingleLeftClick()) { pressed = true; if (onClickEvent != null) { onClickEvent(); } } }
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(); } } }
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(); } }