#include <cursor.h>
List of all members.
Detailed Description
Cursor class manages mouse cursor handling
Definition at line 84 of file cursor.h.
Constructor & Destructor Documentation
| virtual FIFE::Cursor::~Cursor |
( |
|
) |
[inline, virtual] |
Destructor.
Definition at line 92 of file cursor.h.
Member Function Documentation
| void FIFE::Cursor::draw |
( |
|
) |
[virtual] |
draws cursor on screen
Definition at line 178 of file cursor.cpp.
Gets the current mouse animation
Definition at line 145 of file cursor.h.
Gets the current mouse drag animation
Definition at line 157 of file cursor.h.
| ImagePtr FIFE::Cursor::getDragImage |
( |
|
) |
[inline] |
Gets the current mouse drag image
Definition at line 153 of file cursor.h.
Gets the current mouse cursor type
Definition at line 149 of file cursor.h.
| uint32_t FIFE::Cursor::getId |
( |
|
) |
const [inline] |
Gets the current mouse cursor handle
Definition at line 137 of file cursor.h.
| ImagePtr FIFE::Cursor::getImage |
( |
|
) |
[inline] |
Gets the current mouse image
Definition at line 141 of file cursor.h.
| uint32_t FIFE::Cursor::getNativeId |
( |
uint32_t |
cursor_id |
) |
[protected] |
To get some consistancy between platforms, this function checks if cursor_id matches any of the values in NativeCursor, and returns the resource ID specific to the running platform. If no match is found, cursor_id is returned.
- Parameters:
-
| One | of the values in NativeCursor |
Definition at line 229 of file cursor.cpp.
| void FIFE::Cursor::getPosition |
( |
int32_t * |
x, |
|
|
int32_t * |
y | |
|
) |
| | |
Get the current mouse position
Definition at line 162 of file cursor.cpp.
Gets the current mouse cursor type
Definition at line 133 of file cursor.h.
| uint32_t FIFE::Cursor::getX |
( |
|
) |
const [inline] |
Gets the current mouse x position
Definition at line 161 of file cursor.h.
| uint32_t FIFE::Cursor::getY |
( |
|
) |
const [inline] |
Gets the current mouse y position
Definition at line 165 of file cursor.h.
| void FIFE::Cursor::resetDrag |
( |
|
) |
|
Resets the cursor drag type to CURSOR_NONE
Definition at line 145 of file cursor.cpp.
| void FIFE::Cursor::set |
( |
ImagePtr |
image |
) |
|
Sets the current mouse cursor type to image
- Parameters:
-
| image | ImagePtr to a image used for the cursor |
Definition at line 84 of file cursor.cpp.
Sets the current mouse cursor type to animation
- Parameters:
-
| anim | AnimationPtr to a loaded animation used for the cursor |
Definition at line 102 of file cursor.cpp.
| void FIFE::Cursor::set |
( |
uint32_t |
cursor_id = 0 |
) |
|
Sets the current mouse cursor
- Parameters:
-
| cursor_id | For native cursors, this is the resource id to native cursor, or one of the values in NativeCursor |
Definition at line 69 of file cursor.cpp.
| void FIFE::Cursor::setDrag |
( |
AnimationPtr |
anim, |
|
|
int32_t |
drag_offset_x = 0, |
|
|
int32_t |
drag_offset_y = 0 | |
|
) |
| | |
Sets the current drag animated cursor
- Parameters:
-
| anim | AnimationPtr to a loaded animation used for the drag |
- Note:
- to reset the cursors drag call cursor.setDrag(Cursor::CURSOR_NONE, 0, 0)
Definition at line 132 of file cursor.cpp.
| void FIFE::Cursor::setDrag |
( |
ImagePtr |
image, |
|
|
int32_t |
drag_offset_x = 0, |
|
|
int32_t |
drag_offset_y = 0 | |
|
) |
| | |
Sets the current drag image cursor
- Parameters:
-
| image | ImagePtr to a image used for the drag |
- Note:
- to reset the cursors drag call cursor.setDrag(Cursor::CURSOR_NONE, 0, 0)
Definition at line 121 of file cursor.cpp.
| void FIFE::Cursor::setNativeCursor |
( |
uint32_t |
cursor_id |
) |
[protected] |
Sets the cursor to a native type.
- Parameters:
-
| cursor_id | Resource id to native cursor, or one of the values in NativeCursor |
Definition at line 317 of file cursor.cpp.
| void FIFE::Cursor::setPosition |
( |
uint32_t |
x, |
|
|
uint32_t |
y | |
|
) |
| | |
Set the mouse position
- Parameters:
-
| x,y,: | The new position in screen coordinates |
Definition at line 156 of file cursor.cpp.
The documentation for this class was generated from the following files: