Make namebox an IDBearer, so now it has a right click menu, yay!
This commit is contained in:
@@ -109,6 +109,19 @@ void LLNameBox::showProfile()
|
|||||||
LLAvatarActions::showProfile(mNameID);
|
LLAvatarActions::showProfile(mNameID);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// virtual
|
||||||
|
BOOL LLNameBox::handleRightMouseDown(S32 x, S32 y, MASK mask)
|
||||||
|
{
|
||||||
|
if (!LLTextBox::handleRightMouseDown(x, y, mask))
|
||||||
|
{
|
||||||
|
// Singu TODO: Generic menus for groups
|
||||||
|
if (mIsGroup || mNameID.isNull()) return FALSE;
|
||||||
|
|
||||||
|
showMenu(this, sMenus[0], x, y);
|
||||||
|
}
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
// virtual
|
// virtual
|
||||||
void LLNameBox::initFromXML(LLXMLNodePtr node, LLView* parent)
|
void LLNameBox::initFromXML(LLXMLNodePtr node, LLView* parent)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -35,6 +35,7 @@
|
|||||||
|
|
||||||
#include <set>
|
#include <set>
|
||||||
|
|
||||||
|
#include "lfidbearer.h"
|
||||||
#include "llview.h"
|
#include "llview.h"
|
||||||
#include "llstring.h"
|
#include "llstring.h"
|
||||||
#include "llfontgl.h"
|
#include "llfontgl.h"
|
||||||
@@ -42,12 +43,16 @@
|
|||||||
|
|
||||||
class LLNameBox
|
class LLNameBox
|
||||||
: public LLTextBox
|
: public LLTextBox
|
||||||
|
, public LFIDBearer
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
virtual void initFromXML(LLXMLNodePtr node, LLView* parent);
|
virtual void initFromXML(LLXMLNodePtr node, LLView* parent);
|
||||||
static LLView* fromXML(LLXMLNodePtr node, LLView *parent, LLUICtrlFactory *factory);
|
static LLView* fromXML(LLXMLNodePtr node, LLView *parent, LLUICtrlFactory *factory);
|
||||||
|
|
||||||
virtual ~LLNameBox();
|
virtual ~LLNameBox();
|
||||||
|
LLUUID getStringUUIDSelectedItem() const override final { return mNameID; }
|
||||||
|
uuid_vec_t getSelectedIDs() const override final { return {mNameID}; }
|
||||||
|
S32 getNumSelected() const override final { return 1; }
|
||||||
|
|
||||||
void setNameID(const LLUUID& name_id, BOOL is_group);
|
void setNameID(const LLUUID& name_id, BOOL is_group);
|
||||||
|
|
||||||
@@ -56,6 +61,7 @@ public:
|
|||||||
static void refreshAll(const LLUUID& id, const std::string& full_name, bool is_group);
|
static void refreshAll(const LLUUID& id, const std::string& full_name, bool is_group);
|
||||||
|
|
||||||
void showProfile();
|
void showProfile();
|
||||||
|
BOOL handleRightMouseDown(S32 x, S32 y, MASK mask) override final;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
LLNameBox(const std::string& name);
|
LLNameBox(const std::string& name);
|
||||||
|
|||||||
Reference in New Issue
Block a user