Compare commits
19 Commits
sv-1.8.7.8
...
sv-1.8.7.8
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
90e6afe159 | ||
|
|
3209507b6c | ||
|
|
fa97d8497a | ||
|
|
a687273d57 | ||
|
|
28f13b806c | ||
|
|
f1342d7bb8 | ||
|
|
c3428c6d57 | ||
|
|
0efddbd9ff | ||
|
|
be0aba4bfa | ||
|
|
c3f03b6bbf | ||
|
|
e15839a2cb | ||
|
|
e0efbd7d26 | ||
|
|
8e57288819 | ||
|
|
107f512545 | ||
|
|
14dc348179 | ||
|
|
eccbd98d79 | ||
|
|
a5115aa69e | ||
|
|
327574db7c | ||
|
|
8b4a29cbd3 |
@@ -26,12 +26,13 @@ const std::array<const std::string, LFIDBearer::COUNT> LFIDBearer::sMenuStrings
|
||||
{
|
||||
"menu_avs_list.xml" // 0
|
||||
, "menu_groups_list.xml" // 1
|
||||
, "menu_objects_list.xml" // 2 // Singu TODO
|
||||
, "menu_objects_list.xml" // 2
|
||||
};
|
||||
std::array<LLMenuGL*, LFIDBearer::COUNT> LFIDBearer::sMenus {};
|
||||
|
||||
const LFIDBearer* LFIDBearer::sActive = nullptr;
|
||||
LFIDBearer::Type LFIDBearer::sActiveType = LFIDBearer::AVATAR;
|
||||
uuid_vec_t LFIDBearer::sActiveIDs {};
|
||||
|
||||
void LFIDBearer::buildMenus()
|
||||
{
|
||||
|
||||
@@ -40,19 +40,19 @@ struct LFIDBearer
|
||||
virtual ~LFIDBearer() { if (sActive == this) sActive = nullptr; }
|
||||
virtual LLUUID getStringUUIDSelectedItem() const = 0;
|
||||
virtual uuid_vec_t getSelectedIDs() const { return { getStringUUIDSelectedItem() }; }
|
||||
virtual S32 getNumSelected() const { return getStringUUIDSelectedItem().notNull(); }
|
||||
virtual Type getSelectedType() const { return AVATAR; }
|
||||
|
||||
template<typename T> static const T* getActive() { return static_cast<const T*>(sActive); }
|
||||
static LLUUID getActiveSelectedID() { return sActive->getStringUUIDSelectedItem(); }
|
||||
static uuid_vec_t getActiveSelectedIDs() { return sActive->getSelectedIDs(); }
|
||||
static S32 getActiveNumSelected() { return sActive->getNumSelected(); }
|
||||
static const LLUUID& getActiveSelectedID() { return sActiveIDs.empty() ? LLUUID::null : sActiveIDs[0]; }
|
||||
static const uuid_vec_t& getActiveSelectedIDs() { return sActiveIDs; }
|
||||
static size_t getActiveNumSelected() { return sActiveIDs.size(); }
|
||||
static const Type& getActiveType() { return sActiveType; }
|
||||
|
||||
void setActive() const
|
||||
{
|
||||
sActive = this;
|
||||
sActiveType = getSelectedType();
|
||||
sActiveIDs = getSelectedIDs();
|
||||
//sActiveIDs or even some kinda hybrid map, if Type is MULTIPLE fill the vals? and remove a buncha virtual functions?
|
||||
}
|
||||
|
||||
@@ -68,4 +68,5 @@ protected:
|
||||
private:
|
||||
static const LFIDBearer* sActive;
|
||||
static Type sActiveType;
|
||||
static uuid_vec_t sActiveIDs;
|
||||
};
|
||||
|
||||
@@ -2712,39 +2712,20 @@ void LLScrollListCtrl::setScrollListParameters(LLXMLNodePtr node)
|
||||
node->getAttributeString("menu_file", menu);
|
||||
if (!menu.empty()) setContextMenu(menu);
|
||||
}
|
||||
}
|
||||
|
||||
// static
|
||||
LLView* LLScrollListCtrl::fromXML(LLXMLNodePtr node, LLView *parent, LLUICtrlFactory *factory)
|
||||
{
|
||||
LLRect rect;
|
||||
createRect(node, rect, parent, LLRect());
|
||||
|
||||
BOOL multi_select = false;
|
||||
node->getAttributeBOOL("multi_select", multi_select);
|
||||
BOOL draw_border = true;
|
||||
node->getAttributeBOOL("draw_border", draw_border);
|
||||
BOOL draw_heading = false;
|
||||
node->getAttributeBOOL("draw_heading", draw_heading);
|
||||
S32 search_column = 0;
|
||||
node->getAttributeS32("search_column", search_column);
|
||||
S32 sort_column = -1;
|
||||
node->getAttributeS32("sort_column", sort_column);
|
||||
BOOL sort_ascending = true;
|
||||
node->getAttributeBOOL("sort_ascending", sort_ascending);
|
||||
|
||||
LLScrollListCtrl* scroll_list = new LLScrollListCtrl("scroll_list", rect, NULL, multi_select, draw_border, draw_heading);
|
||||
|
||||
if (node->hasAttribute("heading_height"))
|
||||
{
|
||||
S32 heading_height;
|
||||
node->getAttributeS32("heading_height", heading_height);
|
||||
scroll_list->setHeadingHeight(heading_height);
|
||||
setHeadingHeight(heading_height);
|
||||
}
|
||||
|
||||
scroll_list->setScrollListParameters(node);
|
||||
scroll_list->initFromXML(node, parent);
|
||||
scroll_list->setSearchColumn(search_column);
|
||||
S32 search_column = 0;
|
||||
node->getAttributeS32("search_column", search_column);
|
||||
BOOL sort_ascending = true;
|
||||
node->getAttributeBOOL("sort_ascending", sort_ascending);
|
||||
|
||||
setSearchColumn(search_column);
|
||||
|
||||
LLSD columns;
|
||||
S32 index = 0;
|
||||
@@ -2755,7 +2736,7 @@ LLView* LLScrollListCtrl::fromXML(LLXMLNodePtr node, LLView *parent, LLUICtrlFac
|
||||
{
|
||||
if (child->hasName("column") || child->hasName("columns") || child->hasName(kidcolumn) || child->hasName(kidcolumns))
|
||||
{
|
||||
std::string labelname("");
|
||||
std::string labelname;
|
||||
if (child->getAttributeString("label", labelname))
|
||||
columns[index]["label"] = labelname;
|
||||
else if (child->getAttributeString("image", labelname))
|
||||
@@ -2778,9 +2759,9 @@ LLView* LLScrollListCtrl::fromXML(LLXMLNodePtr node, LLView *parent, LLUICtrlFac
|
||||
}
|
||||
else // Singu Note: if a scroll list does not provide sort_direction, provide sort_ascending to sort as expected
|
||||
{
|
||||
bool sort_ascending = true;
|
||||
child->getAttribute_bool("sort_ascending", sort_ascending);
|
||||
columns[index]["sort_ascending"] = sort_ascending;
|
||||
bool col_sort_ascending = sort_ascending;
|
||||
child->getAttribute_bool("sort_ascending", col_sort_ascending);
|
||||
columns[index]["sort_ascending"] = col_sort_ascending;
|
||||
}
|
||||
|
||||
S32 columnwidth = -1;
|
||||
@@ -2806,12 +2787,7 @@ LLView* LLScrollListCtrl::fromXML(LLXMLNodePtr node, LLView *parent, LLUICtrlFac
|
||||
++index;
|
||||
}
|
||||
}
|
||||
scroll_list->setColumnHeadings(columns);
|
||||
|
||||
if (sort_column >= 0)
|
||||
{
|
||||
scroll_list->sortByColumnIndex(sort_column, sort_ascending);
|
||||
}
|
||||
setColumnHeadings(columns);
|
||||
|
||||
const std::string kidrow(nodename + "row");
|
||||
const std::string kidrows(nodename + "rows");
|
||||
@@ -2856,18 +2832,46 @@ LLView* LLScrollListCtrl::fromXML(LLXMLNodePtr node, LLView *parent, LLUICtrlFac
|
||||
}
|
||||
}
|
||||
if(explicit_column)
|
||||
scroll_list->addElement(row);
|
||||
addElement(row);
|
||||
else
|
||||
{
|
||||
LLSD entry_id;
|
||||
if(id_found)
|
||||
entry_id = id;
|
||||
scroll_list->addSimpleElement(value,ADD_BOTTOM,entry_id);
|
||||
addSimpleElement(value,ADD_BOTTOM,entry_id);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
scroll_list->setCommentText(node->getTextContents());
|
||||
S32 sort_column = -1;
|
||||
node->getAttributeS32("sort_column", sort_column);
|
||||
if (sort_column >= 0)
|
||||
{
|
||||
sortByColumnIndex(sort_column, sort_ascending);
|
||||
}
|
||||
|
||||
setCommentText(node->getTextContents());
|
||||
}
|
||||
|
||||
// static
|
||||
LLView* LLScrollListCtrl::fromXML(LLXMLNodePtr node, LLView *parent, LLUICtrlFactory *factory)
|
||||
{
|
||||
LLRect rect;
|
||||
createRect(node, rect, parent, LLRect());
|
||||
|
||||
BOOL multi_select = false;
|
||||
node->getAttributeBOOL("multi_select", multi_select);
|
||||
|
||||
BOOL draw_border = true;
|
||||
node->getAttributeBOOL("draw_border", draw_border);
|
||||
|
||||
BOOL draw_heading = false;
|
||||
node->getAttributeBOOL("draw_heading", draw_heading);
|
||||
|
||||
LLScrollListCtrl* scroll_list = new LLScrollListCtrl("scroll_list", rect, NULL, multi_select, draw_border, draw_heading);
|
||||
|
||||
scroll_list->setScrollListParameters(node);
|
||||
scroll_list->initFromXML(node, parent);
|
||||
return scroll_list;
|
||||
}
|
||||
|
||||
|
||||
@@ -202,7 +202,7 @@ public:
|
||||
virtual S32 getFirstSelectedIndex() const;
|
||||
std::vector<LLScrollListItem*> getAllSelected() const;
|
||||
uuid_vec_t getSelectedIDs() const override final; //Helper. Much like getAllSelected, but just provides a LLUUID vec
|
||||
S32 getNumSelected() const override final;
|
||||
S32 getNumSelected() const;
|
||||
LLScrollListItem* getLastSelectedItem() const { return mLastSelected; }
|
||||
|
||||
// iterate over all items
|
||||
|
||||
@@ -1730,6 +1730,15 @@ void LLAgent::stopAutoPilot(BOOL user_cancel)
|
||||
mAutoPilotFinishedCallback(!user_cancel && dist_vec_squared(gAgent.getPositionGlobal(), mAutoPilotTargetGlobal) < (mAutoPilotStopDistance * mAutoPilotStopDistance), mAutoPilotCallbackData);
|
||||
mAutoPilotFinishedCallback = NULL;
|
||||
}
|
||||
|
||||
// Sit response during follow pilot, now complete, resume follow
|
||||
if (!user_cancel && mAutoPilotBehaviorName == "Sit" && mLeaderID.notNull())
|
||||
{
|
||||
mAutoPilotBehaviorName = "Follow";
|
||||
mAutoPilot = true;
|
||||
return;
|
||||
}
|
||||
|
||||
mLeaderID = LLUUID::null;
|
||||
mAutoPilotNoProgressFrameCount = 0;
|
||||
|
||||
@@ -1741,6 +1750,8 @@ void LLAgent::stopAutoPilot(BOOL user_cancel)
|
||||
LLNotificationsUtil::add("CancelledSit");
|
||||
else if (mAutoPilotBehaviorName == "Attach")
|
||||
LLNotificationsUtil::add("CancelledAttach");
|
||||
else if (mAutoPilotBehaviorName == "Follow")
|
||||
LLNotificationsUtil::add("CancelledFollow");
|
||||
else
|
||||
LLNotificationsUtil::add("Cancelled");
|
||||
}
|
||||
@@ -1754,16 +1765,56 @@ void LLAgent::stopAutoPilot(BOOL user_cancel)
|
||||
//-----------------------------------------------------------------------------
|
||||
void LLAgent::autoPilot(F32 *delta_yaw)
|
||||
{
|
||||
if (mAutoPilot)
|
||||
if (mAutoPilot && isAgentAvatarValid())
|
||||
{
|
||||
bool follow = !mLeaderID.isNull(); //mAutoPilotBehaviorName == "Follow";
|
||||
U8 follow = mLeaderID.notNull(); //mAutoPilotBehaviorName == "Follow";
|
||||
if (follow)
|
||||
{
|
||||
if (auto object = gObjectList.findObject(mLeaderID))
|
||||
{
|
||||
mAutoPilotTargetGlobal = object->getPositionGlobal();
|
||||
if (const auto& av = object->asAvatar()) // Fly if avatar target is flying
|
||||
{
|
||||
setFlying(av->mInAir);
|
||||
if (av->isSitting())
|
||||
{
|
||||
if (!rlv_handler_t::isEnabled() || !gRlvHandler.hasBehaviour(RLV_BHVR_SIT))
|
||||
{
|
||||
if (auto seat = av->getParent())
|
||||
{
|
||||
mAutoPilotNoProgressFrameCount = 0; // Ground Sit may have incremented this, reset it
|
||||
if (gAgentAvatarp->getParent() != seat)
|
||||
{
|
||||
void handle_object_sit(LLViewerObject*, const LLVector3&);
|
||||
handle_object_sit(static_cast<LLViewerObject*>(seat), LLVector3::zero);
|
||||
}
|
||||
return; // If sitting, we won't be moving, exit here
|
||||
}
|
||||
else // Ground sit, but only if near enough
|
||||
{
|
||||
if (dist_vec(av->getPositionAgent(), getPositionAgent()) <= mAutoPilotStopDistance) // We're close enough, sit.
|
||||
{
|
||||
if (!gAgentAvatarp->isSittingAvatarOnGround())
|
||||
setControlFlags(AGENT_CONTROL_SIT_ON_GROUND);
|
||||
mAutoPilotNoProgressFrameCount = 0; // Ground Sit may have incremented this, reset it now
|
||||
return; // We're already sitting on the ground, we have nothing to do
|
||||
}
|
||||
else // We're not close enough yet
|
||||
{
|
||||
if (/*!gAgentAvatarp->isSitting() && */ // RLV takes care of sitting check for us inside standUp
|
||||
mAutoPilotNoProgressFrameCount <= AUTOPILOT_MAX_TIME_NO_PROGRESS * gFPSClamped) // Only stand up if we haven't exhausted our no progress frames
|
||||
standUp(); // Unsit if need be, so we can move
|
||||
follow = 2; // Indicate we want to groundsit
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (gAgentAvatarp->isSitting()) // Leader isn't sitting, standUp if needed
|
||||
{
|
||||
standUp();
|
||||
mAutoPilotNoProgressFrameCount = 0; // Ground Sit may have incremented this, reset it
|
||||
}
|
||||
}
|
||||
}
|
||||
else // We might still have a valid avatar pos
|
||||
{
|
||||
@@ -1775,14 +1826,19 @@ void LLAgent::autoPilot(F32 *delta_yaw)
|
||||
stopAutoPilot();
|
||||
return;
|
||||
}
|
||||
standUp(); // Leader not rendered, we mustn't be sitting
|
||||
mAutoPilotNoProgressFrameCount = 0; // Ground Sit may have incremented this, reset it
|
||||
mAutoPilotTargetGlobal = pos;
|
||||
// Should we fly if the height difference is great enough here? Altitude is often invalid...
|
||||
}
|
||||
}
|
||||
|
||||
if (!isAgentAvatarValid()) return;
|
||||
|
||||
if (!follow && gAgentAvatarp->mInAir && mAutoPilotAllowFlying)
|
||||
if (dist_vec(mAutoPilotTargetGlobal, getPositionGlobal()) <= mAutoPilotStopDistance)
|
||||
{
|
||||
follow = 3; // We're close enough, indicate no walking
|
||||
}
|
||||
}
|
||||
|
||||
if (follow % 2 == 0 && gAgentAvatarp->mInAir && mAutoPilotAllowFlying)
|
||||
{
|
||||
setFlying(TRUE);
|
||||
}
|
||||
@@ -1794,12 +1850,15 @@ void LLAgent::autoPilot(F32 *delta_yaw)
|
||||
|
||||
F32 target_dist = direction.magVec();
|
||||
|
||||
if (!follow && target_dist >= mAutoPilotTargetDist)
|
||||
if (follow % 2 == 0 && target_dist >= mAutoPilotTargetDist)
|
||||
{
|
||||
mAutoPilotNoProgressFrameCount++;
|
||||
if (mAutoPilotNoProgressFrameCount > AUTOPILOT_MAX_TIME_NO_PROGRESS * gFPSClamped)
|
||||
{
|
||||
stopAutoPilot();
|
||||
if (follow) // Well, we tried to reach them, let's just ground sit for now.
|
||||
setControlFlags(AGENT_CONTROL_SIT_ON_GROUND);
|
||||
else
|
||||
stopAutoPilot();
|
||||
return;
|
||||
}
|
||||
}
|
||||
@@ -1841,6 +1900,7 @@ void LLAgent::autoPilot(F32 *delta_yaw)
|
||||
}
|
||||
|
||||
*delta_yaw = yaw;
|
||||
if (follow == 3) return; // We're close enough, all we need to do is turn
|
||||
|
||||
// Compute when to start slowing down
|
||||
F32 slow_distance;
|
||||
|
||||
@@ -2287,7 +2287,9 @@ bool LLAppViewer::initConfiguration()
|
||||
LL_INFOS() << "Loading settings file list" << settings_file_list << LL_ENDL;
|
||||
if (0 == settings_control.loadFromFile(settings_file_list))
|
||||
{
|
||||
LL_ERRS() << "Cannot load default configuration file " << settings_file_list << LL_ENDL;
|
||||
OSMessageBox("Cannot load default configuration file " + settings_file_list + " The installation may be corrupted.",
|
||||
LLStringUtil::null,OSMB_OK);
|
||||
return false;
|
||||
}
|
||||
|
||||
mSettingsLocationList = settings_control.getLLSD("Locations");
|
||||
|
||||
@@ -569,6 +569,8 @@ LLMeshRepoThread::LLMeshRepoThread()
|
||||
mMutex = new LLMutex();
|
||||
mHeaderMutex = new LLMutex();
|
||||
mSignal = new LLCondition();
|
||||
mSkinInfoQMutex = new LLMutex();
|
||||
mDecompositionQMutex = new LLMutex();
|
||||
}
|
||||
|
||||
LLMeshRepoThread::~LLMeshRepoThread()
|
||||
@@ -579,6 +581,10 @@ LLMeshRepoThread::~LLMeshRepoThread()
|
||||
mHeaderMutex = NULL;
|
||||
delete mSignal;
|
||||
mSignal = NULL;
|
||||
delete mSkinInfoQMutex;
|
||||
mSkinInfoQMutex = NULL;
|
||||
delete mDecompositionQMutex;
|
||||
mDecompositionQMutex = NULL;
|
||||
}
|
||||
|
||||
bool LLMeshRepoThread::HeaderRequest::fetch(U32& count)
|
||||
@@ -1167,7 +1173,9 @@ bool LLMeshRepoThread::skinInfoReceived(const LLUUID& mesh_id, U8* data, S32 dat
|
||||
info.mMeshID = mesh_id;
|
||||
|
||||
//LL_INFOS() <<"info pelvis offset"<<info.mPelvisOffset<<LL_ENDL;
|
||||
mSkinInfoQMutex->lock();
|
||||
mSkinInfoQ.push(info);
|
||||
mSkinInfoQMutex->unlock();
|
||||
}
|
||||
|
||||
return true;
|
||||
@@ -1193,7 +1201,9 @@ bool LLMeshRepoThread::decompositionReceived(const LLUUID& mesh_id, U8* data, S3
|
||||
{
|
||||
LLModel::Decomposition* d = new LLModel::Decomposition(decomp);
|
||||
d->mMeshID = mesh_id;
|
||||
mDecompositionQMutex->lock();
|
||||
mDecompositionQ.push(d);
|
||||
mDecompositionQMutex->unlock();
|
||||
}
|
||||
|
||||
return true;
|
||||
@@ -1252,7 +1262,9 @@ bool LLMeshRepoThread::physicsShapeReceived(const LLUUID& mesh_id, U8* data, S32
|
||||
}
|
||||
}
|
||||
|
||||
mDecompositionQMutex->lock();
|
||||
mDecompositionQ.push(d);
|
||||
mDecompositionQMutex->unlock();
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -1862,14 +1874,22 @@ void LLMeshRepoThread::notifyLoadedMeshes()
|
||||
|
||||
while (!mSkinInfoQ.empty())
|
||||
{
|
||||
gMeshRepo.notifySkinInfoReceived(mSkinInfoQ.front());
|
||||
mSkinInfoQMutex->lock();
|
||||
auto req = mSkinInfoQ.front();
|
||||
mSkinInfoQ.pop();
|
||||
mSkinInfoQMutex->unlock();
|
||||
|
||||
gMeshRepo.notifySkinInfoReceived(req);
|
||||
}
|
||||
|
||||
while (!mDecompositionQ.empty())
|
||||
{
|
||||
gMeshRepo.notifyDecompositionReceived(mDecompositionQ.front());
|
||||
mDecompositionQMutex->lock();
|
||||
auto req = mDecompositionQ.front();
|
||||
mDecompositionQ.pop();
|
||||
mDecompositionQMutex->unlock();
|
||||
|
||||
gMeshRepo.notifyDecompositionReceived(req);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -265,6 +265,7 @@ public:
|
||||
|
||||
//queue of completed skin info requests
|
||||
std::queue<LLMeshSkinInfo> mSkinInfoQ;
|
||||
LLMutex* mSkinInfoQMutex;
|
||||
|
||||
//set of requested decompositions
|
||||
uuid_set_t mDecompositionRequests;
|
||||
@@ -274,6 +275,7 @@ public:
|
||||
|
||||
//queue of completed Decomposition info requests
|
||||
std::queue<LLModel::Decomposition*> mDecompositionQ;
|
||||
LLMutex* mDecompositionQMutex;
|
||||
|
||||
//queue of requested headers
|
||||
std::deque<std::pair<std::shared_ptr<MeshRequest>, F32> > mHeaderReqQ;
|
||||
|
||||
@@ -461,13 +461,13 @@ LLView* LLNameListCtrl::fromXML(LLXMLNodePtr node, LLView *parent, LLUICtrlFacto
|
||||
LLRect rect;
|
||||
createRect(node, rect, parent, LLRect());
|
||||
|
||||
BOOL multi_select = FALSE;
|
||||
BOOL multi_select = false;
|
||||
node->getAttributeBOOL("multi_select", multi_select);
|
||||
|
||||
BOOL draw_border = TRUE;
|
||||
BOOL draw_border = true;
|
||||
node->getAttributeBOOL("draw_border", draw_border);
|
||||
|
||||
BOOL draw_heading = FALSE;
|
||||
BOOL draw_heading = false;
|
||||
node->getAttributeBOOL("draw_heading", draw_heading);
|
||||
|
||||
S32 name_column_index = 0;
|
||||
@@ -494,108 +494,5 @@ LLView* LLNameListCtrl::fromXML(LLXMLNodePtr node, LLView *parent, LLUICtrlFacto
|
||||
|
||||
name_list->initFromXML(node, parent);
|
||||
|
||||
LLSD columns;
|
||||
S32 index = 0;
|
||||
LLXMLNodePtr child;
|
||||
for (child = node->getFirstChild(); child.notNull(); child = child->getNextSibling())
|
||||
{
|
||||
if (child->hasName("column"))
|
||||
{
|
||||
std::string labelname("");
|
||||
child->getAttributeString("label", labelname);
|
||||
|
||||
std::string columnname(labelname);
|
||||
child->getAttributeString("name", columnname);
|
||||
|
||||
std::string sortname(columnname);
|
||||
child->getAttributeString("sort", sortname);
|
||||
|
||||
if (child->hasAttribute("relative_width"))
|
||||
{
|
||||
F32 columnrelwidth = 0.f;
|
||||
child->getAttributeF32("relative_width", columnrelwidth);
|
||||
columns[index]["relative_width"] = columnrelwidth;
|
||||
}
|
||||
else if (child->hasAttribute("relwidth"))
|
||||
{
|
||||
F32 columnrelwidth = 0.f;
|
||||
child->getAttributeF32("relwidth", columnrelwidth);
|
||||
columns[index]["relative_width"] = columnrelwidth;
|
||||
}
|
||||
else if (child->hasAttribute("dynamic_width"))
|
||||
{
|
||||
BOOL columndynamicwidth = FALSE;
|
||||
child->getAttributeBOOL("dynamic_width", columndynamicwidth);
|
||||
columns[index]["dynamic_width"] = columndynamicwidth;
|
||||
}
|
||||
else if (child->hasAttribute("dynamicwidth"))
|
||||
{
|
||||
BOOL columndynamicwidth = FALSE;
|
||||
child->getAttributeBOOL("dynamicwidth", columndynamicwidth);
|
||||
columns[index]["dynamic_width"] = columndynamicwidth;
|
||||
}
|
||||
else
|
||||
{
|
||||
S32 columnwidth = -1;
|
||||
child->getAttributeS32("width", columnwidth);
|
||||
columns[index]["width"] = columnwidth;
|
||||
}
|
||||
|
||||
LLFontGL::HAlign h_align = LLFontGL::LEFT;
|
||||
h_align = LLView::selectFontHAlign(child);
|
||||
|
||||
columns[index]["name"] = columnname;
|
||||
columns[index]["label"] = labelname;
|
||||
columns[index]["halign"] = (S32)h_align;
|
||||
columns[index]["sort"] = sortname;
|
||||
|
||||
index++;
|
||||
}
|
||||
}
|
||||
name_list->setColumnHeadings(columns);
|
||||
|
||||
|
||||
for (child = node->getFirstChild(); child.notNull(); child = child->getNextSibling())
|
||||
{
|
||||
if (child->hasName("row"))
|
||||
{
|
||||
LLUUID id;
|
||||
child->getAttributeUUID("id", id);
|
||||
|
||||
LLSD row;
|
||||
|
||||
row["id"] = id;
|
||||
|
||||
S32 column_idx = 0;
|
||||
LLXMLNodePtr row_child;
|
||||
for (row_child = node->getFirstChild(); row_child.notNull(); row_child = row_child->getNextSibling())
|
||||
{
|
||||
if (row_child->hasName("column"))
|
||||
{
|
||||
std::string value = row_child->getTextContents();
|
||||
|
||||
std::string columnname("");
|
||||
row_child->getAttributeString("name", columnname);
|
||||
|
||||
std::string font("");
|
||||
row_child->getAttributeString("font", font);
|
||||
|
||||
std::string font_style("");
|
||||
row_child->getAttributeString("font-style", font_style);
|
||||
|
||||
row["columns"][column_idx]["column"] = columnname;
|
||||
row["columns"][column_idx]["value"] = value;
|
||||
row["columns"][column_idx]["font"] = font;
|
||||
row["columns"][column_idx]["font-style"] = font_style;
|
||||
column_idx++;
|
||||
}
|
||||
}
|
||||
name_list->addElement(row);
|
||||
}
|
||||
}
|
||||
|
||||
std::string contents = node->getTextContents();
|
||||
name_list->setCommentText(contents);
|
||||
|
||||
return name_list;
|
||||
}
|
||||
|
||||
@@ -47,7 +47,6 @@ struct LLNameUI : public LFIDBearer
|
||||
}
|
||||
|
||||
LLUUID getStringUUIDSelectedItem() const override final { return mNameID; }
|
||||
S32 getNumSelected() const override final { return 1; }
|
||||
Type getSelectedType() const override final { return mType; }
|
||||
|
||||
void setType(const Type& type);
|
||||
|
||||
@@ -70,7 +70,6 @@ public:
|
||||
|
||||
LLUUID getStringUUIDSelectedItem() const override final { return mClosestAgentAtLastRightClick; }
|
||||
uuid_vec_t getSelectedIDs() const override final { return mClosestAgentsAtLastClick; }
|
||||
S32 getNumSelected() const override final { return mClosestAgentsAtLastClick.size(); }
|
||||
|
||||
// [SL:KB] - Patch: World-MinimapOverlay | Checked: 2012-06-20 (Catznip-3.3.0)
|
||||
void refreshParcelOverlay() { mUpdateParcelImage = true; }
|
||||
|
||||
@@ -569,7 +569,7 @@ void LLToolPie::selectionPropertiesReceived()
|
||||
case CLICK_ACTION_PAY:
|
||||
if ( LLToolPie::getInstance()->mClickActionPayEnabled )
|
||||
{
|
||||
handle_give_money_dialog();
|
||||
handle_give_money_dialog(selected_object);
|
||||
}
|
||||
break;
|
||||
case CLICK_ACTION_OPEN:
|
||||
|
||||
@@ -2845,9 +2845,8 @@ class LLObjectPFLinksetsSelected : public view_listener_t
|
||||
|
||||
// </edit>
|
||||
|
||||
void handle_go_to(const LLVector3d& pos)
|
||||
void simulator_autopilot(const LLVector3d& pos)
|
||||
{
|
||||
// try simulator autopilot
|
||||
std::vector<std::string> strings;
|
||||
std::string val;
|
||||
val = llformat("%.9g", pos.mdV[VX]);
|
||||
@@ -2857,6 +2856,14 @@ void handle_go_to(const LLVector3d& pos)
|
||||
val = llformat("%.9g", pos.mdV[VZ]);
|
||||
strings.push_back(val);
|
||||
send_generic_message("autopilot", strings);
|
||||
}
|
||||
|
||||
void handle_go_to(const LLVector3d& pos)
|
||||
{
|
||||
gAgent.stopAutoPilot(true); // Go To cancels viewer autopilot
|
||||
|
||||
// try simulator autopilot
|
||||
simulator_autopilot(pos);
|
||||
|
||||
LLViewerParcelMgr::getInstance()->deselectLand();
|
||||
|
||||
@@ -3565,6 +3572,7 @@ class LLSelfSitOrStand : public view_listener_t
|
||||
{
|
||||
bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
|
||||
{
|
||||
gAgent.stopAutoPilot(true);
|
||||
if (gAgentAvatarp && gAgentAvatarp->isSitting())
|
||||
{
|
||||
gAgent.standUp();
|
||||
@@ -3867,28 +3875,14 @@ bool is_object_sittable()
|
||||
}
|
||||
|
||||
|
||||
// only works on pie menu
|
||||
void handle_object_sit_or_stand()
|
||||
void handle_object_sit(LLViewerObject* object, const LLVector3& offset = LLVector3::zero)
|
||||
{
|
||||
LLPickInfo pick = LLToolPie::getInstance()->getPick();
|
||||
LLViewerObject *object = pick.getObject();;
|
||||
if (!object || pick.mPickType == LLPickInfo::PICK_FLORA)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (sitting_on_selection())
|
||||
{
|
||||
gAgent.standUp();
|
||||
return;
|
||||
}
|
||||
|
||||
// get object selection offset
|
||||
|
||||
// if (object && object->getPCode() == LL_PCODE_VOLUME)
|
||||
// [RLVa:KB] - Checked: 2010-03-06 (RLVa-1.2.0c) | Modified: RLVa-1.2.0c
|
||||
if ( (object && object->getPCode() == LL_PCODE_VOLUME) &&
|
||||
((!rlv_handler_t::isEnabled()) || (gRlvHandler.canSit(object, pick.mObjectOffset))) )
|
||||
((!rlv_handler_t::isEnabled()) || (gRlvHandler.canSit(object, offset))) )
|
||||
// [/RLVa:KB]
|
||||
{
|
||||
// [RLVa:KB] - Checked: 2010-08-29 (RLVa-1.2.1c) | Added: RLVa-1.2.1c
|
||||
@@ -3909,12 +3903,33 @@ void handle_object_sit_or_stand()
|
||||
gMessageSystem->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID());
|
||||
gMessageSystem->nextBlockFast(_PREHASH_TargetObject);
|
||||
gMessageSystem->addUUIDFast(_PREHASH_TargetID, object->mID);
|
||||
gMessageSystem->addVector3Fast(_PREHASH_Offset, pick.mObjectOffset);
|
||||
gMessageSystem->addVector3Fast(_PREHASH_Offset, offset);
|
||||
|
||||
object->getRegion()->sendReliableMessage();
|
||||
}
|
||||
}
|
||||
|
||||
// only works on pie menu
|
||||
void handle_object_sit_or_stand()
|
||||
{
|
||||
LLPickInfo pick = LLToolPie::getInstance()->getPick();
|
||||
LLViewerObject *object = pick.getObject();;
|
||||
if (!object || pick.mPickType == LLPickInfo::PICK_FLORA)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
gAgent.stopAutoPilot(true);
|
||||
|
||||
if (sitting_on_selection())
|
||||
{
|
||||
gAgent.standUp();
|
||||
return;
|
||||
}
|
||||
|
||||
handle_object_sit(object, pick.mObjectOffset);
|
||||
}
|
||||
|
||||
class LLObjectSitOrStand : public view_listener_t
|
||||
{
|
||||
bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
|
||||
@@ -6112,7 +6127,7 @@ class LLAvatarResetSkeletonAndAnimations : public view_listener_t
|
||||
|
||||
};
|
||||
|
||||
bool complete_give_money(const LLSD& notification, const LLSD& response, LLObjectSelectionHandle selection)
|
||||
bool complete_give_money(const LLSD& notification, const LLSD& response, LLViewerObject* objectp)
|
||||
{
|
||||
S32 option = LLNotification::getSelectedOption(notification, response);
|
||||
if (option == 0)
|
||||
@@ -6120,8 +6135,6 @@ bool complete_give_money(const LLSD& notification, const LLSD& response, LLObjec
|
||||
gAgent.setDoNotDisturb(false);
|
||||
}
|
||||
|
||||
LLViewerObject* objectp = selection->getPrimaryObject();
|
||||
|
||||
// Show avatar's name if paying attachment
|
||||
if (objectp && objectp->isAttachment())
|
||||
{
|
||||
@@ -6148,10 +6161,10 @@ bool complete_give_money(const LLSD& notification, const LLSD& response, LLObjec
|
||||
return false;
|
||||
}
|
||||
|
||||
void handle_give_money_dialog()
|
||||
void handle_give_money_dialog(LLViewerObject* obj)
|
||||
{
|
||||
LLNotification::Params params("BusyModePay");
|
||||
params.functor(boost::bind(complete_give_money, _1, _2, LLSelectMgr::getInstance()->getSelection()));
|
||||
params.functor(boost::bind(complete_give_money, _1, _2, obj));
|
||||
|
||||
if (gAgent.isDoNotDisturb())
|
||||
{
|
||||
@@ -6168,7 +6181,7 @@ class LLPayObject : public view_listener_t
|
||||
{
|
||||
bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
|
||||
{
|
||||
handle_give_money_dialog();
|
||||
handle_give_money_dialog(LLSelectMgr::getInstance()->getSelection()->getPrimaryObject());
|
||||
return true;
|
||||
}
|
||||
};
|
||||
@@ -6183,9 +6196,8 @@ bool enable_pay_avatar()
|
||||
// [/RLVa:KB]
|
||||
}
|
||||
|
||||
bool enable_pay_object()
|
||||
bool enable_pay_object(LLViewerObject* object)
|
||||
{
|
||||
LLViewerObject* object = LLSelectMgr::getInstance()->getSelection()->getPrimaryObject();
|
||||
if( object )
|
||||
{
|
||||
LLViewerObject *parent = (LLViewerObject *)object->getParent();
|
||||
@@ -6291,7 +6303,7 @@ class LLEnablePayObject : public view_listener_t
|
||||
{
|
||||
bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
|
||||
{
|
||||
gMenuHolder->findControl(userdata["control"].asString())->setValue(enable_pay_avatar() || enable_pay_object());
|
||||
gMenuHolder->findControl(userdata["control"].asString())->setValue(enable_pay_avatar() || enable_pay_object(LLSelectMgr::getInstance()->getSelection()->getPrimaryObject()));
|
||||
return true;
|
||||
}
|
||||
};
|
||||
@@ -9090,7 +9102,7 @@ class ListEnableAnySelected : public view_listener_t
|
||||
{
|
||||
bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
|
||||
{
|
||||
gMenuHolder->findControl(userdata["control"].asString())->setValue(LFIDBearer::getActiveNumSelected());
|
||||
gMenuHolder->findControl(userdata["control"].asString())->setValue(LFIDBearer::getActiveNumSelected() != 0);
|
||||
return true;
|
||||
}
|
||||
};
|
||||
@@ -9404,7 +9416,7 @@ class ListTeleportTo : public view_listener_t
|
||||
{
|
||||
bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
|
||||
{
|
||||
const auto&& id = LFIDBearer::getActiveSelectedID();
|
||||
const auto& id = LFIDBearer::getActiveSelectedID();
|
||||
gAgent.teleportViaLocation(LFIDBearer::getActiveType() == LFIDBearer::OBJECT ? gObjectList.findObject(id)->getPositionGlobal() : get_av_pos(id));
|
||||
return true;
|
||||
}
|
||||
@@ -9442,7 +9454,7 @@ class ListIsNearby : public view_listener_t
|
||||
{
|
||||
bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
|
||||
{
|
||||
const auto&& id = LFIDBearer::getActiveSelectedID();
|
||||
const auto& id = LFIDBearer::getActiveSelectedID();
|
||||
gMenuHolder->findControl(userdata["control"].asString())->setValue(LFIDBearer::getActiveType() == LFIDBearer::OBJECT ? !!gObjectList.findObject(id) : is_nearby(id));
|
||||
return true;
|
||||
}
|
||||
@@ -9632,6 +9644,35 @@ class ListObjectCamTo : public view_listener_t
|
||||
}
|
||||
};
|
||||
|
||||
class ListObjectSit : public view_listener_t
|
||||
{
|
||||
bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
|
||||
{
|
||||
gAgent.stopAutoPilot(true);
|
||||
handle_object_sit(gObjectList.findObject(LFIDBearer::getActiveSelectedID()));
|
||||
return true;
|
||||
}
|
||||
};
|
||||
|
||||
class ListObjectPay : public view_listener_t
|
||||
{
|
||||
bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
|
||||
{
|
||||
handle_give_money_dialog(gObjectList.findObject(LFIDBearer::getActiveSelectedID()));
|
||||
return true;
|
||||
}
|
||||
};
|
||||
|
||||
class ListObjectEnablePay : public view_listener_t
|
||||
{
|
||||
bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
|
||||
{
|
||||
const auto& ids = LFIDBearer::getActiveSelectedIDs();
|
||||
gMenuHolder->findControl(userdata["control"].asString())->setValue(ids.size() == 1 && enable_pay_object(gObjectList.findObject(ids[0])));
|
||||
return true;
|
||||
}
|
||||
};
|
||||
|
||||
class MediaCtrlCopyURL : public view_listener_t
|
||||
{
|
||||
bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
|
||||
@@ -10025,6 +10066,9 @@ void initialize_menus()
|
||||
addMenu(new ListJoin, "List.Join");
|
||||
addMenu(new ListActivate, "List.Activate");
|
||||
addMenu(new ListObjectCamTo, "List.Object.CamTo");
|
||||
addMenu(new ListObjectSit, "List.Object.Sit");
|
||||
addMenu(new ListObjectPay, "List.Object.Pay");
|
||||
addMenu(new ListObjectEnablePay, "List.Object.EnablePay");
|
||||
|
||||
add_radar_listeners();
|
||||
|
||||
|
||||
@@ -133,8 +133,8 @@ void handle_toggle_flycam();
|
||||
void handle_fake_away_status(void*);
|
||||
|
||||
void handle_object_sit_or_stand();
|
||||
void handle_give_money_dialog();
|
||||
bool enable_pay_object();
|
||||
void handle_give_money_dialog(class LLViewerObject*);
|
||||
bool enable_pay_object(LLViewerObject*);
|
||||
bool enable_buy_object();
|
||||
void handle_go_to(const LLVector3d& pos);
|
||||
|
||||
|
||||
@@ -3299,7 +3299,7 @@ void process_improved_im(LLMessageSystem *msg, void **user_data)
|
||||
|
||||
LLSD args;
|
||||
// *TODO: Translate -> [FIRST] [LAST] (maybe)
|
||||
args["NAME"] = name;
|
||||
args["NAME"] = LLAvatarActions::getSLURL(from_id);
|
||||
args["MESSAGE"] = message;
|
||||
args["MATURITY_STR"] = region_access_str;
|
||||
args["MATURITY_ICON"] = region_access_icn;
|
||||
@@ -7984,7 +7984,7 @@ void send_lures(const LLSD& notification, const LLSD& response)
|
||||
target_name = RlvStrings::getAnonym(target_name);
|
||||
else
|
||||
// [/RLVa:KB]
|
||||
LLAvatarNameCache::getNSName(target_id, target_name);
|
||||
target_name = LLAvatarActions::getSLURL(target_id);
|
||||
args["TO_NAME"] = target_name;
|
||||
|
||||
LLSD payload;
|
||||
|
||||
@@ -16,14 +16,22 @@
|
||||
<on_click function="List.TeleportTo"/>
|
||||
<on_visible function="List.EnableSingleSelected"/>
|
||||
</menu_item_call>
|
||||
<menu_item_call label="Sit On" name="Sit On">
|
||||
<on_click function="List.Object.Sit"/>
|
||||
<on_visible function="List.EnableSingleSelected"/>
|
||||
</menu_item_call>
|
||||
<menu_item_call label="Pay" name="Pay">
|
||||
<on_click function="List.Object.Pay"/>
|
||||
<on_visible function="List.Object.EnablePay"/>
|
||||
</menu_item_call>
|
||||
<menu_item_separator/>
|
||||
<menu_item_call label="Copy Key" name="Copy Key">
|
||||
<on_click function="List.CopyUUIDs"/>
|
||||
<on_enable function="List.EnableAnySelected"/>
|
||||
<on_visible function="List.EnableAnySelected"/>
|
||||
</menu_item_call>
|
||||
<menu_item_call label="Copy Name" name="Copy Name">
|
||||
<on_click function="List.CopyNames"/>
|
||||
<on_enable function="List.EnableAnySelected"/>
|
||||
<on_visible function="List.EnableAnySelected"/>
|
||||
</menu_item_call>
|
||||
<menu_item_call label="Copy SLURL" name="Copy SLURL">
|
||||
<on_click function="List.CopySLURL"/>
|
||||
|
||||
@@ -56,6 +56,14 @@
|
||||
<on_click function="List.TeleportTo"/>
|
||||
<on_visible function="List.IsNearby"/>
|
||||
</menu_item_call>
|
||||
<menu_item_call label="Sit On" name="Sit On">
|
||||
<on_click function="List.Object.Sit"/>
|
||||
<on_visible function="List.IsNearby"/>
|
||||
</menu_item_call>
|
||||
<menu_item_call label="Pay" name="Pay">
|
||||
<on_click function="List.Object.Pay"/>
|
||||
<on_visible function="List.Object.EnablePay"/>
|
||||
</menu_item_call>
|
||||
<menu_item_separator
|
||||
layout="topleft" />
|
||||
<menu_item_call
|
||||
|
||||
@@ -6529,6 +6529,13 @@ Cancelled Sit
|
||||
Cancelled Attach
|
||||
</notification>
|
||||
|
||||
<notification
|
||||
icon="notifytip.tga"
|
||||
name="CancelledFollow"
|
||||
type="notifytip">
|
||||
Cancelled Follow
|
||||
</notification>
|
||||
|
||||
<notification
|
||||
icon="notifytip.tga"
|
||||
name="ReplacedMissingWearable"
|
||||
|
||||
Reference in New Issue
Block a user