> ## Documentation Index
> Fetch the complete documentation index at: https://devdocs.xbox.com/llms.txt
> Use this file to discover all available pages before exploring further.

# GameInputFlightStickButtons

> GameInputFlightStickButtons

# GameInputFlightStickButtons

フライト スティックのボタンを列挙します。

<a id="syntaxSection" />

## 構文

```cpp theme={null}
enum GameInputFlightStickButtons
{
    GameInputFlightStickNone           = 0x00000000,
    GameInputFlightStickMenu           = 0x00000001,
    GameInputFlightStickView           = 0x00000002,
    GameInputFlightStickFirePrimary    = 0x00000004,
    GameInputFlightStickFireSecondary  = 0x00000008,
    GameInputFlightStickHatSwitchUp    = 0x00000010,
    GameInputFlightStickHatSwitchDown  = 0x00000020,
    GameInputFlightStickHatSwitchLeft  = 0x00000040,
    GameInputFlightStickHatSwitchRight = 0x00000080,
    GameInputFlightStickA              = 0x00000100,
    GameInputFlightStickB              = 0x00000200,
    GameInputFlightStickX              = 0x00000400,
    GameInputFlightStickY              = 0x00000800,
};
```

<a id="constantsSection" />

## 定数

| 定数                                 | 説明                            |
| ---------------------------------- | ----------------------------- |
| GameInputFlightStickNone           | ボタンが押されていないことを示します。           |
| GameInputFlightStickMenu           | メニュー ボタンが押されていることを示します。       |
| GameInputFlightStickView           | ビュー ボタンが押されていることを示します。        |
| GameInputFlightStickFirePrimary    | プライマリ ファイア ボタンが押されていることを示します。 |
| GameInputFlightStickFireSecondary  | セカンダリ ファイア ボタンが押されていることを示します。 |
| GameInputFlightStickHatSwitchUp    | ハット スイッチの上部分が押されていることを示します。   |
| GameInputFlightStickHatSwitchDown  | ハット スイッチの下部分が押されていることを示します。   |
| GameInputFlightStickHatSwitchLeft  | ハット スイッチの左部分が押されていることを示します。   |
| GameInputFlightStickHatSwitchRight | ハット スイッチの右部分が押されていることを示します。   |
| GameInputFlightStickA              | ゲームパッドの A ボタンが押されていることを示します。  |
| GameInputFlightStickB              | ゲームパッドの B ボタンが押されていることを示します。  |
| GameInputFlightStickX              | ゲームパッドの X ボタンが押されていることを示します。  |
| GameInputFlightStickY              | ゲームパッドの Y ボタンが押されていることを示します。  |

<a id="remarksSection" />

## 解説

この列挙型は [GameInputFlightStickState](/reference/input/gameinput/structs/gameinputflightstickstate) 構造体で使用されます。値を組み合わせることで、複数のボタンを同時に読み取ることができます。

`GameInputFlightStickHatSwitchUp`、`GameInputFlightStickHatSwitchDown`、`GameInputFlightStickHatSwitchLeft`、および `GameInputFlightStickHatSwitchRight` は、ハット スイッチをボタン値に変換したものです。ゲームパッドの D-pad と同様に、斜め方向は 2 つのボタンが同時に押された状態として表現されます。ハット スイッチの中央は、これらのボタンが何も押されていない状態として表現されます。これらのボタンは、[IGameInputMapper::GetFlightStickButtonMappingInfo](/reference/input/gameinput/interfaces/igameinputmapper/methods/igameinputmapper_getflightstickbuttonmappinginfo) メソッドを使用してハット スイッチのマッピング情報を照会する唯一の方法でもあります。

`GameInputFlightStickA`、`GameInputFlightStickB`、`GameInputFlightStickX`、および `GameInputFlightStickY` は、フライト スティックのマッピングの一部ではありません。これらは代わりに、ゲームパッドのボタン レポートからコピーされた値です。デバイスにゲームパッドがマッピングされていない場合、これらの値は常に 0 になります。

詳細については、[GameInput readings](/build/core-features/common/input/overviews/input-readings) の [読み取り値からのデータの取得](/build/core-features/common/input/overviews/input-readings#gettingStateSection) セクションを参照してください。

この列挙型は、特定のフライト スティック ボタンのマッピング情報を取得するために、[IGameInputMapper::GetFlightStickButtonMappingInfo](/reference/input/gameinput/interfaces/igameinputmapper/methods/igameinputmapper_getflightstickbuttonmappinginfo) メソッドと共に使用することもできます。

<a id="requirementsSection" />

## 要件

**ヘッダー:** GameInput.h

**サポートされているプラットフォーム:** Windows、XBOX One ファミリ本体、および XBOX Series 本体

<a id="seealsoSection" />

## 関連項目

[GameInput の概要](/build/core-features/common/input/overviews/input-overview)\
[GameInput](/reference/input/gameinput/gameinput_members)

## バージョン履歴

| バージョン  | 変更内容                                                                                                            |
| ------ | --------------------------------------------------------------------------------------------------------------- |
| **v3** | **8 つの定数を追加**: ゲームパッド風のボタンに対応する `HatSwitchUp`、`HatSwitchDown`、`HatSwitchLeft`、`HatSwitchRight`、`A`、`B`、`X`、`Y`。 |
| **v0** | 導入されました。                                                                                                        |

## 付録: 以前のバージョン

### v0

```cpp theme={null}
enum GameInputFlightStickButtons
{
    GameInputFlightStickNone          = 0x00000000,
    GameInputFlightStickMenu          = 0x00000001,
    GameInputFlightStickView          = 0x00000002,
    GameInputFlightStickFirePrimary   = 0x00000004,
    GameInputFlightStickFireSecondary = 0x00000008,
};
```


## Related topics

- [GameInput](/ja-jp/reference/input/gameinput/gameinput_members.md)
- [IGameInputReading::GetFlightStickState](/ja-jp/reference/input/gameinput/interfaces/igameinputreading/methods/igameinputreading_getflightstickstate.md)
- [GameInputArcadeStickButtons](/ja-jp/reference/input/gameinput/enums/gameinputarcadestickbuttons.md)
- [GameInputLabel](/ja-jp/reference/input/gameinput/enums/gameinputlabel.md)
- [GameInputKind](/ja-jp/reference/input/gameinput/enums/gameinputkind.md)
