2023-12-17 03:29:08 -08:00
|
|
|
#pragma once
|
|
|
|
|
2023-12-17 15:00:08 -08:00
|
|
|
#include "Types.h"
|
|
|
|
#include "Vec2.h"
|
2023-12-17 03:29:08 -08:00
|
|
|
#include "Button.h"
|
|
|
|
#include "HID.h"
|
|
|
|
|
2023-12-17 15:56:13 -08:00
|
|
|
#define EHS_HID_MOUSE 0x01
|
2023-12-17 03:29:08 -08:00
|
|
|
|
2023-12-17 15:56:13 -08:00
|
|
|
namespace ehs
|
2023-12-17 03:29:08 -08:00
|
|
|
{
|
|
|
|
class Mouse : public HID
|
|
|
|
{
|
|
|
|
private:
|
|
|
|
friend class Input;
|
|
|
|
|
|
|
|
Vec2_s32 delta;
|
|
|
|
|
|
|
|
public:
|
|
|
|
Mouse();
|
|
|
|
|
|
|
|
Mouse(Str_8 name, const UInt_64 id);
|
|
|
|
|
|
|
|
Mouse(Mouse&& hid) noexcept = default;
|
|
|
|
|
|
|
|
Mouse(const Mouse& hid);
|
|
|
|
|
|
|
|
Mouse& operator=(Mouse&& hid) noexcept = default;
|
|
|
|
|
|
|
|
Mouse& operator=(const Mouse& hid);
|
|
|
|
|
|
|
|
void Poll() override;
|
|
|
|
|
|
|
|
void SetDelta(const Vec2_s32& newDelta);
|
|
|
|
|
|
|
|
Vec2_s32 GetDelta() const;
|
|
|
|
|
|
|
|
Mouse* Clone() const override;
|
|
|
|
|
|
|
|
static const Button Unknown;
|
|
|
|
static const Button LMB;
|
|
|
|
static const Button MMB;
|
|
|
|
static const Button RMB;
|
|
|
|
static const Button Four;
|
|
|
|
static const Button Five;
|
|
|
|
static const Button ScrollUp;
|
|
|
|
static const Button ScrollDown;
|
|
|
|
static const Button ScrollLeft;
|
|
|
|
static const Button ScrollRight;
|
|
|
|
static const Button Back;
|
|
|
|
static const Button Forward;
|
|
|
|
|
|
|
|
static Button TranslateXCB(const UInt_32 code);
|
|
|
|
};
|
|
|
|
}
|