Danbias/Code/Misc/EventHandler/IEventButton.h

49 lines
819 B
C
Raw Normal View History

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;
namespace Oyster
{
namespace Event
{
2014-02-11 09:16:01 +01:00
enum ButtonState
{
ButtonState_None,
ButtonState_Hover,
ButtonState_Pressed,
ButtonState_Down,
ButtonState_Released,
};
//Takes normalized device coordinates
struct MouseInput
{
//Normalized device coordinates
float x, y;
bool mouseButtonPressed;
};
2014-02-11 09:16:01 +01:00
class IEventButton
{
2014-01-31 15:38:12 +01:00
public:
2014-02-11 09:16:01 +01:00
virtual ~IEventButton(){}
virtual void RenderTexture() = 0;
virtual void RenderText() = 0;
virtual void Update(MouseInput& input) = 0;
virtual void SendEvent(ButtonState state) = 0;
virtual unsigned int GetID() = 0;
};
}
2014-01-31 15:38:12 +01:00
}
#endif