diff options
Diffstat (limited to 'indra/newview/llpathfindingpathtool.cpp')
-rw-r--r-- | indra/newview/llpathfindingpathtool.cpp | 59 |
1 files changed, 28 insertions, 31 deletions
diff --git a/indra/newview/llpathfindingpathtool.cpp b/indra/newview/llpathfindingpathtool.cpp index a57283d5cd..61791492e7 100644 --- a/indra/newview/llpathfindingpathtool.cpp +++ b/indra/newview/llpathfindingpathtool.cpp @@ -35,9 +35,6 @@ #include "llagent.h" #include "llpathfindingmanager.h" -#include "llpathinglib.h" -#include "llsingleton.h" -#include "lltool.h" #include "llviewercamera.h" #include "llviewerregion.h" #include "llviewerwindow.h" @@ -63,9 +60,9 @@ LLPathfindingPathTool::~LLPathfindingPathTool() { } -BOOL LLPathfindingPathTool::handleMouseDown(S32 pX, S32 pY, MASK pMask) +bool LLPathfindingPathTool::handleMouseDown(S32 pX, S32 pY, MASK pMask) { - BOOL returnVal = FALSE; + bool returnVal = false; if (!mIsLeftMouseButtonHeld && !mIsMiddleMouseButtonHeld && !mIsRightMouseButtonHeld) { @@ -76,15 +73,15 @@ BOOL LLPathfindingPathTool::handleMouseDown(S32 pX, S32 pY, MASK pMask) : UI_CURSOR_TOOLPATHFINDING_PATH_END_ADD); computeFinalPoints(pX, pY, pMask); mIsLeftMouseButtonHeld = true; - setMouseCapture(TRUE); - returnVal = TRUE; + setMouseCapture(true); + returnVal = true; } else if (!isCameraModKeys(pMask)) { gViewerWindow->setCursor(UI_CURSOR_TOOLNO); mIsLeftMouseButtonHeld = true; - setMouseCapture(TRUE); - returnVal = TRUE; + setMouseCapture(true); + returnVal = true; } } mIsLeftMouseButtonHeld = true; @@ -92,69 +89,69 @@ BOOL LLPathfindingPathTool::handleMouseDown(S32 pX, S32 pY, MASK pMask) return returnVal; } -BOOL LLPathfindingPathTool::handleMouseUp(S32 pX, S32 pY, MASK pMask) +bool LLPathfindingPathTool::handleMouseUp(S32 pX, S32 pY, MASK pMask) { - BOOL returnVal = FALSE; + bool returnVal = false; if (mIsLeftMouseButtonHeld && !mIsMiddleMouseButtonHeld && !mIsRightMouseButtonHeld) { computeFinalPoints(pX, pY, pMask); - setMouseCapture(FALSE); - returnVal = TRUE; + setMouseCapture(false); + returnVal = true; } mIsLeftMouseButtonHeld = false; return returnVal; } -BOOL LLPathfindingPathTool::handleMiddleMouseDown(S32 pX, S32 pY, MASK pMask) +bool LLPathfindingPathTool::handleMiddleMouseDown(S32 pX, S32 pY, MASK pMask) { - setMouseCapture(TRUE); + setMouseCapture(true); mIsMiddleMouseButtonHeld = true; gViewerWindow->setCursor(UI_CURSOR_TOOLNO); - return TRUE; + return true; } -BOOL LLPathfindingPathTool::handleMiddleMouseUp(S32 pX, S32 pY, MASK pMask) +bool LLPathfindingPathTool::handleMiddleMouseUp(S32 pX, S32 pY, MASK pMask) { if (!mIsLeftMouseButtonHeld && mIsMiddleMouseButtonHeld && !mIsRightMouseButtonHeld) { - setMouseCapture(FALSE); + setMouseCapture(false); } mIsMiddleMouseButtonHeld = false; - return TRUE; + return true; } -BOOL LLPathfindingPathTool::handleRightMouseDown(S32 pX, S32 pY, MASK pMask) +bool LLPathfindingPathTool::handleRightMouseDown(S32 pX, S32 pY, MASK pMask) { - setMouseCapture(TRUE); + setMouseCapture(true); mIsRightMouseButtonHeld = true; gViewerWindow->setCursor(UI_CURSOR_TOOLNO); - return TRUE; + return true; } -BOOL LLPathfindingPathTool::handleRightMouseUp(S32 pX, S32 pY, MASK pMask) +bool LLPathfindingPathTool::handleRightMouseUp(S32 pX, S32 pY, MASK pMask) { if (!mIsLeftMouseButtonHeld && !mIsMiddleMouseButtonHeld && mIsRightMouseButtonHeld) { - setMouseCapture(FALSE); + setMouseCapture(false); } mIsRightMouseButtonHeld = false; - return TRUE; + return true; } -BOOL LLPathfindingPathTool::handleDoubleClick(S32 pX, S32 pY, MASK pMask) +bool LLPathfindingPathTool::handleDoubleClick(S32 pX, S32 pY, MASK pMask) { - return TRUE; + return true; } -BOOL LLPathfindingPathTool::handleHover(S32 pX, S32 pY, MASK pMask) +bool LLPathfindingPathTool::handleHover(S32 pX, S32 pY, MASK pMask) { - BOOL returnVal = FALSE; + bool returnVal = false; if (!mIsLeftMouseButtonHeld && !mIsMiddleMouseButtonHeld && !mIsRightMouseButtonHeld && !isAnyPathToolModKeys(pMask)) { @@ -167,7 +164,7 @@ BOOL LLPathfindingPathTool::handleHover(S32 pX, S32 pY, MASK pMask) ? (mIsLeftMouseButtonHeld ? UI_CURSOR_TOOLPATHFINDING_PATH_START_ADD : UI_CURSOR_TOOLPATHFINDING_PATH_START) : (mIsLeftMouseButtonHeld ? UI_CURSOR_TOOLPATHFINDING_PATH_END_ADD : UI_CURSOR_TOOLPATHFINDING_PATH_END)); computeTempPoints(pX, pY, pMask); - returnVal = TRUE; + returnVal = true; } else { @@ -178,7 +175,7 @@ BOOL LLPathfindingPathTool::handleHover(S32 pX, S32 pY, MASK pMask) return returnVal; } -BOOL LLPathfindingPathTool::handleKey(KEY pKey, MASK pMask) +bool LLPathfindingPathTool::handleKey(KEY pKey, MASK pMask) { // Eat the escape key or else the camera tool will pick up and reset to default view. This, // in turn, will cause some other methods to get called. And one of those methods will reset |