module Glint::Input::Mouse
Overview
Utility module for managing mouse-related features.
Defined in:
glint/input/cursor.crglint/input/mouse.cr
Class Method Summary
-
.back_down? : Bool
Returns whether
Mouse::Button::Back
is in the down state. -
.back_pressed? : Bool
Returns whether
Mouse::Button::Back
is in the pressed state. -
.back_released? : Bool
Returns whether
Mouse::Button::Back
is in the released state. -
.back_up? : Bool
Returns whether
Mouse::Button::Back
is in the up state. -
.down?(mouse_button : Button) : Bool
Returns whether
mouse_button
is in the down state. -
.extra_down? : Bool
Returns whether
Mouse::Button::Extra
is in the down state. -
.extra_pressed? : Bool
Returns whether
Mouse::Button::Extra
is in the pressed state. -
.extra_released? : Bool
Returns whether
Mouse::Button::Extra
is in the released state. -
.extra_up? : Bool
Returns whether
Mouse::Button::Extra
is in the up state. -
.forward_down? : Bool
Returns whether
Mouse::Button::Forward
is in the down state. -
.forward_pressed? : Bool
Returns whether
Mouse::Button::Forward
is in the pressed state. -
.forward_released? : Bool
Returns whether
Mouse::Button::Forward
is in the released state. -
.forward_up? : Bool
Returns whether
Mouse::Button::Forward
is in the up state. -
.left_down? : Bool
Returns whether
Mouse::Button::Left
is in the down state. -
.left_pressed? : Bool
Returns whether
Mouse::Button::Left
is in the pressed state. -
.left_released? : Bool
Returns whether
Mouse::Button::Left
is in the released state. -
.left_up? : Bool
Returns whether
Mouse::Button::Left
is in the up state. -
.middle_down? : Bool
Returns whether
Mouse::Button::Middle
is in the down state. -
.middle_pressed? : Bool
Returns whether
Mouse::Button::Middle
is in the pressed state. -
.middle_released? : Bool
Returns whether
Mouse::Button::Middle
is in the released state. -
.middle_up? : Bool
Returns whether
Mouse::Button::Middle
is in the up state. -
.position : Position
Returns the mouse position.
-
.pressed?(mouse_button : Button) : Bool
Returns whether
mouse_button
is in the pressed state. -
.released?(mouse_button : Button) : Bool
Returns whether
mouse_button
is in the released state. -
.right_down? : Bool
Returns whether
Mouse::Button::Right
is in the down state. -
.right_pressed? : Bool
Returns whether
Mouse::Button::Right
is in the pressed state. -
.right_released? : Bool
Returns whether
Mouse::Button::Right
is in the released state. -
.right_up? : Bool
Returns whether
Mouse::Button::Right
is in the up state. -
.side_down? : Bool
Returns whether
Mouse::Button::Side
is in the down state. -
.side_pressed? : Bool
Returns whether
Mouse::Button::Side
is in the pressed state. -
.side_released? : Bool
Returns whether
Mouse::Button::Side
is in the released state. -
.side_up? : Bool
Returns whether
Mouse::Button::Side
is in the up state. -
.up?(mouse_button : Button) : Bool
Returns whether
mouse_button
is in the up state. -
.x : Int
Returns the x-coordinate of the the cursor position.
-
.y : Int
Returns the y-coordinate of the mouse position.
Class Method Detail
Returns whether Mouse::Button::Back
is in the down state.
def self.back_down? : Bool
Button::Back.is_down?
end
Returns whether Mouse::Button::Back
is in the pressed state.
def self.back_pressed? : Bool
Button::Back.is_pressed?
end
Returns whether Mouse::Button::Back
is in the released state.
def self.back_released? : Bool
Button::Back.is_released?
end
Returns whether Mouse::Button::Back
is in the up state.
def self.back_up? : Bool
Button::Back.is_up?
end
Returns whether mouse_button
is in the down state.
def self.down?(mouse_button : Button) : Bool
mouse_button.is_down?
end
Returns whether Mouse::Button::Extra
is in the down state.
def self.extra_down? : Bool
Button::Extra.is_down?
end
Returns whether Mouse::Button::Extra
is in the pressed state.
def self.extra_pressed? : Bool
Button::Extra.is_pressed?
end
Returns whether Mouse::Button::Extra
is in the released state.
def self.extra_released? : Bool
Button::Extra.is_released?
end
Returns whether Mouse::Button::Extra
is in the up state.
def self.extra_up? : Bool
Button::Extra.is_up?
end
Returns whether Mouse::Button::Forward
is in the down state.
def self.forward_down? : Bool
Button::Forward.is_down?
end
Returns whether Mouse::Button::Forward
is in the pressed state.
def self.forward_pressed? : Bool
Button::Forward.is_pressed?
end
Returns whether Mouse::Button::Forward
is in the released state.
def self.forward_released? : Bool
Button::Forward.is_released?
end
Returns whether Mouse::Button::Forward
is in the up state.
def self.forward_up? : Bool
Button::Forward.is_up?
end
Returns whether Mouse::Button::Left
is in the down state.
def self.left_down? : Bool
Button::Left.is_down?
end
Returns whether Mouse::Button::Left
is in the pressed state.
def self.left_pressed? : Bool
Button::Left.is_pressed?
end
Returns whether Mouse::Button::Left
is in the released state.
def self.left_released? : Bool
Button::Left.is_released?
end
Returns whether Mouse::Button::Left
is in the up state.
def self.left_up? : Bool
Button::Left.is_up?
end
Returns whether Mouse::Button::Middle
is in the down state.
def self.middle_down? : Bool
Button::Middle.is_down?
end
Returns whether Mouse::Button::Middle
is in the pressed state.
def self.middle_pressed? : Bool
Button::Middle.is_pressed?
end
Returns whether Mouse::Button::Middle
is in the released state.
def self.middle_released? : Bool
Button::Middle.is_released?
end
Returns whether Mouse::Button::Middle
is in the up state.
def self.middle_up? : Bool
Button::Middle.is_up?
end
Returns whether mouse_button
is in the pressed state.
def self.pressed?(mouse_button : Button) : Bool
mouse_button.is_pressed?
end
Returns whether mouse_button
is in the released state.
def self.released?(mouse_button : Button) : Bool
mouse_button.is_released?
end
Returns whether Mouse::Button::Right
is in the down state.
def self.right_down? : Bool
Button::Right.is_down?
end
Returns whether Mouse::Button::Right
is in the pressed state.
def self.right_pressed? : Bool
Button::Right.is_pressed?
end
Returns whether Mouse::Button::Right
is in the released state.
def self.right_released? : Bool
Button::Right.is_released?
end
Returns whether Mouse::Button::Right
is in the up state.
def self.right_up? : Bool
Button::Right.is_up?
end
Returns whether Mouse::Button::Side
is in the down state.
def self.side_down? : Bool
Button::Side.is_down?
end
Returns whether Mouse::Button::Side
is in the pressed state.
def self.side_pressed? : Bool
Button::Side.is_pressed?
end
Returns whether Mouse::Button::Side
is in the released state.
def self.side_released? : Bool
Button::Side.is_released?
end
Returns whether Mouse::Button::Side
is in the up state.
def self.side_up? : Bool
Button::Side.is_up?
end
Returns whether mouse_button
is in the up state.
def self.up?(mouse_button : Button) : Bool
mouse_button.is_up?
end