aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/llui/llview.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'linden/indra/llui/llview.cpp')
-rw-r--r--linden/indra/llui/llview.cpp20
1 files changed, 15 insertions, 5 deletions
diff --git a/linden/indra/llui/llview.cpp b/linden/indra/llui/llview.cpp
index 78bf168..e3652b7 100644
--- a/linden/indra/llui/llview.cpp
+++ b/linden/indra/llui/llview.cpp
@@ -85,7 +85,8 @@ LLView::LLView() :
85 mLastVisible(TRUE), 85 mLastVisible(TRUE),
86 mUseBoundingRect(FALSE), 86 mUseBoundingRect(FALSE),
87 mVisible(TRUE), 87 mVisible(TRUE),
88 mNextInsertionOrdinal(0) 88 mNextInsertionOrdinal(0),
89 mHoverCursor(UI_CURSOR_ARROW)
89{ 90{
90} 91}
91 92
@@ -102,7 +103,8 @@ LLView::LLView(const std::string& name, BOOL mouse_opaque) :
102 mLastVisible(TRUE), 103 mLastVisible(TRUE),
103 mUseBoundingRect(FALSE), 104 mUseBoundingRect(FALSE),
104 mVisible(TRUE), 105 mVisible(TRUE),
105 mNextInsertionOrdinal(0) 106 mNextInsertionOrdinal(0),
107 mHoverCursor(UI_CURSOR_ARROW)
106{ 108{
107} 109}
108 110
@@ -123,7 +125,8 @@ LLView::LLView(
123 mLastVisible(TRUE), 125 mLastVisible(TRUE),
124 mUseBoundingRect(FALSE), 126 mUseBoundingRect(FALSE),
125 mVisible(TRUE), 127 mVisible(TRUE),
126 mNextInsertionOrdinal(0) 128 mNextInsertionOrdinal(0),
129 mHoverCursor(UI_CURSOR_ARROW)
127{ 130{
128} 131}
129 132
@@ -657,7 +660,7 @@ BOOL LLView::handleHover(S32 x, S32 y, MASK mask)
657 if( !handled 660 if( !handled
658 && blockMouseEvent(x, y) ) 661 && blockMouseEvent(x, y) )
659 { 662 {
660 LLUI::sWindow->setCursor(UI_CURSOR_ARROW); 663 LLUI::sWindow->setCursor(mHoverCursor);
661 lldebugst(LLERR_USER_INPUT) << "hover handled by " << getName() << llendl; 664 lldebugst(LLERR_USER_INPUT) << "hover handled by " << getName() << llendl;
662 handled = TRUE; 665 handled = TRUE;
663 } 666 }
@@ -2622,7 +2625,14 @@ void LLView::initFromXML(LLXMLNodePtr node, LLView* parent)
2622 node->getAttributeBOOL("visible", visible); 2625 node->getAttributeBOOL("visible", visible);
2623 setVisible(visible); 2626 setVisible(visible);
2624 } 2627 }
2625 2628
2629 if (node->hasAttribute("hover_cursor"))
2630 {
2631 std::string cursor_string;
2632 node->getAttributeString("hover_cursor", cursor_string);
2633 mHoverCursor = getCursorFromString(cursor_string);
2634 }
2635
2626 node->getAttributeBOOL("use_bounding_rect", mUseBoundingRect); 2636 node->getAttributeBOOL("use_bounding_rect", mUseBoundingRect);
2627 node->getAttributeBOOL("mouse_opaque", mMouseOpaque); 2637 node->getAttributeBOOL("mouse_opaque", mMouseOpaque);
2628 2638