InputEventMouseButton
Represents a mouse button being pressed or released.
InputEventMouseButton.swift:20class InputEventMouseButton
Stores information about mouse click events. See _input(event:)
.
Superclasses
class InputEventMouse
Base input event type for mouse events.
Citizens in SwiftGodot
Conformances
protocol CustomStringConvertible
A type with a customized textual representation.
protocol Equatable
A type that can be compared for value equality.
protocol Hashable
A type that can be hashed into a
Hasher
to produce an integer hash value.protocol Identifiable<ID>
A class of types whose instances hold the value of an entity with stable identity.
protocol VariantRepresentable
Types that conform to VariantRepresentable can be stored directly in
Variant
with no conversion. These include all of the Variant types from Godot (for exampleGString
,Rect
,Plane
), Godot objects (those that subclass SwiftGodot.Object) as well as the built-in Swift types UInt8, Int64 and Double.protocol VariantStorable
Types that conform to VariantStorable can be stored in a Variant and can be extracted back out of a Variant.
Type members
Instance members
var canceled: Bool
If
true
, the mouse button event has been canceled.var doubleClick: Bool
If
true
, the mouse button’s state is a double-click.var factor: Double
The amount (or delta) of the event. When used for high-precision scroll events, this indicates the scroll amount (vertical or horizontal). This is only supported on some platforms; the reported sensitivity varies depending on the platform. May be
0
if not supported.var pressed: Bool
If
true
, the mouse button’s state is pressed. Iffalse
, the mouse button’s state is released.