TGUI
0.9.5
|
Class that allows the cursor to be changed. More...
#include <TGUI/Cursor.hpp>
Public Types | |
enum class | Type { Arrow , Text , Hand , SizeLeft , SizeRight , SizeTop , SizeBottom , SizeTopLeft , SizeBottomRight , SizeBottomLeft , SizeTopRight , Crosshair , Help , NotAllowed } |
List of available cursors. More... | |
Static Public Member Functions | |
static void | setStyle (Type type, const std::uint8_t *pixels, Vector2u size, Vector2u hotspot) |
Changes how a specific cursor should look like. | |
static void | resetStyle (Type type) |
Changes the look of the cursor back to the default system cursors. | |
Class that allows the cursor to be changed.
|
strong |
List of available cursors.
|
static |
Changes the look of the cursor back to the default system cursors.
type | Which cursor's look should be reset? |
|
static |
Changes how a specific cursor should look like.
type | Which cursor's look has to be changed? |
pixels | Pointer to an array with 4*size.x*size.y elements, representing the pixels in 32-bit RGBA format |
size | Size of the cursor |
hotspot | Pixel coordinate within the cursor image which will be located exactly at the mouse pointer position |
By default the system cursors are used, this function allows replacing them with bitmaps. The effects of this function can be undone by calling resetCursorLook.