![]() |
CRM64Pro GDK v0.14.0
A free cross-platform game development kit built on top of SDL 3.0
|
Cursor Manager class.
Public Member Functions | |
| bool | info (Sint32 iMode=0) override |
| Request Cursor Manager information. | |
| Sint32 | create (const string &sName, Uint32 iVersion=10) override |
| Create a new cursor. | |
| bool | close (Sint32 idCursor) override |
| Close and destroy a cursor. | |
| Sint32 | getCount () const override |
| Get number of loaded objects. | |
| Sint32 | setName (Sint32 idCur, const string &sName) override |
| Change the object name. | |
| Cursor * | get (Sint32 idCur) |
| Get a pointer to the cursor using its handler. | |
| Sint32 | select (Sint32 idCur) |
| Select a mouse cursor. | |
| Sint32 | getSelect () const |
| Get selected mouse cursor. | |
| bool | show () |
| Make visible the selected mouse cursor. | |
| bool | hide () |
| Hide the mouse cursor. | |
| Sint32 | status () const |
| Get the cursor status. | |
| bool | setPosition (float fX, float fY, Sint32 idScreen=0) |
| Set the mouse cursor position. | |
| float | getX () const |
| Get the mouse cursor X position. | |
| float | getY () const |
| Get the mouse cursor Y position. | |
| Sint32 | getButtons () const |
| Get the mouse buttons. | |
| Sint32 | getButtonsPrev () const |
| Get the previous mouse buttons. | |
| Sint32 | getFocus () const |
| Get the Screen id which currently has mouse focus. | |
| Sint32 | child (Sint32 idCur) |
| Create a child cursor dependant on the provided one(the parent). | |
| Sint32 | load (const string &sCDCFile, const string &sName) |
| Load a cursor stored in a CDC file. | |
| Sint32 | load (const Sint32 idCDC, const string &sName) |
| Load a cursor stored in a CDC file. | |
| Sint32 | remove (Sint32 idCDC, const string &sName) |
| Remove a cursor stored in a CDC file. | |
| bool | exist (Sint32 idCDC, const string &sName) |
| Check if a cursor is stored in a CDC file. | |
| bool | exist (const string &sCDCFile, const string &sName) |
| Check if a cursor is stored in a CDC file. | |
|
override |
Request Cursor Manager information.
Writes information to the default log.
| iMode | -1 to display only manager information. 0 (default) to display manager and all objects. Specific object ID to display manager and only that object. |
|
override |
Create a new cursor.
Creates an empty cursor (no image). Use Cursor::assignImage() to assign an image.
| sName | The cursor name (e.g. 'myCursor'). Must be unique, max 64 characters. |
| iVersion | Cursor version. 10 means v1.0 (only version supported). Default v1.0. |
|
override |
Close and destroy a cursor.
| idCursor | 0 for closing all cursors or the Cursor id. Stand-alone and child cursors can be closed but parent ones, can not as they have at least one dependency (a child). |
|
override |
Get number of loaded objects.
|
override |
| Cursor * CRM64Pro::CursorMgr::get | ( | Sint32 | idCur | ) |
Get a pointer to the cursor using its handler.
| idCur | Cursor id. |
| Sint32 CRM64Pro::CursorMgr::select | ( | Sint32 | idCur | ) |
Select a mouse cursor.
| idCur | Cursor id. It also supports any SDL_SystemCursor. |
| Sint32 CRM64Pro::CursorMgr::getSelect | ( | ) | const |
Get selected mouse cursor.
| bool CRM64Pro::CursorMgr::show | ( | ) |
Make visible the selected mouse cursor.
| bool CRM64Pro::CursorMgr::hide | ( | ) |
Hide the mouse cursor.
| Sint32 CRM64Pro::CursorMgr::status | ( | ) | const |
Get the cursor status.
| bool CRM64Pro::CursorMgr::setPosition | ( | float | fX, |
| float | fY, | ||
| Sint32 | idScreen = 0 ) |
Set the mouse cursor position.
| fX | float with x position. |
| fY | float with y position. |
| idScreen | Screen id. Default 0 uses the screen with mouse focus. |
| float CRM64Pro::CursorMgr::getX | ( | ) | const |
Get the mouse cursor X position.
| float CRM64Pro::CursorMgr::getY | ( | ) | const |
Get the mouse cursor Y position.
| Sint32 CRM64Pro::CursorMgr::getButtons | ( | ) | const |
Get the mouse buttons.
| Sint32 CRM64Pro::CursorMgr::getButtonsPrev | ( | ) | const |
Get the previous mouse buttons.
| Sint32 CRM64Pro::CursorMgr::getFocus | ( | ) | const |
Get the Screen id which currently has mouse focus.
| Sint32 CRM64Pro::CursorMgr::child | ( | Sint32 | idCur | ) |
Create a child cursor dependant on the provided one(the parent).
A child cursor uses parent's attributes and creates a child image for different attributes. Currently only different Hotspots are supported, as colorkey cannot be modified on child images and other attributes are not supported by the SDL cursor system.
| idCur | parent Cursor id. If the provided cursor is a child, the request is redirected to its parent. |
| Sint32 CRM64Pro::CursorMgr::load | ( | const string & | sCDCFile, |
| const string & | sName ) |
Load a cursor stored in a CDC file.
| sCDCFile | string containing [directory]+filename. Directory separators '\' and '/' are supported. |
| sName | string with the cursor name (max 64 characters). If already exists, creates a child instead. |
| Sint32 CRM64Pro::CursorMgr::load | ( | const Sint32 | idCDC, |
| const string & | sName ) |
Load a cursor stored in a CDC file.
| idCDC | CDC id. |
| sName | string with the cursor name (max 64 characters). If already exists, creates a child instead. |
| Sint32 CRM64Pro::CursorMgr::remove | ( | Sint32 | idCDC, |
| const string & | sName ) |
Remove a cursor stored in a CDC file.
| idCDC | CDC id. |
| sName | string with the cursor name (maximum size of 64 characters). |
| bool CRM64Pro::CursorMgr::exist | ( | Sint32 | idCDC, |
| const string & | sName ) |
Check if a cursor is stored in a CDC file.
| idCDC | CDC id. |
| sName | string with the cursor name (maximum size of 64 characters). |
| bool CRM64Pro::CursorMgr::exist | ( | const string & | sCDCFile, |
| const string & | sName ) |
Check if a cursor is stored in a CDC file.
| sCDCFile | Path to the CDC archive file. |
| sName | string with the cursor name (maximum size of 64 characters). |