31 lines
747 B
C++
31 lines
747 B
C++
#pragma once
|
|
|
|
#include "common.h"
|
|
|
|
namespace GUIMouse
|
|
{
|
|
enum class ButtonState { Released, Down, Pressed, Up };
|
|
enum Button : char { Left = 0, Right = 1, Middle = 2 };
|
|
|
|
struct Gesture
|
|
{
|
|
float theta {0};
|
|
float dist {0};
|
|
int numFingers {0};
|
|
};
|
|
|
|
extern Vector2 position;
|
|
extern Vector2 delta;
|
|
extern Vector2 slowDelta;
|
|
extern Vector2 wheel;
|
|
extern ButtonState buttons[3];
|
|
extern Gesture gesture;
|
|
|
|
void ReceiveMouseUpEvent(const Button button);
|
|
void ReceiveMouseDownEvent(const Button button);
|
|
void ReceiveMouseMoveEvent(const float x, const float y);
|
|
void ReceiveMouseWheelEvent(const float x, const float y);
|
|
void ReceiveMultigestureEvent(const float theta, const float dist, const int numFingers);
|
|
void Reset();
|
|
}
|