struct Espresso::Cursor


Custom or standard cursor to display the mouse's location in a window.

Defined in:



Class Method Summary

Instance Method Summary

Constructor Detail

def, x = 0, y = 0) #

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.

[View source]

Class Method Detail

def self.arrow #

Creates a standard Arrow cursor shape.

[View source]
def self.crosshair #

Creates a standard Crosshair cursor shape.

[View source]
def self.h_resize #

Creates a standard HResize cursor shape.

[View source]
def self.hand #

Creates a standard Hand cursor shape.

[View source]
def self.i_beam #

Creates a standard IBeam cursor shape.

[View source]
def self.standard(type) #

Creates a cursor from one of the standard shapes. See CursorShape for available options.

[View source]
def self.v_resize #

Creates a standard VResize cursor shape.

[View source]

Instance Method Detail

def destroy! #

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.

[View source]
def to_unsafe : LibGLFW::Cursor #

Returns the underlying GLFW cursor pointer.

[View source]