|
FIFE 2008.0
|
#include <cursor.h>

Public Member Functions | |
| Cursor (ImagePool *imgpool, AnimationPool *animpool, RenderBackend *renderbackend) | |
| virtual | ~Cursor () |
| virtual void | draw () |
| void | set (MouseCursorType ctype, unsigned int cursor_id=0) |
| void | setDrag (MouseCursorType ctype, unsigned int drag_id=0, int drag_offset_x=0, int drag_offset_y=0) |
| MouseCursorType | getType () const |
| unsigned int | getId () const |
| MouseCursorType | getDragType () const |
| unsigned int | getDragId () const |
| unsigned int | getX () const |
| unsigned int | getY () const |
Protected Member Functions | |
| void | setNativeCursor (unsigned int cursor_id) |
| unsigned int | getNativeId (unsigned int cursor_id) |
| FIFE::Cursor::Cursor | ( | ImagePool * | imgpool, |
| AnimationPool * | animpool, | ||
| RenderBackend * | renderbackend | ||
| ) |
Constructor.
Definition at line 77 of file cursor.cpp.
| virtual FIFE::Cursor::~Cursor | ( | ) | [inline, virtual] |
| void FIFE::Cursor::draw | ( | ) | [virtual] |
draws cursor on screen
Definition at line 145 of file cursor.cpp.
References FIFE::Animation::getDuration(), FIFE::Animation::getFrameByTimestamp(), FIFE::TimeManager::getTime(), and FIFE::Image::render().
Referenced by FIFE::Engine::pump().

| unsigned int FIFE::Cursor::getDragId | ( | ) | const [inline] |
| MouseCursorType FIFE::Cursor::getDragType | ( | ) | const [inline] |
| unsigned int FIFE::Cursor::getId | ( | ) | const [inline] |
| unsigned int FIFE::Cursor::getNativeId | ( | unsigned int | 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.
| One | of the values in NativeCursor |
Definition at line 188 of file cursor.cpp.
Referenced by setNativeCursor().

| MouseCursorType FIFE::Cursor::getType | ( | ) | const [inline] |
| unsigned int FIFE::Cursor::getX | ( | ) | const [inline] |
| unsigned int FIFE::Cursor::getY | ( | ) | const [inline] |
| void FIFE::Cursor::set | ( | MouseCursorType | ctype, |
| unsigned int | cursor_id = 0 |
||
| ) |
Sets the current mouse cursor type and possible pool value
| ctype | cursor type |
| cursor_id | Pool id to image or animation. For native cursors, this is the resource id to native cursor, or one of the values in NativeCursor |
Definition at line 98 of file cursor.cpp.
References FIFE::TimeManager::getTime(), and setNativeCursor().
| void FIFE::Cursor::setDrag | ( | MouseCursorType | ctype, |
| unsigned int | drag_id = 0, |
||
| int | drag_offset_x = 0, |
||
| int | drag_offset_y = 0 |
||
| ) |
Sets the current drag cursor type and pool value
| ctype | drag cursor type |
| drag_id | pool id for the drag cursor (either image or animation) |
| drag_offset | offset of drag image shown with cursor |
Definition at line 122 of file cursor.cpp.
References FIFE::TimeManager::getTime().
| void FIFE::Cursor::setNativeCursor | ( | unsigned int | cursor_id | ) | [protected] |
Sets the cursor to a native type.
| cursor_id | Resource id to native cursor, or one of the values in NativeCursor |
Definition at line 276 of file cursor.cpp.
References getNativeId().
Referenced by set().
