So i have a design problem. I have a mouse class that has delegets and events. ie MouseButtonPressed, MouseMoved. and such that are getting called by a state engine.
What i want to have happen is to create an interface like IClickable or IDraggable or somthing and have events inside those interfaces that get called when the mouse event gets called.
then in the MouseDevice class it has
and
So basically I want to have Clicked be called when buttonClicked gets called.
Is there a way to do this?
What i want to have happen is to create an interface like IClickable or IDraggable or somthing and have events inside those interfaces that get called when the mouse event gets called.
Code:
public interface IClickable
public event MouseDevice.ButtonClickedHandler<MouseButtons, MouseState> Clicked;
then in the MouseDevice class it has
Code:
public delegate void ButtonClickedHandler<O, S>(object sender, InputDeviceEventArgs<O, S> e);
and
Code:
public event ButtonClickedHandler<MouseButtons, MouseState> ButtonClicked;
So basically I want to have Clicked be called when buttonClicked gets called.
Is there a way to do this?