summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
Diffstat (limited to 'indra')
-rw-r--r--indra/llcommon/llcursortypes.cpp2
-rw-r--r--indra/llcommon/llcursortypes.h2
-rw-r--r--indra/llwindow/llwindowwin32.cpp2
-rw-r--r--indra/newview/CMakeLists.txt2
-rw-r--r--indra/newview/llpathfindingpathtool.cpp49
-rw-r--r--indra/newview/llpathfindingpathtool.h1
-rw-r--r--indra/newview/res/lltoolpathfinding.curbin326 -> 4286 bytes
-rw-r--r--indra/newview/res/lltoolpathfindingpathend.curbin0 -> 326 bytes
-rw-r--r--indra/newview/res/lltoolpathfindingpathstart.curbin0 -> 326 bytes
-rw-r--r--indra/newview/res/viewerRes.rc2
10 files changed, 53 insertions, 7 deletions
diff --git a/indra/llcommon/llcursortypes.cpp b/indra/llcommon/llcursortypes.cpp
index 0367e6e622..c0676f8c13 100644
--- a/indra/llcommon/llcursortypes.cpp
+++ b/indra/llcommon/llcursortypes.cpp
@@ -70,6 +70,8 @@ ECursorType getCursorFromString(const std::string& cursor_string)
cursor_string_table["UI_CURSOR_TOOLBUY"] = UI_CURSOR_TOOLBUY;
cursor_string_table["UI_CURSOR_TOOLOPEN"] = UI_CURSOR_TOOLOPEN;
cursor_string_table["UI_CURSOR_TOOLPATHFINDING"] = UI_CURSOR_TOOLPATHFINDING;
+ cursor_string_table["UI_CURSOR_TOOLPATHFINDINGPATHSTART"] = UI_CURSOR_TOOLPATHFINDING_PATH_START;
+ cursor_string_table["UI_CURSOR_TOOLPATHFINDINGPATHEND"] = UI_CURSOR_TOOLPATHFINDING_PATH_END;
cursor_string_table["UI_CURSOR_TOOLNO"] = UI_CURSOR_TOOLNO;
}
diff --git a/indra/llcommon/llcursortypes.h b/indra/llcommon/llcursortypes.h
index 4662e90975..f47a328f77 100644
--- a/indra/llcommon/llcursortypes.h
+++ b/indra/llcommon/llcursortypes.h
@@ -66,6 +66,8 @@ enum ECursorType {
UI_CURSOR_TOOLBUY,
UI_CURSOR_TOOLOPEN,
UI_CURSOR_TOOLPATHFINDING,
+ UI_CURSOR_TOOLPATHFINDING_PATH_START,
+ UI_CURSOR_TOOLPATHFINDING_PATH_END,
UI_CURSOR_TOOLNO,
UI_CURSOR_COUNT // Number of elements in this enum (NOT a cursor)
};
diff --git a/indra/llwindow/llwindowwin32.cpp b/indra/llwindow/llwindowwin32.cpp
index a332bfddc4..9a52b7c09a 100644
--- a/indra/llwindow/llwindowwin32.cpp
+++ b/indra/llwindow/llwindowwin32.cpp
@@ -1698,6 +1698,8 @@ void LLWindowWin32::initCursors()
mCursor[ UI_CURSOR_TOOLBUY ] = LoadCursor(module, TEXT("TOOLBUY"));
mCursor[ UI_CURSOR_TOOLOPEN ] = LoadCursor(module, TEXT("TOOLOPEN"));
mCursor[ UI_CURSOR_TOOLPATHFINDING ] = LoadCursor(module, TEXT("TOOLPATHFINDING"));
+ mCursor[ UI_CURSOR_TOOLPATHFINDING_PATH_START ] = LoadCursor(module, TEXT("TOOLPATHFINDINGPATHSTART"));
+ mCursor[ UI_CURSOR_TOOLPATHFINDING_PATH_END ] = LoadCursor(module, TEXT("TOOLPATHFINDINGPATHEND"));
mCursor[ UI_CURSOR_TOOLNO ] = LoadCursor(module, TEXT("TOOLNO"));
// Color cursors
diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt
index 04d67b5108..ac78377abd 100644
--- a/indra/newview/CMakeLists.txt
+++ b/indra/newview/CMakeLists.txt
@@ -1339,6 +1339,8 @@ if (WINDOWS)
res/lltoolland.cur
res/lltoolpan.cur
res/lltoolpathfinding.cur
+ res/lltoolpathfindingpathend.cur
+ res/lltoolpathfindingpathstart.cur
res/lltoolpipette.cur
res/lltoolrotate.cur
res/lltoolscale.cur
diff --git a/indra/newview/llpathfindingpathtool.cpp b/indra/newview/llpathfindingpathtool.cpp
index 5567869a1c..82426920d8 100644
--- a/indra/newview/llpathfindingpathtool.cpp
+++ b/indra/newview/llpathfindingpathtool.cpp
@@ -66,12 +66,30 @@ BOOL LLPathfindingPathTool::handleMouseDown(S32 pX, S32 pY, MASK pMask)
{
BOOL returnVal = FALSE;
- if (!mIsLeftMouseButtonHeld && !mIsMiddleMouseButtonHeld && !mIsRightMouseButtonHeld && isAnyPathToolModKeys(pMask))
+ if (!mIsLeftMouseButtonHeld && !mIsMiddleMouseButtonHeld && !mIsRightMouseButtonHeld)
{
- computeFinalPoints(pX, pY, pMask);
- mIsLeftMouseButtonHeld = true;
- setMouseCapture(TRUE);
- returnVal = TRUE;
+ if (isAnyPathToolModKeys(pMask))
+ {
+ if (isPointAModKeys(pMask))
+ {
+ gViewerWindow->setCursor(UI_CURSOR_TOOLPATHFINDING_PATH_START);
+ }
+ else if (isPointBModKeys(pMask))
+ {
+ gViewerWindow->setCursor(UI_CURSOR_TOOLPATHFINDING_PATH_END);
+ }
+ computeFinalPoints(pX, pY, pMask);
+ mIsLeftMouseButtonHeld = true;
+ setMouseCapture(TRUE);
+ returnVal = TRUE;
+ }
+ else if (!isCameraModKeys(pMask))
+ {
+ gViewerWindow->setCursor(UI_CURSOR_TOOLNO);
+ mIsLeftMouseButtonHeld = true;
+ setMouseCapture(TRUE);
+ returnVal = TRUE;
+ }
}
mIsLeftMouseButtonHeld = true;
@@ -82,7 +100,7 @@ BOOL LLPathfindingPathTool::handleMouseUp(S32 pX, S32 pY, MASK pMask)
{
BOOL returnVal = FALSE;
- if (mIsLeftMouseButtonHeld && !mIsMiddleMouseButtonHeld && !mIsRightMouseButtonHeld && isAnyPathToolModKeys(pMask))
+ if (mIsLeftMouseButtonHeld && !mIsMiddleMouseButtonHeld && !mIsRightMouseButtonHeld)
{
computeFinalPoints(pX, pY, pMask);
setMouseCapture(FALSE);
@@ -142,9 +160,21 @@ BOOL LLPathfindingPathTool::handleHover(S32 pX, S32 pY, MASK pMask)
{
BOOL returnVal = FALSE;
- if (!mIsMiddleMouseButtonHeld && !mIsRightMouseButtonHeld && isAnyPathToolModKeys(pMask))
+ if (!mIsLeftMouseButtonHeld && !mIsMiddleMouseButtonHeld && !mIsRightMouseButtonHeld && !isAnyPathToolModKeys(pMask))
{
gViewerWindow->setCursor(UI_CURSOR_TOOLPATHFINDING);
+ }
+
+ if (!mIsMiddleMouseButtonHeld && !mIsRightMouseButtonHeld && isAnyPathToolModKeys(pMask))
+ {
+ if (isPointAModKeys(pMask))
+ {
+ gViewerWindow->setCursor(UI_CURSOR_TOOLPATHFINDING_PATH_START);
+ }
+ else if (isPointBModKeys(pMask))
+ {
+ gViewerWindow->setCursor(UI_CURSOR_TOOLPATHFINDING_PATH_END);
+ }
computeTempPoints(pX, pY, pMask);
returnVal = TRUE;
}
@@ -291,6 +321,11 @@ bool LLPathfindingPathTool::isPointBModKeys(MASK pMask) const
return ((pMask & MASK_SHIFT) != 0);
}
+bool LLPathfindingPathTool::isCameraModKeys(MASK pMask) const
+{
+ return ((pMask & MASK_ALT) != 0);
+}
+
void LLPathfindingPathTool::getRayPoints(S32 pX, S32 pY, LLVector3 &pRayStart, LLVector3 &pRayEnd) const
{
LLVector3 dv = gViewerWindow->mouseDirectionGlobal(pX, pY);
diff --git a/indra/newview/llpathfindingpathtool.h b/indra/newview/llpathfindingpathtool.h
index 671f5bef95..8a79da43c9 100644
--- a/indra/newview/llpathfindingpathtool.h
+++ b/indra/newview/llpathfindingpathtool.h
@@ -98,6 +98,7 @@ private:
bool isAnyPathToolModKeys(MASK pMask) const;
bool isPointAModKeys(MASK pMask) const;
bool isPointBModKeys(MASK pMask) const;
+ bool isCameraModKeys(MASK pMask) const;
void getRayPoints(S32 pX, S32 pY, LLVector3 &pRayStart, LLVector3 &pRayEnd) const;
void computeFinalPoints(S32 pX, S32 pY, MASK pMask);
diff --git a/indra/newview/res/lltoolpathfinding.cur b/indra/newview/res/lltoolpathfinding.cur
index 2df80de0a6..acf5184227 100644
--- a/indra/newview/res/lltoolpathfinding.cur
+++ b/indra/newview/res/lltoolpathfinding.cur
Binary files differ
diff --git a/indra/newview/res/lltoolpathfindingpathend.cur b/indra/newview/res/lltoolpathfindingpathend.cur
new file mode 100644
index 0000000000..6a1e007a67
--- /dev/null
+++ b/indra/newview/res/lltoolpathfindingpathend.cur
Binary files differ
diff --git a/indra/newview/res/lltoolpathfindingpathstart.cur b/indra/newview/res/lltoolpathfindingpathstart.cur
new file mode 100644
index 0000000000..4446c491c4
--- /dev/null
+++ b/indra/newview/res/lltoolpathfindingpathstart.cur
Binary files differ
diff --git a/indra/newview/res/viewerRes.rc b/indra/newview/res/viewerRes.rc
index 686de0e7d5..0b469c8d81 100644
--- a/indra/newview/res/viewerRes.rc
+++ b/indra/newview/res/viewerRes.rc
@@ -123,6 +123,8 @@ TOOLBUY CURSOR "toolbuy.cur"
TOOLOPEN CURSOR "toolopen.cur"
TOOLSIT CURSOR "toolsit.cur"
TOOLPATHFINDING CURSOR "lltoolpathfinding.cur"
+TOOLPATHFINDINGPATHSTART CURSOR "lltoolpathfindingpathstart.cur"
+TOOLPATHFINDINGPATHEND CURSOR "lltoolpathfindingpathend.cur"
TOOLNO CURSOR "llno.cur"
/////////////////////////////////////////////////////////////////////////////