56 lines
1.4 KiB
C++
56 lines
1.4 KiB
C++
#pragma once
|
|
|
|
#include "ehs/Types.h"
|
|
#include "ehs/Vec2.h"
|
|
#include "Button.h"
|
|
#include "HID.h"
|
|
|
|
#define EHS_HID_MOUSE 0x01
|
|
|
|
namespace ehs
|
|
{
|
|
class EHS_LIB_IO Mouse : public HID
|
|
{
|
|
private:
|
|
friend class Input;
|
|
|
|
Vec2_s32 delta;
|
|
|
|
public:
|
|
Mouse();
|
|
|
|
Mouse(Str_8 name, 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(float delta) override;
|
|
|
|
void SetDelta(const Vec2_s32& newDelta);
|
|
|
|
Vec2_s32 GetDelta() const;
|
|
|
|
Mouse* Clone() const override;
|
|
|
|
static inline const Button Unknown = Button("Unknown Button");
|
|
static inline const Button LMB = Button("Left Mouse Button");
|
|
static inline const Button MMB = Button("Middle Mouse Button");
|
|
static inline const Button RMB = Button("Right Mouse Button");
|
|
static inline const Button Four = Button("Four Button");
|
|
static inline const Button Five = Button("Five Button");
|
|
static inline const Button ScrollUp = Button("Scroll Up Button");
|
|
static inline const Button ScrollDown = Button("Scroll Down Button");
|
|
static inline const Button ScrollLeft = Button("Scroll Left Button");
|
|
static inline const Button ScrollRight = Button("Scroll Right Button");
|
|
static inline const Button Back = Button("Back Button");
|
|
static inline const Button Forward = Button("Forward Button");
|
|
|
|
static Button TranslateXCB(const UInt_32 code);
|
|
};
|
|
}
|