MGL(Win32)
読み取り中…
検索中…
一致する文字列を見つけられません
include
mgl
input
gamepad
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
14
#include <
mgl/input/gamepad/mgl_gamepad_server.h
>
15
#include <
mgl/mgl_environment.h
>
16
17
namespace
MGL::Input
18
{
20
class
GamepadSettings
21
{
22
public
:
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
92
private
:
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
MGL::Input::GamepadServer
ゲームパッドサーバ
Definition
mgl_gamepad_server.h:37
MGL::Input::GamepadServer::SetRepeatSetting
constexpr void SetRepeatSetting(const RepeatSetting &repeatSetting) noexcept
リピート入力の設定
Definition
mgl_gamepad_server.h:61
MGL::Input::GamepadServer::GetDecideButton
PadButton GetDecideButton(PadType type, PadButton defaultButton=PadButton::None) const noexcept
決定ボタンの割り当てを取得
Definition
mgl_gamepad_server.cc:451
MGL::Input::GamepadServer::SetDecideCancelButton
void SetDecideCancelButton(PadType type, PadButton decideButton, PadButton cancelButton) noexcept
決定ボタンとキャンセルボタンの割り当て
Definition
mgl_gamepad_server.cc:421
MGL::Input::GamepadServer::GetCancelButton
PadButton GetCancelButton(PadType type, PadButton defaultButton=PadButton::None) const noexcept
キャンセルボタンの割り当てを取得
Definition
mgl_gamepad_server.cc:476
MGL::Input::GamepadServer::GetRepeatSetting
constexpr const RepeatSetting & GetRepeatSetting() const noexcept
リピート入力の設定状態を取得
Definition
mgl_gamepad_server.h:72
MGL::Input::GamepadSettings
ゲームパッド設定クラス
Definition
mgl_gamepad_settings.h:21
MGL::Input::GamepadSettings::GamepadSettings
GamepadSettings() noexcept
コンストラクタ
Definition
mgl_gamepad_settings.h:28
MGL::Input::GamepadSettings::GetCancelButton
PadButton GetCancelButton(PadType type) const noexcept
キャンセルボタンの割り当てを取得
Definition
mgl_gamepad_settings.h:87
MGL::Input::GamepadSettings::GetDecideButton
PadButton GetDecideButton(PadType type) const noexcept
決定ボタンの割り当てを取得
Definition
mgl_gamepad_settings.h:75
MGL::Input::GamepadSettings::GetRepeatSetting
constexpr const RepeatSetting & GetRepeatSetting() const noexcept
リピート入力の設定状態を取得
Definition
mgl_gamepad_settings.h:50
MGL::Input::GamepadSettings::SetDecideCancelButton
void SetDecideCancelButton(PadType type, PadButton decideButton, PadButton cancelButton) noexcept
決定ボタンとキャンセルボタンの割り当て
Definition
mgl_gamepad_settings.h:63
MGL::Input::GamepadSettings::SetRepeatSetting
constexpr void SetRepeatSetting(const RepeatSetting &repeatSetting) noexcept
リピート入力の設定
Definition
mgl_gamepad_settings.h:39
mgl_environment.h
MGL 環境定義
MGL::Input::PadType
PadType
ゲームパッドの種類
Definition
mgl_gamepad_defs.h:148
MGL::Input::PadButton
PadButton
ゲームパッドのボタンの定義
Definition
mgl_gamepad_defs.h:33
mgl_gamepad_server.h
MGL ゲームパッドサーバ
MGL::Input::RepeatSetting
リピート設定
Definition
mgl_input_repeat.h:25
構築:
1.12.0