struct Espresso::Cursor
- Espresso::Cursor
- Struct
- Value
- Object
Overview
Custom or standard cursor to display the mouse's location in a window.
Included Modules
- Espresso::ErrorHandling
Extended Modules
- Espresso::ErrorHandling
Defined in:
espresso/input/mouse/cursor.crConstructors
-
.arrow : self
Creates a standard Arrow cursor shape.
-
.crosshair : self
Creates a standard Crosshair cursor shape.
-
.h_resize : self
Creates a standard HResize cursor shape.
-
.hand : self
Creates a standard Hand cursor shape.
-
.i_beam : self
Creates a standard IBeam cursor shape.
-
.new(image, x = 0, y = 0)
Creates a new custom cursor from an image.
-
.standard(type) : self
Creates a cursor from one of the standard shapes.
-
.v_resize : self
Creates a standard VResize cursor shape.
Instance Method Summary
-
#destroy!
Destroys the cursor and releases any resources it used.
-
#to_unsafe : LibGLFW::Cursor
Returns the underlying GLFW cursor pointer.
Constructor Detail
Creates a new custom cursor from an image.
Specify the cursor's appearance with the image argument. The x and y arguments specify the cursor's hot-spot.
Creates a cursor from one of the standard shapes.
See CursorShape
for available options.
Instance Method Detail
Destroys the cursor and releases any resources it used.
If the cursor is current for any window,
that window will revert to the default cursor.
This does not affect the cursor mode.
All remaining cursors are destroyed when Espresso#terminate
is called.
Do not attempt to use the cursor after destroying it.