8#ifndef DESIGNLAB_MOUSE_H_
9#define DESIGNLAB_MOUSE_H_
89 constexpr static int kMouseKeyNum{ 8 };
92 const std::array<int, kMouseKeyNum> kMouseKeyCodes;
95 int cursor_pos_x_, cursor_pos_y_;
98 int cursor_past_pos_x_, cursor_past_pos_y_;
102 std::map<int, int> pushing_counter_;
105 std::map<int, int> releasing_counter_;
int GetDiffPosX() const
マウスカーソルの移動量を取得する. X座標は画面の左端を0として,右向きが正. これは Dxlib の仕様なので変更不能.
int GetPressingCount(int mouse_code) const
ボタンが押されているフレーム数を取得する.
int GetReleasingCount(int mouse_code) const
ボタンが離されているフレーム数を取得する.
constexpr int GetWheelRot() const noexcept
マウスのホイールの回転量を取得する. 1フレームで回転した量を取得する. 手前に回した分はマイナスの値として、 奥に回した分はプラスの値として返る
void Update()
マウス入力を更新する.これを毎フレーム実行しないと, マウス入力を取得できない.
constexpr int GetCursorPosX() const noexcept
マウスカーソルの位置を取得する. X座標は画面の左端を0として,右向きが正. これは Dxlib の仕様なので変更不能.
int GetDiffPosY() const
マウスカーソルの移動量を取得する. Y座標は画面の上端を0として,下向きが正. これは Dxlib の仕様なので変更不能.
constexpr int GetCursorPosY() const noexcept
マウスカーソルの位置を取得する. Y座標は画面の上端を0として,下向きが正. これは Dxlib の仕様なので変更不能.
double GetDiffPos() const
マウスカーソルの移動量を取得する.