EHS/include/ehs/io/hid/Mouse.h

56 lines
1.0 KiB
C
Raw Permalink Normal View History

2024-02-05 22:25:30 -08:00
#pragma once
#include "ehs/Types.h"
#include "ehs/Vec2.h"
#include "Button.h"
#include "HID.h"
#define EHS_HID_MOUSE 0x01
namespace ehs
{
2024-07-24 01:36:20 -07:00
class EHS_LIB_IO Mouse : public HID
2024-02-05 22:25:30 -08:00
{
private:
friend class Input;
Vec2_s32 delta;
public:
Mouse();
Mouse(Str_8 name, UInt_64 id);
2024-02-05 22:25:30 -08:00
Mouse(Mouse&& hid) noexcept = default;
Mouse(const Mouse& hid);
Mouse& operator=(Mouse&& hid) noexcept = default;
Mouse& operator=(const Mouse& hid);
void Poll(float delta) override;
2024-02-05 22:25:30 -08:00
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);
};
}