Attention: Here be dragons

This is the latest (unstable) version of this documentation, which may document features not available in or compatible with released stable versions of Godot.

InputEventJoypadButton

繼承: InputEvent < Resource < RefCounted < Object

代表按下或鬆開的遊戲手柄按鈕。

說明

遊戲手柄按鈕的輸入事件型別。對於遊戲手柄模擬搖桿和操縱桿,請參閱 InputEventJoypadMotion

教學

屬性

JoyButton

button_index

0

bool

pressed

false

float

pressure

0.0


屬性說明

JoyButton button_index = 0 🔗

按鈕識別字。JoyButton 按鈕常數之一。


bool pressed = false 🔗

  • void set_pressed(value: bool)

  • bool is_pressed()

如果為 true,按鈕的狀態被按下。如果為 false,按鈕的狀態被釋放。


float pressure = 0.0 🔗

  • void set_pressure(value: float)

  • float get_pressure()

已棄用: This property is never set by the engine and is always 0.