#include <NaviMouse.h>
Public Member Functions | |
| NaviMouse (unsigned short width=64, unsigned short height=64, bool visibility=true) | |
| NaviCursor * | createCursor (const std::string &cursorName, unsigned short hotspotX=0, unsigned short hotspotY=0) |
| void | setDefaultCursor (const std::string &cursorName) |
| void | removeCursor (const std::string &cursorName) |
| void | activateCursor (std::string cursorName) |
| void | show () |
| void | hide () |
| bool | isVisible () |
Static Public Member Functions | |
| static NaviMouse & | Get () |
| static NaviMouse * | GetPointer () |
| NaviMouse::NaviMouse | ( | unsigned short | width = 64, |
|
| unsigned short | height = 64, |
|||
| bool | visibility = true | |||
| ) |
Creates the NaviMouse Singleton.
| width | The width of the NaviMouse cursor (all loaded cursors should be this width to avoid stretching). | |
| height | The height of the NaviMouse cursor (all loaded cursors should be this height to avoid stretching). | |
| visibility | Whether or not the cursor should be visible upon creation. Use NaviMouse::show() later. |
| NaviMouse & NaviMouse::Get | ( | ) | [static] |
| NaviMouse * NaviMouse::GetPointer | ( | ) | [static] |
Gets the NaviMouse Singleton as a pointer.
| NaviCursor * NaviMouse::createCursor | ( | const std::string & | cursorName, | |
| unsigned short | hotspotX = 0, |
|||
| unsigned short | hotspotY = 0 | |||
| ) |
Creates a cursor for use with this NaviMouse.
| cursorName | The name of the cursor, used to activate or remove the cursor later. | |
| hotspotX | Every cursor has a hot spot, which is used to define the single pixel a cursor is pointing to when the mouse is clicked. This is the X-value of the hotspot. | |
| hotspotY | The Y-value of the hotspot. |
| void NaviMouse::setDefaultCursor | ( | const std::string & | cursorName | ) |
This should be called before NaviManager begins updating the mouse. Sets the default cursor for the mouse.
| cursorName | The name of the cursor, from here on you may refer to this cursor by this cursorName or by "default", both will work. You may not remove a default cursor. |
| void NaviMouse::removeCursor | ( | const std::string & | cursorName | ) |
Removes a cursor from this NaviMouse.
| cursorName | The cursor to remove. You may not remove a default cursor. If you try to remove a cursor that is currently active, the cursor will change to the default cursor after removal. |
| void NaviMouse::activateCursor | ( | std::string | cursorName | ) |
Changes the active cursor to a specified cursor.
| cursorName | The name of the cursor to change to. To change to the default cursor, simply specify "default". If the cursor cannot be found, nothing will happen. |
| void NaviMouse::show | ( | ) |
Displays the mouse cursor (if it is hidden via NaviMouse::hide).
| void NaviMouse::hide | ( | ) |
Hides the mouse cursor. Show it again via NaviMouse::show.
| bool NaviMouse::isVisible | ( | ) |
Returns whether or not the mouse cursor is visible.
1.5.3