diff options
author | Andrei Karas <akaras@inbox.ru> | 2012-10-25 01:13:56 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2012-10-25 01:18:02 +0300 |
commit | 1e4aa6a5e7476bea736b89fe5d7094b6a68705e5 (patch) | |
tree | e1f4bda6bcdf5497ae3e7a6b96afc1af563ee7f7 /src/gui/widgets/window.cpp | |
parent | efcee136d7ab46a73286f1ac016d6e3b6a3faed4 (diff) | |
download | plus-1e4aa6a5e7476bea736b89fe5d7094b6a68705e5.tar.gz plus-1e4aa6a5e7476bea736b89fe5d7094b6a68705e5.tar.bz2 plus-1e4aa6a5e7476bea736b89fe5d7094b6a68705e5.tar.xz plus-1e4aa6a5e7476bea736b89fe5d7094b6a68705e5.zip |
Add support for different hover/pickup cursors for monsters, npc, items, etc.
In monsters.xml new monster attribute:
hoverCursor - default value "attack".
In npcs.xml new npc attribute:
hoverCursor - default value "talk".
In items.xml new item attribute:
pickupCursor - default value "pickup".
Warps using "up" cursor for now.
Diffstat (limited to 'src/gui/widgets/window.cpp')
-rw-r--r-- | src/gui/widgets/window.cpp | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/src/gui/widgets/window.cpp b/src/gui/widgets/window.cpp index 9128402ad..1a6eb334c 100644 --- a/src/gui/widgets/window.cpp +++ b/src/gui/widgets/window.cpp @@ -131,7 +131,7 @@ Window::Window(const std::string &caption, const bool modal, if (mModal) { - gui->setCursorType(Gui::CURSOR_POINTER); + gui->setCursorType(Cursor::CURSOR_POINTER); requestModalFocus(); } @@ -443,7 +443,7 @@ void Window::widgetMoved(const gcn::Event& event A_UNUSED) void Window::widgetHidden(const gcn::Event &event A_UNUSED) { if (gui) - gui->setCursorType(Gui::CURSOR_POINTER); + gui->setCursorType(Cursor::CURSOR_POINTER); if (!mFocusHandler) return; @@ -587,7 +587,7 @@ void Window::mouseReleased(gcn::MouseEvent &event A_UNUSED) { mouseResize = 0; if (gui) - gui->setCursorType(Gui::CURSOR_POINTER); + gui->setCursorType(Cursor::CURSOR_POINTER); } // This should be the responsibility of Guichan (and is from 0.8.0 on) @@ -602,7 +602,7 @@ void Window::mouseEntered(gcn::MouseEvent &event) void Window::mouseExited(gcn::MouseEvent &event A_UNUSED) { if (mGrip && !mouseResize && gui) - gui->setCursorType(Gui::CURSOR_POINTER); + gui->setCursorType(Cursor::CURSOR_POINTER); } void Window::updateResizeHandler(gcn::MouseEvent &event) @@ -617,22 +617,22 @@ void Window::updateResizeHandler(gcn::MouseEvent &event) { case BOTTOM | RIGHT: case TOP | LEFT: - gui->setCursorType(Gui::CURSOR_RESIZE_DOWN_RIGHT); + gui->setCursorType(Cursor::CURSOR_RESIZE_DOWN_RIGHT); break; case TOP | RIGHT: case BOTTOM | LEFT: - gui->setCursorType(Gui::CURSOR_RESIZE_DOWN_LEFT); + gui->setCursorType(Cursor::CURSOR_RESIZE_DOWN_LEFT); break; case BOTTOM: case TOP: - gui->setCursorType(Gui::CURSOR_RESIZE_DOWN); + gui->setCursorType(Cursor::CURSOR_RESIZE_DOWN); break; case RIGHT: case LEFT: - gui->setCursorType(Gui::CURSOR_RESIZE_ACROSS); + gui->setCursorType(Cursor::CURSOR_RESIZE_ACROSS); break; default: - gui->setCursorType(Gui::CURSOR_POINTER); + gui->setCursorType(Cursor::CURSOR_POINTER); } } @@ -735,7 +735,7 @@ void Window::setModal(bool modal) if (mModal) { if (gui) - gui->setCursorType(Gui::CURSOR_POINTER); + gui->setCursorType(Cursor::CURSOR_POINTER); requestModalFocus(); } else |