mirror of
https://github.com/Kiritow/MiniEngine.git
synced 2024-03-22 13:11:22 +08:00
33 lines
534 B
C
33 lines
534 B
C
|
#pragma once
|
||
|
#include "../config.h"
|
||
|
#include <functional>
|
||
|
|
||
|
//#include <SDL2/SDL_events.h>
|
||
|
namespace MiniEngine
|
||
|
{
|
||
|
|
||
|
class MouseEvent
|
||
|
{
|
||
|
private:
|
||
|
struct EventData
|
||
|
{
|
||
|
int x,y;
|
||
|
}
|
||
|
public:
|
||
|
int type;
|
||
|
EventData data;
|
||
|
};
|
||
|
class MouseEventListener
|
||
|
{
|
||
|
public:
|
||
|
MouseEventListener();
|
||
|
|
||
|
function<void(const MouseEvent&)> onButtonDown;
|
||
|
function<void(const MouseEvent&)> onButtonUp;
|
||
|
|
||
|
function<void(const MouseEvent&)> onMotion;
|
||
|
function<void(const MouseEvent&)> onWheel;
|
||
|
};
|
||
|
|
||
|
}/// End of namespace MiniEngine
|