PointerButtons
-
Cmn
value class PointerButtons
Contains the state of pointer buttons (e.g. mouse and stylus buttons).
Summary
Public constructors |
|
|---|---|
PointerButtons(packedValue: NativePointerButtons) |
Cmn
|
Extension functions |
||
|---|---|---|
Int |
Returns the index of first button pressed as used in |
Cmn
android
|
Int |
Returns the index of last button pressed as used in |
Cmn
android
|
Boolean |
PointerButtons.isPressed(buttonIndex: Int)Returns |
Cmn
android
|
Extension properties |
||
|---|---|---|
Boolean |
Returns |
Cmn
android
|
Boolean |
|
Cmn
android
|
Boolean |
|
Cmn
android
|
Boolean |
|
Cmn
android
|
Boolean |
|
Cmn
android
|
Boolean |
|
Cmn
android
|
Public constructors
Extension functions
indexOfFirstPressed
fun PointerButtons.indexOfFirstPressed(): Int
Returns the index of first button pressed as used in isPressed or -1 if no button is pressed.
indexOfLastPressed
fun PointerButtons.indexOfLastPressed(): Int
Returns the index of last button pressed as used in isPressed or -1 if no button is pressed.
isPressed
fun PointerButtons.isPressed(buttonIndex: Int): Boolean
Returns true when the button at buttonIndex is pressed and false when it isn't pressed. This method can handle buttons that haven't been assigned a designated purpose like isPrimaryPressed and isSecondaryPressed.
Extension properties
areAnyPressed
val PointerButtons.areAnyPressed: Boolean
Returns true if any button is pressed or false if all buttons are released.
isBackPressed
val PointerButtons.isBackPressed: Boolean
true when the back button (mouse back button) is pressed or false when it isn't pressed or there is no mouse button assigned to "back."
isForwardPressed
val PointerButtons.isForwardPressed: Boolean
true when the forward button (mouse forward button) is pressed or false when it isn't pressed or there is no button assigned to "forward."
isPrimaryPressed
val PointerButtons.isPrimaryPressed: Boolean
true when the primary button (left mouse button) is pressed or false when it isn't pressed.
isSecondaryPressed
val PointerButtons.isSecondaryPressed: Boolean
true when the secondary button (right mouse button) is pressed or false when it isn't pressed.
isTertiaryPressed
val PointerButtons.isTertiaryPressed: Boolean
true when the tertiary button (middle mouse button) is pressed or false when it isn't pressed.