Share via


RawGameController.GetButtonLabel(Int32) メソッド

定義

指定したボタンのボタン ラベルを取得します。

public:
 virtual GameControllerButtonLabel GetButtonLabel(int buttonIndex) = GetButtonLabel;
GameControllerButtonLabel GetButtonLabel(int const& buttonIndex);
public GameControllerButtonLabel GetButtonLabel(int buttonIndex);
function getButtonLabel(buttonIndex)
Public Function GetButtonLabel (buttonIndex As Integer) As GameControllerButtonLabel

パラメーター

buttonIndex
Int32

int

ラベルを取得するボタン。

戻り値

指定したボタンのラベル。 ボタン ラベルが空白の場合、またはコントローラーのボタンに既知のラベルがない場合は、 None が返されます。

注釈

ArcadeStick.GetButtonLabel などの他のクラスの GetButtonLabel メンバー関数とは異なり、この関数は ArcadeStickButtons やその他の列挙値ではなく整数を受け取ります。 この整数は、生のゲーム コントローラーの buttons 配列のインデックスです。

独自のボタン配列を作成し、 RawGameController.GetCurrentReading を使用して各ボタンの状態を表す値を設定できます。 詳細については、 生のゲーム コントローラー に関するページを参照してください。

適用対象

こちらもご覧ください