- First commit to gitea
This commit is contained in:
30
GUIMouse.h
Normal file
30
GUIMouse.h
Normal file
@@ -0,0 +1,30 @@
|
||||
#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();
|
||||
}
|
||||
Reference in New Issue
Block a user