12#if defined(_WINDOWS) || GX_DEVELOP
14GX_CORE_NAMESPACE_BEGIN()
33 BUTTON_LEFT = (1 << 0),
34 BUTTON_RIGHT = (1 << 1),
35 BUTTON_MIDDLE = (1 << 2),
41 BUTTON_ALL = 0xFFFFFFFF,
53 s32 _repeatCount[BUTTON_MAX];
54 s32 _doubleClickCounter[BUTTON_MAX];
69 static constexpr u32 DOUBLE_CLICK_INTERVAL = 15;
71 static constexpr u32 DOUBLE_CLICK_MARGIN = 5;
82 ~GxMouse(
void)
override;
84 void clear(
void)
override;
86 b32 initialize(
void)
override;
95 void getInputDataDevice(
void)
override;
97 void update(
void)
override;
100 GX_FORCE_INLINE
void developRender(
void)
override {}
103 void saveInput(void) override;
105 void loadInput(
void)
override;
114 GX_FORCE_INLINE
b32 isOn(BUTTON button = BUTTON_ALL)
const {
return (_on & button) ? true :
false; }
116 GX_FORCE_INLINE
b32 isOld(BUTTON button = BUTTON_ALL)
const {
return (_old & button) ? true :
false; }
118 GX_FORCE_INLINE
b32 isTrigger(BUTTON button = BUTTON_ALL)
const {
return (_trigger & button) ? true :
false; }
120 GX_FORCE_INLINE
b32 isRelease(BUTTON button = BUTTON_ALL)
const {
return (_release & button) ? true :
false; }
122 GX_FORCE_INLINE
b32 isRepeat(BUTTON button = BUTTON_ALL)
const {
return (_repeat & button) ? true :
false; }
124 GX_FORCE_INLINE
b32 isDoubleClick(BUTTON button = BUTTON_ALL)
const {
return (_doubleClick & button) ? true :
false; }
126 b32 isEnable(
void)
const override;
129 GX_FORCE_INLINE
b32 isOk(
void)
override {
return false; }
131 GX_FORCE_INLINE
b32 isCancel(
void)
override {
return false; }
134 GX_FORCE_INLINE
const GxPoint2& getPosition(
void)
const {
return _position; }
136 GxVector2 getVirtualPosition(
void)
const;
138 GX_FORCE_INLINE
b32 isMove(
void)
const {
return _position != _positionOld; }
140 GX_FORCE_INLINE
const GxVector3& getOffset(
void)
const {
return _offset; }
143 constexpr u32 getOn(
void)
const {
return _on; }
145 constexpr u32 getTrigger(
void)
const {
return _trigger; }
147 constexpr u32 getRelease(
void)
const {
return _release; }
149 constexpr u32 getDoubleClick(
void)
const {
return _doubleClick; }
154 constexpr IDirectInputDevice8* getDirectInputDevice(
void){
return _pDirectInputDevice; }
156 GX_FORCE_INLINE
const DIMOUSESTATE2& getDirectInputState(
void)
const {
return _directInputState; }
158 LRESULT CALLBACK wndProc(HWND windowHandle, UINT uMessage, WPARAM wParam, LPARAM lParam);
161 b32 createDirectInputDevice(
void);
163 void releaseDirectInputDevice(
void);
173 IDirectInputDevice8* _pDirectInputDevice;
174 DIMOUSESTATE2 _directInputState;
176#if defined(_WINDOWS) || defined(_XBOX_XS)
179 s32 _repeatCount[BUTTON_MAX];
180 s32 _doubleClickCounter[BUTTON_MAX];
198GX_CORE_NAMESPACE_END()
#define GX_PROHIBIT_CLASS_BASE(__CLASS__)
GxClassBase継承の禁止宣言
Definition GxBase.h:240
セーブデータクラス
Definition GxSaveData.h:18
座標
Definition GxStruct.h:867
2次元ベクトル
Definition GxVector.h:34
3次元ベクトル
Definition GxVector.h:245
32bitブーリアン
Definition GxDefine.h:173