diff options
author | Erik Kundiman <erik@megapahit.org> | 2024-07-27 15:17:57 +0800 |
---|---|---|
committer | Erik Kundiman <erik@megapahit.org> | 2024-07-28 08:24:59 +0800 |
commit | 96a81b5ecbe3bffb582ded930752c0523df5e80a (patch) | |
tree | a87a0bd09fd980562e88150dbfea3819d28d9f12 /indra/newview/llpathfindingpathtool.cpp | |
parent | 06e8f0c443c1ba7858d000c6d695b7e988e02053 (diff) | |
parent | ed73208eb96b862b97fa285036edea1e792ca3c6 (diff) |
Merge remote-tracking branch 'secondlife/release/2024.06-atlasaurus' into 2024.06-atlasaurus
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 |