summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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/llfloaterpathfindingobjects.cpp56
-rw-r--r--indra/newview/llfloaterpathfindingobjects.h3
-rw-r--r--indra/newview/llpathfindingpathtool.cpp22
-rw-r--r--indra/newview/res/lltoolpathfinding.curbin4286 -> 2238 bytes
-rw-r--r--indra/newview/res/lltoolpathfindingpathend.curbin4286 -> 2238 bytes
-rw-r--r--indra/newview/res/lltoolpathfindingpathendadd.curbin0 -> 2238 bytes
-rw-r--r--indra/newview/res/lltoolpathfindingpathstart.curbin4286 -> 2238 bytes
-rw-r--r--indra/newview/res/lltoolpathfindingpathstartadd.curbin0 -> 2238 bytes
-rw-r--r--indra/newview/res/viewerRes.rc4
-rw-r--r--indra/newview/skins/default/xui/en/floater_pathfinding_characters.xml24
-rw-r--r--indra/newview/skins/default/xui/en/floater_pathfinding_linksets.xml22
-rw-r--r--indra/newview/skins/default/xui/en/notifications.xml28
16 files changed, 122 insertions, 45 deletions
diff --git a/indra/llcommon/llcursortypes.cpp b/indra/llcommon/llcursortypes.cpp
index c0676f8c13..ec60097195 100644
--- a/indra/llcommon/llcursortypes.cpp
+++ b/indra/llcommon/llcursortypes.cpp
@@ -71,7 +71,9 @@ ECursorType getCursorFromString(const std::string& cursor_string)
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_TOOLPATHFINDINGPATHSTARTADD"] = UI_CURSOR_TOOLPATHFINDING_PATH_START_ADD;
cursor_string_table["UI_CURSOR_TOOLPATHFINDINGPATHEND"] = UI_CURSOR_TOOLPATHFINDING_PATH_END;
+ cursor_string_table["UI_CURSOR_TOOLPATHFINDINGPATHENDADD"] = UI_CURSOR_TOOLPATHFINDING_PATH_END_ADD;
cursor_string_table["UI_CURSOR_TOOLNO"] = UI_CURSOR_TOOLNO;
}
diff --git a/indra/llcommon/llcursortypes.h b/indra/llcommon/llcursortypes.h
index f47a328f77..cb6d6636a0 100644
--- a/indra/llcommon/llcursortypes.h
+++ b/indra/llcommon/llcursortypes.h
@@ -67,7 +67,9 @@ enum ECursorType {
UI_CURSOR_TOOLOPEN,
UI_CURSOR_TOOLPATHFINDING,
UI_CURSOR_TOOLPATHFINDING_PATH_START,
+ UI_CURSOR_TOOLPATHFINDING_PATH_START_ADD,
UI_CURSOR_TOOLPATHFINDING_PATH_END,
+ UI_CURSOR_TOOLPATHFINDING_PATH_END_ADD,
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 5f637bc6f1..be0f8bc7af 100644
--- a/indra/llwindow/llwindowwin32.cpp
+++ b/indra/llwindow/llwindowwin32.cpp
@@ -1699,8 +1699,10 @@ 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_ADD ] = LoadCursor(module, TEXT("TOOLPATHFINDINGPATHSTARTADD"));
mCursor[ UI_CURSOR_TOOLPATHFINDING_PATH_START ] = LoadCursor(module, TEXT("TOOLPATHFINDINGPATHSTART"));
mCursor[ UI_CURSOR_TOOLPATHFINDING_PATH_END ] = LoadCursor(module, TEXT("TOOLPATHFINDINGPATHEND"));
+ mCursor[ UI_CURSOR_TOOLPATHFINDING_PATH_END_ADD ] = LoadCursor(module, TEXT("TOOLPATHFINDINGPATHENDADD"));
mCursor[ UI_CURSOR_TOOLNO ] = LoadCursor(module, TEXT("TOOLNO"));
// Color cursors
diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt
index 6358464fb0..ac0b0c0351 100644
--- a/indra/newview/CMakeLists.txt
+++ b/indra/newview/CMakeLists.txt
@@ -1342,7 +1342,9 @@ if (WINDOWS)
res/lltoolpan.cur
res/lltoolpathfinding.cur
res/lltoolpathfindingpathend.cur
+ res/lltoolpathfindingpathendadd.cur
res/lltoolpathfindingpathstart.cur
+ res/lltoolpathfindingpathstartadd.cur
res/lltoolpipette.cur
res/lltoolrotate.cur
res/lltoolscale.cur
diff --git a/indra/newview/llfloaterpathfindingobjects.cpp b/indra/newview/llfloaterpathfindingobjects.cpp
index cd6d0851b9..ea93955a5c 100644
--- a/indra/newview/llfloaterpathfindingobjects.cpp
+++ b/indra/newview/llfloaterpathfindingobjects.cpp
@@ -41,6 +41,8 @@
#include "llcheckboxctrl.h"
#include "llenvmanager.h"
#include "llfloater.h"
+#include "llnotifications.h"
+#include "llnotificationsutil.h"
#include "llpathfindingmanager.h"
#include "llresmgr.h"
#include "llscrolllistctrl.h"
@@ -581,14 +583,42 @@ void LLFloaterPathfindingObjects::onTakeCopyClicked()
void LLFloaterPathfindingObjects::onReturnClicked()
{
- handle_object_return();
- requestGetObjects();
+ LLNotification::Params params("PathfindingReturnMultipleItems");
+ params.functor.function(boost::bind(&LLFloaterPathfindingObjects::handleReturnItemsResponse, this, _1, _2));
+
+ LLSD substitutions;
+ int numItems = getNumSelectedObjects();
+ substitutions["NUM_ITEMS"] = static_cast<LLSD::Integer>(numItems);
+ params.substitutions = substitutions;
+
+ if (numItems == 1)
+ {
+ LLNotifications::getInstance()->forceResponse(params, 0);
+ }
+ else if (numItems > 1)
+ {
+ LLNotifications::getInstance()->add(params);
+ }
}
void LLFloaterPathfindingObjects::onDeleteClicked()
{
- handle_object_delete();
- requestGetObjects();
+ LLNotification::Params params("PathfindingDeleteMultipleItems");
+ params.functor.function(boost::bind(&LLFloaterPathfindingObjects::handleDeleteItemsResponse, this, _1, _2));
+
+ LLSD substitutions;
+ int numItems = getNumSelectedObjects();
+ substitutions["NUM_ITEMS"] = static_cast<LLSD::Integer>(numItems);
+ params.substitutions = substitutions;
+
+ if (numItems == 1)
+ {
+ LLNotifications::getInstance()->forceResponse(params, 0);
+ }
+ else if (numItems > 1)
+ {
+ LLNotifications::getInstance()->add(params);
+ }
}
void LLFloaterPathfindingObjects::onTeleportClicked()
@@ -768,6 +798,24 @@ void LLFloaterPathfindingObjects::selectScrollListItemsInWorld()
}
}
+void LLFloaterPathfindingObjects::handleReturnItemsResponse(const LLSD &pNotification, const LLSD &pResponse)
+{
+ if (LLNotificationsUtil::getSelectedOption(pNotification, pResponse) == 0)
+ {
+ handle_object_return();
+ requestGetObjects();
+ }
+}
+
+void LLFloaterPathfindingObjects::handleDeleteItemsResponse(const LLSD &pNotification, const LLSD &pResponse)
+{
+ if (LLNotificationsUtil::getSelectedOption(pNotification, pResponse) == 0)
+ {
+ handle_object_delete();
+ requestGetObjects();
+ }
+}
+
LLPathfindingObjectPtr LLFloaterPathfindingObjects::findObject(const LLScrollListItem *pListItem) const
{
LLPathfindingObjectPtr objectPtr;
diff --git a/indra/newview/llfloaterpathfindingobjects.h b/indra/newview/llfloaterpathfindingobjects.h
index 6d5d6d24b2..84b0f3f3fe 100644
--- a/indra/newview/llfloaterpathfindingobjects.h
+++ b/indra/newview/llfloaterpathfindingobjects.h
@@ -132,6 +132,9 @@ private:
void updateStateOnActionControls();
void selectScrollListItemsInWorld();
+ void handleReturnItemsResponse(const LLSD &pNotification, const LLSD &pResponse);
+ void handleDeleteItemsResponse(const LLSD &pNotification, const LLSD &pResponse);
+
LLPathfindingObjectPtr findObject(const LLScrollListItem *pListItem) const;
LLScrollListCtrl *mObjectsScrollList;
diff --git a/indra/newview/llpathfindingpathtool.cpp b/indra/newview/llpathfindingpathtool.cpp
index 82426920d8..6cf90addab 100644
--- a/indra/newview/llpathfindingpathtool.cpp
+++ b/indra/newview/llpathfindingpathtool.cpp
@@ -70,14 +70,9 @@ BOOL LLPathfindingPathTool::handleMouseDown(S32 pX, S32 pY, MASK pMask)
{
if (isAnyPathToolModKeys(pMask))
{
- if (isPointAModKeys(pMask))
- {
- gViewerWindow->setCursor(UI_CURSOR_TOOLPATHFINDING_PATH_START);
- }
- else if (isPointBModKeys(pMask))
- {
- gViewerWindow->setCursor(UI_CURSOR_TOOLPATHFINDING_PATH_END);
- }
+ gViewerWindow->setCursor(isPointAModKeys(pMask)
+ ? UI_CURSOR_TOOLPATHFINDING_PATH_START_ADD
+ : UI_CURSOR_TOOLPATHFINDING_PATH_END_ADD);
computeFinalPoints(pX, pY, pMask);
mIsLeftMouseButtonHeld = true;
setMouseCapture(TRUE);
@@ -167,14 +162,9 @@ BOOL LLPathfindingPathTool::handleHover(S32 pX, S32 pY, MASK pMask)
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);
- }
+ gViewerWindow->setCursor(isPointAModKeys(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;
}
diff --git a/indra/newview/res/lltoolpathfinding.cur b/indra/newview/res/lltoolpathfinding.cur
index 40c5a40905..2aba2daa45 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
index df8d56d205..e951a6956b 100644
--- a/indra/newview/res/lltoolpathfindingpathend.cur
+++ b/indra/newview/res/lltoolpathfindingpathend.cur
Binary files differ
diff --git a/indra/newview/res/lltoolpathfindingpathendadd.cur b/indra/newview/res/lltoolpathfindingpathendadd.cur
new file mode 100644
index 0000000000..0bf3201b23
--- /dev/null
+++ b/indra/newview/res/lltoolpathfindingpathendadd.cur
Binary files differ
diff --git a/indra/newview/res/lltoolpathfindingpathstart.cur b/indra/newview/res/lltoolpathfindingpathstart.cur
index 5c38bb6c00..fecc716990 100644
--- a/indra/newview/res/lltoolpathfindingpathstart.cur
+++ b/indra/newview/res/lltoolpathfindingpathstart.cur
Binary files differ
diff --git a/indra/newview/res/lltoolpathfindingpathstartadd.cur b/indra/newview/res/lltoolpathfindingpathstartadd.cur
new file mode 100644
index 0000000000..45e23e5161
--- /dev/null
+++ b/indra/newview/res/lltoolpathfindingpathstartadd.cur
Binary files differ
diff --git a/indra/newview/res/viewerRes.rc b/indra/newview/res/viewerRes.rc
index 0b469c8d81..df75f3f697 100644
--- a/indra/newview/res/viewerRes.rc
+++ b/indra/newview/res/viewerRes.rc
@@ -124,7 +124,9 @@ TOOLOPEN CURSOR "toolopen.cur"
TOOLSIT CURSOR "toolsit.cur"
TOOLPATHFINDING CURSOR "lltoolpathfinding.cur"
TOOLPATHFINDINGPATHSTART CURSOR "lltoolpathfindingpathstart.cur"
-TOOLPATHFINDINGPATHEND CURSOR "lltoolpathfindingpathend.cur"
+TOOLPATHFINDINGPATHSTARTADD CURSOR "lltoolpathfindingpathstartadd.cur"
+TOOLPATHFINDINGPATHEND CURSOR "lltoolpathfindingpathend.cur"
+TOOLPATHFINDINGPATHENDADD CURSOR "lltoolpathfindingpathendadd.cur"
TOOLNO CURSOR "llno.cur"
/////////////////////////////////////////////////////////////////////////////
diff --git a/indra/newview/skins/default/xui/en/floater_pathfinding_characters.xml b/indra/newview/skins/default/xui/en/floater_pathfinding_characters.xml
index a267902b94..c1f1f60c1b 100644
--- a/indra/newview/skins/default/xui/en/floater_pathfinding_characters.xml
+++ b/indra/newview/skins/default/xui/en/floater_pathfinding_characters.xml
@@ -179,14 +179,24 @@
<button
follows="left|bottom"
height="22"
+ label="Teleport me to it"
+ layout="topleft"
+ name="teleport_me_to_object"
+ tool_tip="Enabled only when one character is selected."
+ top_pad="-22"
+ left_pad="26"
+ width="159"/>
+ <button
+ follows="right|bottom"
+ height="22"
label="Return"
layout="topleft"
name="return_objects"
top_pad="-22"
- left_pad="6"
+ left_pad="26"
width="94"/>
<button
- follows="left|bottom"
+ follows="right|bottom"
height="22"
label="Delete"
layout="topleft"
@@ -194,15 +204,5 @@
top_pad="-22"
left_pad="6"
width="94"/>
- <button
- follows="left|bottom"
- height="22"
- label="Teleport me to it"
- layout="topleft"
- name="teleport_me_to_object"
- tool_tip="Enabled only when one character is selected."
- top_pad="-22"
- left_pad="6"
- width="159"/>
</panel>
</floater>
diff --git a/indra/newview/skins/default/xui/en/floater_pathfinding_linksets.xml b/indra/newview/skins/default/xui/en/floater_pathfinding_linksets.xml
index 3e718743dc..833e5489ba 100644
--- a/indra/newview/skins/default/xui/en/floater_pathfinding_linksets.xml
+++ b/indra/newview/skins/default/xui/en/floater_pathfinding_linksets.xml
@@ -322,14 +322,23 @@
<button
follows="left|bottom"
height="21"
+ label="Teleport me to it"
+ layout="topleft"
+ name="teleport_me_to_object"
+ top_pad="-21"
+ left_pad="206"
+ width="160"/>
+ <button
+ follows="right|bottom"
+ height="21"
label="Return"
layout="topleft"
name="return_objects"
top_pad="-21"
- left_pad="6"
+ left_pad="220"
width="95"/>
<button
- follows="left|bottom"
+ follows="right|bottom"
height="21"
label="Delete"
layout="topleft"
@@ -337,15 +346,6 @@
top_pad="-21"
left_pad="6"
width="95"/>
- <button
- follows="left|bottom"
- height="21"
- label="Teleport me to it"
- layout="topleft"
- name="teleport_me_to_object"
- top_pad="-21"
- left_pad="6"
- width="160"/>
</panel>
<view_border
bevel_style="none"
diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml
index 922ddcedd8..d4e0d16821 100644
--- a/indra/newview/skins/default/xui/en/notifications.xml
+++ b/indra/newview/skins/default/xui/en/notifications.xml
@@ -7861,5 +7861,31 @@ Disabling future updates for this file.
Attempted to add an invalid or unreadable image file [FNAME] which could not be opened or decoded.
Attempt cancelled.
</notification>
-
+
+ <notification
+ icon="alertmodal.tga"
+ name="PathfindingReturnMultipleItems"
+ type="alertmodal">
+ You are returning [NUM_ITEMS] items. Are you sure you want to continue?
+ <tag>confirm</tag>
+ <usetemplate
+ ignoretext="Are you sure you want to return multiple items?"
+ name="okcancelignore"
+ notext="No"
+ yestext="Yes"/>
+ </notification>
+
+ <notification
+ icon="alertmodal.tga"
+ name="PathfindingDeleteMultipleItems"
+ type="alertmodal">
+ You are deleting [NUM_ITEMS] items. Are you sure you want to continue?
+ <tag>confirm</tag>
+ <usetemplate
+ ignoretext="Are you sure you want to delete multiple items?"
+ name="okcancelignore"
+ notext="No"
+ yestext="Yes"/>
+ </notification>
+
</notifications>