![]() |
CRM64Pro GDK v0.20.0
A free cross-platform game development kit built on top of SDL 3.0
|
Public Member Functions | |
| bool | info (Sint32 iMode=0) override |
| Request Cursor object information. | |
| const string & | getName () const override |
| Get the name. | |
| Sint32 | getID () const override |
| Get the ID. | |
| Sint32 | assignImage (Sint32 idImage, Sint32 iOwnership=0) |
| Assign an Image to this cursor. | |
| Sint32 | getImage () const |
| Get the assigned Image of this cursor. | |
| Sint32 | build () |
| Build the cursor. | |
| bool | setHotSpot (const Position &rHotX, const Position &rHotY) |
| Set the cursor hotspots. | |
| bool | getHotSpot (Sint32 *iHotX, Sint32 *iHotY) const |
| Get the cursor hotspots. | |
| Sint32 | save (const string &sCDCFile, const string &sResourceName="") |
| Save the cursor to a CDC file. | |
| Sint32 | save (Sint32 idCDC, const string &sResourceName="") |
| Save the cursor to a CDC file. | |
Cursor Object class.
|
override |
Request Cursor object information.
Writes information to the default log.
| iMode | Reserved for future use. Pass 0. |
|
override |
Get the name.
|
override |
Get the ID.
| Sint32 CRM64Pro::Cursor::assignImage | ( | Sint32 | idImage, |
| Sint32 | iOwnership = 0 ) |
Assign an Image to this cursor.
Used for associating an Image to cursors created via CursorMgr::create().
| idImage | Image id. |
| iOwnership | 0 (default) creates a copy; any other value takes ownership (image cannot be owned by another item). |
| Sint32 CRM64Pro::Cursor::getImage | ( | ) | const |
| Sint32 CRM64Pro::Cursor::build | ( | ) |
Build the cursor.
If the assigned Image colorkey is modified, this method rebuilds the cursor. Other Image attributes (color/alpha modulation) have no effect on cursors.
Set the cursor hotspots.
| rHotX | Position with x hotspot. Can be absolute (float) or use ::PH_CENTER / ::PH_SIZE helpers with integer offset. |
| rHotY | Position with y hotspot. Can be absolute (float) or use ::PH_CENTER / ::PH_SIZE helpers with integer offset. |
| bool CRM64Pro::Cursor::getHotSpot | ( | Sint32 * | iHotX, |
| Sint32 * | iHotY ) const |
Get the cursor hotspots.
| iHotX | an integer pointer filled in with x hotspot position of the cursor. If nullptr is passed, the method ignores the retrieving of this value. |
| iHotY | an integer pointer filled in with y hotspot position of the cursor. If nullptr is passed, the method ignores the retrieving of this value. |
| Sint32 CRM64Pro::Cursor::save | ( | const string & | sCDCFile, |
| const string & | sResourceName = "" ) |
Save the cursor to a CDC file.
The associated image will also be saved to the same CDC file.
| sCDCFile | string containing [directory]+filename+[extension]. Directory separators '\' and '/' are supported. |
| sResourceName | Optional resource name to use in the CDC. If empty (default), uses the Cursor object's internal name. |
| Sint32 CRM64Pro::Cursor::save | ( | Sint32 | idCDC, |
| const string & | sResourceName = "" ) |
Save the cursor to a CDC file.
The associated image will also be saved to the same CDC file.
| idCDC | CDC id. |
| sResourceName | Optional resource name to use in the CDC. If empty (default), uses the Cursor object's internal name. |