2014-02-11 09:16:01 +01:00
|
|
|
//////////////////////////////////////
|
|
|
|
// Created by Pontus Fransson 2014 //
|
|
|
|
//////////////////////////////////////
|
|
|
|
|
2014-01-31 15:38:12 +01:00
|
|
|
#ifndef MISC_IEVENT_BUTTON
|
|
|
|
#define MISC_IEVENT_BUTTON
|
2014-02-11 09:16:01 +01:00
|
|
|
|
|
|
|
class InputClass;
|
2014-01-31 15:06:25 +01:00
|
|
|
|
|
|
|
namespace Oyster
|
|
|
|
{
|
|
|
|
namespace Event
|
|
|
|
{
|
2014-02-11 09:16:01 +01:00
|
|
|
enum ButtonState
|
|
|
|
{
|
|
|
|
ButtonState_None,
|
|
|
|
ButtonState_Hover,
|
|
|
|
ButtonState_Pressed,
|
|
|
|
ButtonState_Down,
|
|
|
|
ButtonState_Released,
|
|
|
|
};
|
|
|
|
|
2014-01-31 15:06:25 +01:00
|
|
|
class IEventButton
|
|
|
|
{
|
2014-01-31 15:38:12 +01:00
|
|
|
public:
|
2014-02-11 09:16:01 +01:00
|
|
|
virtual ~IEventButton(){}
|
2014-01-31 15:06:25 +01:00
|
|
|
|
2014-02-11 09:16:01 +01:00
|
|
|
virtual void Update(InputClass *input){}
|
2014-01-31 15:06:25 +01:00
|
|
|
|
2014-02-11 09:16:01 +01:00
|
|
|
virtual void SendEvent(ButtonState state){}
|
2014-02-03 10:41:54 +01:00
|
|
|
|
2014-01-31 15:38:12 +01:00
|
|
|
struct ButtonEvent;
|
2014-02-11 09:16:01 +01:00
|
|
|
virtual void SetEventFunc(void (*EventFunc)( ButtonEvent e )){}
|
2014-01-31 15:06:25 +01:00
|
|
|
|
2014-02-11 09:16:01 +01:00
|
|
|
virtual unsigned int GetID(){ return -1; }
|
2014-01-31 15:06:25 +01:00
|
|
|
|
|
|
|
};
|
|
|
|
}
|
2014-01-31 15:38:12 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
#endif
|