From 1e4aa6a5e7476bea736b89fe5d7094b6a68705e5 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Thu, 25 Oct 2012 01:13:56 +0300 Subject: 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. --- src/gui/widgets/window.cpp | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'src/gui/widgets') 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 -- cgit v1.2.3-60-g2f50