MGL(Win32)
読み取り中…
検索中…
一致する文字列を見つけられません
mgl_gamepad_settings.h
[詳解]
1// SPDX-License-Identifier: Zlib
2/* ------------------------------------------------------------------------- */
9/* ------------------------------------------------------------------------- */
10
11#ifndef INCGUARD_MGL_GAMEPAD_SETTINGS_H_1644254356
12#define INCGUARD_MGL_GAMEPAD_SETTINGS_H_1644254356
13
15#include <mgl/mgl_environment.h>
16
17namespace MGL::Input
18{
21{
22public:
23 /* ------------------------------------------------------------------------- */
27 /* ------------------------------------------------------------------------- */
28 GamepadSettings() noexcept
29 : _server(GamepadServer::GetInstance())
30 {
31 }
32
33 /* ------------------------------------------------------------------------- */
38 /* ------------------------------------------------------------------------- */
39 constexpr void SetRepeatSetting(const RepeatSetting &repeatSetting) noexcept
40 {
41 _server.SetRepeatSetting(repeatSetting);
42 }
43
44 /* ------------------------------------------------------------------------- */
49 /* ------------------------------------------------------------------------- */
50 [[nodiscard]] constexpr const RepeatSetting &GetRepeatSetting() const noexcept
51 {
52 return _server.GetRepeatSetting();
53 }
54
55 /* ------------------------------------------------------------------------- */
62 /* ------------------------------------------------------------------------- */
63 void SetDecideCancelButton(PadType type, PadButton decideButton, PadButton cancelButton) noexcept
64 {
65 _server.SetDecideCancelButton(type, decideButton, cancelButton);
66 }
67
68 /* ------------------------------------------------------------------------- */
74 /* ------------------------------------------------------------------------- */
75 [[nodiscard]] PadButton GetDecideButton(PadType type) const noexcept
76 {
77 return _server.GetDecideButton(type);
78 }
79
80 /* ------------------------------------------------------------------------- */
86 /* ------------------------------------------------------------------------- */
87 [[nodiscard]] PadButton GetCancelButton(PadType type) const noexcept
88 {
89 return _server.GetCancelButton(type);
90 }
91
92private:
93 GamepadServer &_server;
94};
95} // namespace MGL::Input
96
97#endif // INCGUARD_MGL_GAMEPAD_SETTINGS_H_1644254356
98
99// vim: et ts=4 sw=4 sts=4
ゲームパッドサーバ
Definition mgl_gamepad_server.h:37
constexpr void SetRepeatSetting(const RepeatSetting &repeatSetting) noexcept
リピート入力の設定
Definition mgl_gamepad_server.h:61
PadButton GetDecideButton(PadType type, PadButton defaultButton=PadButton::None) const noexcept
決定ボタンの割り当てを取得
Definition mgl_gamepad_server.cc:451
void SetDecideCancelButton(PadType type, PadButton decideButton, PadButton cancelButton) noexcept
決定ボタンとキャンセルボタンの割り当て
Definition mgl_gamepad_server.cc:421
PadButton GetCancelButton(PadType type, PadButton defaultButton=PadButton::None) const noexcept
キャンセルボタンの割り当てを取得
Definition mgl_gamepad_server.cc:476
constexpr const RepeatSetting & GetRepeatSetting() const noexcept
リピート入力の設定状態を取得
Definition mgl_gamepad_server.h:72
ゲームパッド設定クラス
Definition mgl_gamepad_settings.h:21
GamepadSettings() noexcept
コンストラクタ
Definition mgl_gamepad_settings.h:28
PadButton GetCancelButton(PadType type) const noexcept
キャンセルボタンの割り当てを取得
Definition mgl_gamepad_settings.h:87
PadButton GetDecideButton(PadType type) const noexcept
決定ボタンの割り当てを取得
Definition mgl_gamepad_settings.h:75
constexpr const RepeatSetting & GetRepeatSetting() const noexcept
リピート入力の設定状態を取得
Definition mgl_gamepad_settings.h:50
void SetDecideCancelButton(PadType type, PadButton decideButton, PadButton cancelButton) noexcept
決定ボタンとキャンセルボタンの割り当て
Definition mgl_gamepad_settings.h:63
constexpr void SetRepeatSetting(const RepeatSetting &repeatSetting) noexcept
リピート入力の設定
Definition mgl_gamepad_settings.h:39
MGL 環境定義
PadType
ゲームパッドの種類
Definition mgl_gamepad_defs.h:148
PadButton
ゲームパッドのボタンの定義
Definition mgl_gamepad_defs.h:33
MGL ゲームパッドサーバ
リピート設定
Definition mgl_input_repeat.h:25