InputEventMouseButton
繼承: InputEventMouse < InputEventWithModifiers < InputEventFromWindow < InputEvent < Resource < RefCounted < Object
代表某個滑鼠按鍵被按下或鬆開。
說明
Stores information about mouse click events. See Node._input().
Note: On Wear OS devices, rotary input is mapped to @GlobalScope.MOUSE_BUTTON_WHEEL_UP and @GlobalScope.MOUSE_BUTTON_WHEEL_DOWN. This can be changed to @GlobalScope.MOUSE_BUTTON_WHEEL_LEFT and @GlobalScope.MOUSE_BUTTON_WHEEL_RIGHT with the ProjectSettings.input_devices/pointing/android/rotary_input_scroll_axis setting.
教學
屬性
|
||
|
||
|
||
|
||
|
屬性說明
MouseButton button_index = 0 🔗
void set_button_index(value: MouseButton)
MouseButton get_button_index()
滑鼠按鍵識別字,MouseButton 按鈕或按鈕滾輪常數。
如果為 true,則滑鼠按鍵事件被取消。
如果為 true,則滑鼠按鍵的狀態是按兩下。
事件的數量(或 delta)。當用於高精度滾動事件時,這表示滾動量(垂直或水平)。這只在一些平臺上被支援;報告的靈敏度因平臺不同而不同。如果不支援,可能是0。
如果為 true,滑鼠按鍵的狀態為按下。如果為 false,鼠標按鈕的狀態被釋放。