2014-01-31 15:38:12 +01:00
|
|
|
#ifndef MISC_IEVENT_BUTTON
|
|
|
|
#define MISC_IEVENT_BUTTON
|
2014-01-31 15:06:25 +01:00
|
|
|
#include "../../Input/L_inputClass.h"
|
|
|
|
|
|
|
|
namespace Oyster
|
|
|
|
{
|
|
|
|
namespace Event
|
|
|
|
{
|
|
|
|
class IEventButton
|
|
|
|
{
|
2014-01-31 15:38:12 +01:00
|
|
|
|
|
|
|
public:
|
2014-01-31 15:06:25 +01:00
|
|
|
|
|
|
|
enum ButtonState
|
|
|
|
{
|
|
|
|
Button_Clicked,
|
|
|
|
Button_Hover,
|
|
|
|
Button_Hold,
|
|
|
|
Button_Smashed,
|
|
|
|
};
|
|
|
|
|
2014-01-31 15:38:12 +01:00
|
|
|
virtual void CheckCollision(InputClass *input) = 0;
|
2014-01-31 15:06:25 +01:00
|
|
|
|
2014-02-03 10:41:54 +01:00
|
|
|
virtual void SendEvent(IEventButton::ButtonState state) = 0;
|
|
|
|
|
2014-01-31 15:38:12 +01:00
|
|
|
struct ButtonEvent;
|
2014-01-31 15:06:25 +01:00
|
|
|
virtual void SetEventFunc(void (*EventFunc)( ButtonEvent e )) = 0;
|
|
|
|
|
|
|
|
virtual unsigned int GetID() = 0;
|
|
|
|
|
|
|
|
};
|
|
|
|
}
|
2014-01-31 15:38:12 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
#endif
|