merge -r 58285:58437 maintenance.
parent
c4b5b3977f
commit
647d29b1a2
|
|
@ -1635,7 +1635,7 @@ BOOL LLMenuItemBranchDownGL::handleAcceleratorKey(KEY key, MASK mask)
|
|||
{
|
||||
BOOL branch_visible = mBranch->getVisible();
|
||||
BOOL handled = mBranch->handleAcceleratorKey(key, mask);
|
||||
if (handled && !branch_visible)
|
||||
if (handled && !branch_visible && getVisible())
|
||||
{
|
||||
// flash this menu entry because we triggered an invisible menu item
|
||||
LLMenuHolderGL::setActivatedItem(this);
|
||||
|
|
@ -2263,6 +2263,12 @@ void LLMenuGL::setBackgroundColor( const LLColor4& color )
|
|||
mBackgroundColor = color;
|
||||
}
|
||||
|
||||
LLColor4 LLMenuGL::getBackgroundColor()
|
||||
{
|
||||
return mBackgroundColor;
|
||||
}
|
||||
|
||||
|
||||
// rearrange the child rects so they fit the shape of the menu.
|
||||
void LLMenuGL::arrange( void )
|
||||
{
|
||||
|
|
@ -4159,6 +4165,7 @@ void LLMenuBarGL::arrange( void )
|
|||
item->setRect( rect );
|
||||
item->buildDrawLabel();
|
||||
}
|
||||
reshape(rect.mRight, rect.getHeight());
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -4376,7 +4383,7 @@ BOOL LLMenuHolderGL::hasVisibleMenu() const
|
|||
for ( child_list_const_iter_t child_it = getChildList()->begin(); child_it != getChildList()->end(); ++child_it)
|
||||
{
|
||||
LLView* viewp = *child_it;
|
||||
if (viewp->getVisible())
|
||||
if (viewp->getVisible() && viewp->getWidgetType() != WIDGET_TYPE_MENU_BAR)
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
|
|
@ -4402,7 +4409,8 @@ BOOL LLMenuHolderGL::hideMenus()
|
|||
for ( child_list_const_iter_t child_it = getChildList()->begin(); child_it != getChildList()->end(); ++child_it)
|
||||
{
|
||||
LLView* viewp = *child_it;
|
||||
if (viewp->getVisible())
|
||||
// clicks off of menu do not hide menu bar
|
||||
if (viewp->getWidgetType() != WIDGET_TYPE_MENU_BAR && viewp->getVisible())
|
||||
{
|
||||
viewp->setVisible(FALSE);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -424,6 +424,7 @@ public:
|
|||
|
||||
static void setDefaultBackgroundColor( const LLColor4& color );
|
||||
void setBackgroundColor( const LLColor4& color );
|
||||
LLColor4 getBackgroundColor();
|
||||
void setBackgroundVisible( BOOL b ) { mBgVisible = b; }
|
||||
void setCanTearOff(BOOL tear_off, LLViewHandle parent_floater_handle = LLViewHandle::sDeadHandle);
|
||||
|
||||
|
|
|
|||
|
|
@ -164,10 +164,11 @@ void LLPanel::draw()
|
|||
// draw background
|
||||
if( mBgVisible )
|
||||
{
|
||||
S32 left = LLPANEL_BORDER_WIDTH;
|
||||
S32 top = mRect.getHeight() - LLPANEL_BORDER_WIDTH;
|
||||
S32 right = mRect.getWidth() - LLPANEL_BORDER_WIDTH;
|
||||
S32 bottom = LLPANEL_BORDER_WIDTH;
|
||||
//RN: I don't see the point of this
|
||||
S32 left = 0;//LLPANEL_BORDER_WIDTH;
|
||||
S32 top = mRect.getHeight();// - LLPANEL_BORDER_WIDTH;
|
||||
S32 right = mRect.getWidth();// - LLPANEL_BORDER_WIDTH;
|
||||
S32 bottom = 0;//LLPANEL_BORDER_WIDTH;
|
||||
|
||||
if (mBgOpaque )
|
||||
{
|
||||
|
|
@ -459,6 +460,11 @@ void LLPanel::setBackgroundColor(const LLColor4& color)
|
|||
mBgColorOpaque = color;
|
||||
}
|
||||
|
||||
LLColor4 LLPanel::getBackgroundColor()
|
||||
{
|
||||
return mBgColorOpaque;
|
||||
}
|
||||
|
||||
void LLPanel::setTransparentColor(const LLColor4& color)
|
||||
{
|
||||
mBgColorAlpha = color;
|
||||
|
|
|
|||
|
|
@ -86,6 +86,7 @@ public:
|
|||
static BOOL nextAlert(LLAlertInfo &alert);
|
||||
|
||||
void setBackgroundColor( const LLColor4& color );
|
||||
LLColor4 getBackgroundColor();
|
||||
void setTransparentColor(const LLColor4& color);
|
||||
void setBackgroundVisible( BOOL b ) { mBgVisible = b; }
|
||||
void setBackgroundOpaque(BOOL b) { mBgOpaque = b; }
|
||||
|
|
|
|||
|
|
@ -467,8 +467,12 @@ void LLAgent::resetView(BOOL reset_camera)
|
|||
// By popular request, keep land selection while walking around. JC
|
||||
// gParcelMgr->deselectLand();
|
||||
|
||||
//FIXME: force deselect when walking? - RN
|
||||
// gSelectMgr->deselectAll();
|
||||
// force deselect when walking and attachment is selected
|
||||
// this is so people don't wig out when their avatar moves without animating
|
||||
if (gSelectMgr->getSelection()->isAttachment())
|
||||
{
|
||||
gSelectMgr->deselectAll();
|
||||
}
|
||||
|
||||
// Hide all popup menus
|
||||
gMenuHolder->hideMenus();
|
||||
|
|
|
|||
|
|
@ -1221,15 +1221,15 @@ void LLPanelLandObjects::refresh()
|
|||
else
|
||||
{
|
||||
char count[MAX_STRING]; /*Flawfinder: ignore*/
|
||||
S32 sw_max;
|
||||
S32 sw_total;
|
||||
S32 max;
|
||||
S32 total;
|
||||
S32 owned;
|
||||
S32 group;
|
||||
S32 other;
|
||||
S32 selected;
|
||||
F32 parcel_object_bonus;
|
||||
S32 sw_max = 0;
|
||||
S32 sw_total = 0;
|
||||
S32 max = 0;
|
||||
S32 total = 0;
|
||||
S32 owned = 0;
|
||||
S32 group = 0;
|
||||
S32 other = 0;
|
||||
S32 selected = 0;
|
||||
F32 parcel_object_bonus = 0.f;
|
||||
|
||||
gParcelMgr->getPrimInfo(sw_max, sw_total,
|
||||
max, total, owned, group, other, selected,
|
||||
|
|
|
|||
|
|
@ -45,6 +45,7 @@
|
|||
#include "lluiconstants.h"
|
||||
#include "llvoavatar.h"
|
||||
#include "llviewermenu.h" // *FIX: for is_agent_friend()
|
||||
#include "llviewermessage.h" // send_generic_message
|
||||
#include "llviewerobjectlist.h"
|
||||
#include "llviewerregion.h"
|
||||
#include "llviewborder.h"
|
||||
|
|
@ -234,27 +235,52 @@ BOOL LLDropTarget::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop,
|
|||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// LLPanelAvatarSecondLife()
|
||||
// LLPanelAvatarTab()
|
||||
//-----------------------------------------------------------------------------
|
||||
LLPanelAvatarSecondLife::LLPanelAvatarSecondLife(const std::string& name, const LLRect &rect, LLPanelAvatar* panel_avatar )
|
||||
LLPanelAvatarTab::LLPanelAvatarTab(const std::string& name, const LLRect &rect,
|
||||
LLPanelAvatar* panel_avatar)
|
||||
: LLPanel(name, rect),
|
||||
mPanelAvatar(panel_avatar),
|
||||
mDataRequested(false)
|
||||
{ }
|
||||
|
||||
// virtual
|
||||
void LLPanelAvatarTab::draw()
|
||||
{
|
||||
if (getVisible())
|
||||
{
|
||||
refresh();
|
||||
|
||||
LLPanel::draw();
|
||||
}
|
||||
}
|
||||
|
||||
void LLPanelAvatarTab::sendAvatarProfileRequestIfNeeded(const char* type)
|
||||
{
|
||||
if (!mDataRequested)
|
||||
{
|
||||
std::vector<std::string> strings;
|
||||
strings.push_back( mPanelAvatar->getAvatarID().asString() );
|
||||
strings.push_back( type );
|
||||
send_generic_message("avatarprofilerequest", strings);
|
||||
mDataRequested = true;
|
||||
}
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// LLPanelAvatarSecondLife()
|
||||
//-----------------------------------------------------------------------------
|
||||
LLPanelAvatarSecondLife::LLPanelAvatarSecondLife(const std::string& name,
|
||||
const LLRect &rect,
|
||||
LLPanelAvatar* panel_avatar )
|
||||
: LLPanelAvatarTab(name, rect, panel_avatar),
|
||||
mPartnerID()
|
||||
{
|
||||
}
|
||||
|
||||
LLPanelAvatarSecondLife::~LLPanelAvatarSecondLife()
|
||||
void LLPanelAvatarSecondLife::refresh()
|
||||
{
|
||||
}
|
||||
|
||||
void LLPanelAvatarSecondLife::draw()
|
||||
{
|
||||
if (getVisible())
|
||||
{
|
||||
updatePartnerName();
|
||||
}
|
||||
|
||||
LLPanel::draw();
|
||||
updatePartnerName();
|
||||
}
|
||||
|
||||
void LLPanelAvatarSecondLife::updatePartnerName()
|
||||
|
|
@ -376,14 +402,10 @@ void LLPanelAvatarSecondLife::onClickPartnerHelpLoadURL(S32 option, void* userda
|
|||
//-----------------------------------------------------------------------------
|
||||
// LLPanelAvatarFirstLife()
|
||||
//-----------------------------------------------------------------------------
|
||||
LLPanelAvatarFirstLife::LLPanelAvatarFirstLife(const std::string& name, const LLRect &rect, LLPanelAvatar* panel_avatar )
|
||||
: LLPanel(name, rect),
|
||||
mPanelAvatar(panel_avatar)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
LLPanelAvatarFirstLife::~LLPanelAvatarFirstLife()
|
||||
LLPanelAvatarFirstLife::LLPanelAvatarFirstLife(const std::string& name,
|
||||
const LLRect &rect,
|
||||
LLPanelAvatar* panel_avatar )
|
||||
: LLPanelAvatarTab(name, rect, panel_avatar)
|
||||
{
|
||||
}
|
||||
|
||||
|
|
@ -405,7 +427,7 @@ BOOL LLPanelAvatarSecondLife::postBuild(void)
|
|||
childSetAction("partner_help",onClickPartnerHelp,this);
|
||||
|
||||
childSetAction("?",onClickPublishHelp,this);
|
||||
BOOL own_avatar = (mPanelAvatar->getAvatarID() == gAgent.getID() );
|
||||
BOOL own_avatar = (getPanelAvatar()->getAvatarID() == gAgent.getID() );
|
||||
enableControls(own_avatar);
|
||||
|
||||
childSetVisible("About:",LLPanelAvatar::sAllowFirstLife);
|
||||
|
|
@ -422,26 +444,30 @@ BOOL LLPanelAvatarSecondLife::postBuild(void)
|
|||
childSetVisible("online_unknown",FALSE);
|
||||
childSetVisible("online_no",FALSE);
|
||||
|
||||
childSetAction("Show on Map", LLPanelAvatar::onClickTrack, mPanelAvatar);
|
||||
childSetAction("Instant Message...", LLPanelAvatar::onClickIM, mPanelAvatar);
|
||||
childSetAction("Rate...", LLPanelAvatar::onClickRate, mPanelAvatar);
|
||||
childSetAction("Pay...", LLPanelAvatar::onClickPay, mPanelAvatar);
|
||||
childSetAction("Mute", LLPanelAvatar::onClickMute, mPanelAvatar );
|
||||
childSetAction("Show on Map", LLPanelAvatar::onClickTrack, getPanelAvatar());
|
||||
childSetAction("Instant Message...", LLPanelAvatar::onClickIM, getPanelAvatar());
|
||||
childSetAction("Rate...", LLPanelAvatar::onClickRate, getPanelAvatar());
|
||||
childSetAction("Pay...", LLPanelAvatar::onClickPay, getPanelAvatar());
|
||||
childSetAction("Mute", LLPanelAvatar::onClickMute, getPanelAvatar() );
|
||||
|
||||
childSetAction("Offer Teleport...", LLPanelAvatar::onClickOfferTeleport, mPanelAvatar);
|
||||
childSetAction("Offer Teleport...", LLPanelAvatar::onClickOfferTeleport,
|
||||
getPanelAvatar() );
|
||||
|
||||
childSetDoubleClickCallback("groups", onDoubleClickGroup, this );
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
BOOL LLPanelAvatarFirstLife::postBuild(void)
|
||||
{
|
||||
BOOL own_avatar = (mPanelAvatar->getAvatarID() == gAgent.getID() );
|
||||
BOOL own_avatar = (getPanelAvatar()->getAvatarID() == gAgent.getID() );
|
||||
enableControls(own_avatar);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
BOOL LLPanelAvatarNotes::postBuild(void)
|
||||
{ childSetCommitCallback("notes edit",onCommitNotes,this);
|
||||
{
|
||||
childSetCommitCallback("notes edit",onCommitNotes,this);
|
||||
|
||||
LLTextEditor* te = LLUICtrlFactory::getTextEditorByName(this,"notes edit");
|
||||
if(te) te->setCommitOnFocusLost(TRUE);
|
||||
|
|
@ -478,6 +504,7 @@ BOOL LLPanelAvatarClassified::postBuild(void)
|
|||
childSetAction("Delete...",onClickDelete,NULL);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
BOOL LLPanelAvatarPicks::postBuild(void)
|
||||
{
|
||||
childSetAction("New...",onClickNew,NULL);
|
||||
|
|
@ -514,9 +541,12 @@ BOOL LLPanelAvatarAdvanced::postBuild()
|
|||
return TRUE;
|
||||
}
|
||||
|
||||
LLPanelAvatarWeb::LLPanelAvatarWeb(const std::string& name, const LLRect& rect, LLPanelAvatar* panel_avatar)
|
||||
: LLPanel(name, rect),
|
||||
mPanelAvatar(panel_avatar),
|
||||
//-----------------------------------------------------------------------------
|
||||
// LLPanelAvatarWeb
|
||||
//-----------------------------------------------------------------------------
|
||||
LLPanelAvatarWeb::LLPanelAvatarWeb(const std::string& name, const LLRect& rect,
|
||||
LLPanelAvatar* panel_avatar)
|
||||
: LLPanelAvatarTab(name, rect, panel_avatar),
|
||||
mWebBrowser(NULL)
|
||||
{
|
||||
}
|
||||
|
|
@ -664,13 +694,14 @@ void LLPanelAvatarWeb::onLocationChange( const EventType& eventIn )
|
|||
}
|
||||
#endif
|
||||
|
||||
LLPanelAvatarAdvanced::LLPanelAvatarAdvanced(
|
||||
const std::string& name,
|
||||
const LLRect& rect,
|
||||
LLPanelAvatar* panel_avatar)
|
||||
:
|
||||
LLPanel(name, rect),
|
||||
mPanelAvatar(panel_avatar),
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// LLPanelAvatarAdvanced
|
||||
//-----------------------------------------------------------------------------
|
||||
LLPanelAvatarAdvanced::LLPanelAvatarAdvanced(const std::string& name,
|
||||
const LLRect& rect,
|
||||
LLPanelAvatar* panel_avatar)
|
||||
: LLPanelAvatarTab(name, rect, panel_avatar),
|
||||
mWantToCount(0),
|
||||
mSkillsCount(0),
|
||||
mWantToEdit( NULL ),
|
||||
|
|
@ -678,13 +709,9 @@ LLPanelAvatarAdvanced::LLPanelAvatarAdvanced(
|
|||
{
|
||||
}
|
||||
|
||||
LLPanelAvatarAdvanced::~LLPanelAvatarAdvanced()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
void LLPanelAvatarAdvanced::enableControls(BOOL self)
|
||||
{ int t;
|
||||
{
|
||||
S32 t;
|
||||
for(t=0;t<mWantToCount;t++)
|
||||
{
|
||||
if(mWantToCheck[t])mWantToCheck[t]->setEnabled(self);
|
||||
|
|
@ -770,25 +797,27 @@ void LLPanelAvatarAdvanced::getWantSkills(U32* want_to_mask, std::string& want_t
|
|||
// LLPanelAvatarNotes()
|
||||
//-----------------------------------------------------------------------------
|
||||
LLPanelAvatarNotes::LLPanelAvatarNotes(const std::string& name, const LLRect& rect, LLPanelAvatar* panel_avatar)
|
||||
: LLPanel(name, rect),
|
||||
mPanelAvatar(panel_avatar)
|
||||
: LLPanelAvatarTab(name, rect, panel_avatar)
|
||||
{
|
||||
}
|
||||
|
||||
LLPanelAvatarNotes::~LLPanelAvatarNotes()
|
||||
void LLPanelAvatarNotes::refresh()
|
||||
{
|
||||
sendAvatarProfileRequestIfNeeded("notes");
|
||||
}
|
||||
|
||||
|
||||
void LLPanelAvatarNotes::enableControls(BOOL self)
|
||||
{ }
|
||||
void LLPanelAvatarNotes::clearControls()
|
||||
{
|
||||
childSetText("notes edit", "Loading...");
|
||||
childSetEnabled("notes edit", false);
|
||||
}
|
||||
|
||||
// static
|
||||
void LLPanelAvatarNotes::onCommitNotes(LLUICtrl*, void* userdata)
|
||||
{
|
||||
LLPanelAvatarNotes* self = (LLPanelAvatarNotes*)userdata;
|
||||
|
||||
self->mPanelAvatar->sendAvatarNotesUpdate();
|
||||
self->getPanelAvatar()->sendAvatarNotesUpdate();
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -797,33 +826,14 @@ void LLPanelAvatarNotes::onCommitNotes(LLUICtrl*, void* userdata)
|
|||
//-----------------------------------------------------------------------------
|
||||
LLPanelAvatarClassified::LLPanelAvatarClassified(const LLString& name, const LLRect& rect,
|
||||
LLPanelAvatar* panel_avatar)
|
||||
: LLPanel(name, rect),
|
||||
mPanelAvatar(panel_avatar)
|
||||
: LLPanelAvatarTab(name, rect, panel_avatar)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
LLPanelAvatarClassified::~LLPanelAvatarClassified()
|
||||
{
|
||||
// children deleted by view destructor
|
||||
}
|
||||
|
||||
|
||||
void LLPanelAvatarClassified::draw()
|
||||
{
|
||||
if (getVisible())
|
||||
{
|
||||
refresh();
|
||||
|
||||
LLPanel::draw();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void LLPanelAvatarClassified::refresh()
|
||||
{
|
||||
BOOL self = (gAgent.getID() == mPanelAvatar->getAvatarID());
|
||||
|
||||
BOOL self = (gAgent.getID() == getPanelAvatar()->getAvatarID());
|
||||
|
||||
LLTabContainerCommon* tabs = LLUICtrlFactory::getTabContainerByName(this,"classified tab");
|
||||
|
||||
|
|
@ -835,15 +845,12 @@ void LLPanelAvatarClassified::refresh()
|
|||
|
||||
childSetEnabled("New...",self && allow_new);
|
||||
childSetEnabled("Delete...",self && allow_delete);
|
||||
childSetVisible("help_text",self && show_help);
|
||||
childSetVisible("classified tab",!show_help);
|
||||
|
||||
sendAvatarProfileRequestIfNeeded("classifieds");
|
||||
}
|
||||
|
||||
|
||||
void LLPanelAvatarClassified::enableControls(BOOL self)
|
||||
{
|
||||
}
|
||||
|
||||
BOOL LLPanelAvatarClassified::titleIsValid()
|
||||
{
|
||||
LLTabContainerCommon* tabs = LLViewerUICtrlFactory::getTabContainerByName(this, "classified tab");
|
||||
|
|
@ -880,6 +887,10 @@ void LLPanelAvatarClassified::deleteClassifiedPanels()
|
|||
{
|
||||
tabs->deleteAllTabs();
|
||||
}
|
||||
|
||||
childSetVisible("New...", false);
|
||||
childSetVisible("Delete...", false);
|
||||
childSetVisible("loading_text", true);
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -923,6 +934,10 @@ void LLPanelAvatarClassified::processAvatarClassifiedReply(LLMessageSystem* msg,
|
|||
{
|
||||
tabs->selectFirstTab();
|
||||
}
|
||||
|
||||
childSetVisible("New...", true);
|
||||
childSetVisible("Delete...", true);
|
||||
childSetVisible("loading_text", false);
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -1014,34 +1029,17 @@ void LLPanelAvatarClassified::callbackDelete(S32 option, void* data)
|
|||
//-----------------------------------------------------------------------------
|
||||
// LLPanelAvatarPicks()
|
||||
//-----------------------------------------------------------------------------
|
||||
LLPanelAvatarPicks::LLPanelAvatarPicks(const std::string& name, const LLRect& rect,
|
||||
LLPanelAvatarPicks::LLPanelAvatarPicks(const std::string& name,
|
||||
const LLRect& rect,
|
||||
LLPanelAvatar* panel_avatar)
|
||||
: LLPanel(name, rect),
|
||||
mPanelAvatar(panel_avatar)
|
||||
: LLPanelAvatarTab(name, rect, panel_avatar)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
LLPanelAvatarPicks::~LLPanelAvatarPicks()
|
||||
{
|
||||
// children deleted by view destructor
|
||||
}
|
||||
|
||||
|
||||
void LLPanelAvatarPicks::draw()
|
||||
{
|
||||
if (getVisible())
|
||||
{
|
||||
refresh();
|
||||
|
||||
LLPanel::draw();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void LLPanelAvatarPicks::refresh()
|
||||
{
|
||||
BOOL self = (gAgent.getID() == mPanelAvatar->getAvatarID());
|
||||
BOOL self = (gAgent.getID() == getPanelAvatar()->getAvatarID());
|
||||
|
||||
LLTabContainerCommon* tabs = LLViewerUICtrlFactory::getTabContainerByName(this,"picks tab");
|
||||
S32 tab_count = tabs ? tabs->getTabCount() : 0;
|
||||
|
|
@ -1050,12 +1048,8 @@ void LLPanelAvatarPicks::refresh()
|
|||
|
||||
childSetEnabled("New...",self && allow_new);
|
||||
childSetEnabled("Delete...",self && allow_delete);
|
||||
}
|
||||
|
||||
|
||||
// You are only allowed 10 picks.
|
||||
void LLPanelAvatarPicks::enableControls(BOOL self)
|
||||
{
|
||||
sendAvatarProfileRequestIfNeeded("picks");
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -1066,8 +1060,11 @@ void LLPanelAvatarPicks::deletePickPanels()
|
|||
{
|
||||
tabs->deleteAllTabs();
|
||||
}
|
||||
}
|
||||
|
||||
childSetVisible("New...", false);
|
||||
childSetVisible("Delete...", false);
|
||||
childSetVisible("loading_text", true);
|
||||
}
|
||||
|
||||
void LLPanelAvatarPicks::processAvatarPicksReply(LLMessageSystem* msg, void**)
|
||||
{
|
||||
|
|
@ -1110,6 +1107,10 @@ void LLPanelAvatarPicks::processAvatarPicksReply(LLMessageSystem* msg, void**)
|
|||
{
|
||||
tabs->selectFirstTab();
|
||||
}
|
||||
|
||||
childSetVisible("New...", true);
|
||||
childSetVisible("Delete...", true);
|
||||
childSetVisible("loading_text", false);
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -1310,7 +1311,14 @@ void LLPanelAvatar::setOnlineStatus(EOnlineStatus online_status)
|
|||
|
||||
mPanelSecondLife->childSetVisible("online_yes", (online_status == ONLINE_STATUS_YES));
|
||||
|
||||
childSetVisible("Offer Teleport...",TRUE);
|
||||
// Since setOnlineStatus gets called after setAvatarID
|
||||
// need to make sure that "Offer Teleport" doesn't get set
|
||||
// to TRUE again for yourself
|
||||
if (mAvatarID != gAgent.getID())
|
||||
{
|
||||
childSetVisible("Offer Teleport...",TRUE);
|
||||
}
|
||||
|
||||
BOOL in_prelude = gAgent.inPrelude();
|
||||
if(gAgent.isGodlike())
|
||||
{
|
||||
|
|
@ -1352,12 +1360,8 @@ void LLPanelAvatar::setAvatarID(const LLUUID &avatar_id, const LLString &name,
|
|||
mPanelSecondLife->enableControls(own_avatar && mAllowEdit);
|
||||
mPanelWeb->enableControls(own_avatar && mAllowEdit);
|
||||
mPanelAdvanced->enableControls(own_avatar && mAllowEdit);
|
||||
mPanelPicks->enableControls(own_avatar && mAllowEdit);
|
||||
mPanelClassified->enableControls(own_avatar && mAllowEdit);
|
||||
// Teens don't have this.
|
||||
if (mPanelFirstLife) mPanelFirstLife->enableControls(own_avatar && mAllowEdit);
|
||||
mPanelNotes->enableControls(own_avatar && mAllowEdit);
|
||||
|
||||
|
||||
LLView *target_view = getChildByName("drop_target_rect", TRUE);
|
||||
if(target_view)
|
||||
|
|
@ -1371,16 +1375,16 @@ void LLPanelAvatar::setAvatarID(const LLUUID &avatar_id, const LLString &name,
|
|||
mDropTarget->setAgentID(mAvatarID);
|
||||
}
|
||||
|
||||
LLNameEditor* NameEdit = LLViewerUICtrlFactory::getNameEditorByName(this, "name");
|
||||
if(NameEdit)
|
||||
LLNameEditor* name_edit = LLViewerUICtrlFactory::getNameEditorByName(this, "name");
|
||||
if(name_edit)
|
||||
{
|
||||
if (name.empty())
|
||||
{
|
||||
NameEdit->setNameID(avatar_id, FALSE);
|
||||
name_edit->setNameID(avatar_id, FALSE);
|
||||
}
|
||||
else
|
||||
{
|
||||
NameEdit->setText(name);
|
||||
name_edit->setText(name);
|
||||
}
|
||||
}
|
||||
// if (avatar_changed)
|
||||
|
|
@ -1388,9 +1392,19 @@ void LLPanelAvatar::setAvatarID(const LLUUID &avatar_id, const LLString &name,
|
|||
// While we're waiting for data off the network, clear out the
|
||||
// old data.
|
||||
mPanelSecondLife->clearControls();
|
||||
mPanelPicks->deletePickPanels();
|
||||
mPanelClassified->deleteClassifiedPanels();
|
||||
|
||||
mPanelPicks->deletePickPanels();
|
||||
mPanelPicks->setDataRequested(false);
|
||||
|
||||
mPanelClassified->deleteClassifiedPanels();
|
||||
mPanelClassified->setDataRequested(false);
|
||||
|
||||
mPanelNotes->clearControls();
|
||||
mPanelNotes->setDataRequested(false);
|
||||
|
||||
// Request just the first two pages of data. The picks,
|
||||
// classifieds, and notes will be requested when that panel
|
||||
// is made visible. JC
|
||||
sendAvatarPropertiesRequest();
|
||||
|
||||
if (own_avatar)
|
||||
|
|
@ -1665,12 +1679,17 @@ void LLPanelAvatar::onClickCancel(void *userdata)
|
|||
|
||||
if (self)
|
||||
{
|
||||
self->sendAvatarPropertiesRequest();
|
||||
LLFloaterAvatarInfo *infop;
|
||||
if ((infop = LLFloaterAvatarInfo::getInstance(self->mAvatarID)))
|
||||
{
|
||||
infop->close();
|
||||
}
|
||||
else
|
||||
{
|
||||
// We're in the Search directory and are cancelling an edit
|
||||
// to our own profile, so reset.
|
||||
self->sendAvatarPropertiesRequest();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -2161,6 +2180,7 @@ void LLPanelAvatar::processAvatarNotesReply(LLMessageSystem *msg, void**)
|
|||
char text[DB_USER_NOTE_SIZE]; /*Flawfinder: ignore*/
|
||||
msg->getString("Data", "Notes", DB_USER_NOTE_SIZE, text);
|
||||
self->childSetValue("notes edit", text);
|
||||
self->childSetEnabled("notes edit", true);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -40,30 +40,54 @@ enum EOnlineStatus
|
|||
ONLINE_STATUS_YES = 1
|
||||
};
|
||||
|
||||
class LLPanelAvatarFirstLife
|
||||
: public LLPanel
|
||||
// Base class for all sub-tabs inside the avatar profile. Many of these
|
||||
// panels need to keep track of the parent panel (to get the avatar id)
|
||||
// and only request data from the database when they are first drawn. JC
|
||||
class LLPanelAvatarTab : public LLPanel
|
||||
{
|
||||
public:
|
||||
LLPanelAvatarTab(const std::string& name, const LLRect &rect,
|
||||
LLPanelAvatar* panel_avatar);
|
||||
|
||||
// Calls refresh() once per frame when panel is visible
|
||||
/*virtual*/ void draw();
|
||||
|
||||
LLPanelAvatar* getPanelAvatar() const { return mPanelAvatar; }
|
||||
|
||||
void setDataRequested(bool requested) { mDataRequested = requested; }
|
||||
bool isDataRequested() const { return mDataRequested; }
|
||||
|
||||
// If the data for this tab has not yet been requested,
|
||||
// send the request. Used by tabs that are filled in only
|
||||
// when they are first displayed.
|
||||
// type is one of "notes", "classifieds", "picks"
|
||||
void sendAvatarProfileRequestIfNeeded(const char* type);
|
||||
|
||||
private:
|
||||
LLPanelAvatar* mPanelAvatar;
|
||||
bool mDataRequested;
|
||||
};
|
||||
|
||||
|
||||
class LLPanelAvatarFirstLife : public LLPanelAvatarTab
|
||||
{
|
||||
public:
|
||||
LLPanelAvatarFirstLife(const std::string& name, const LLRect &rect, LLPanelAvatar* panel_avatar);
|
||||
/*virtual*/ ~LLPanelAvatarFirstLife();
|
||||
/*virtual*/ BOOL postBuild(void);
|
||||
|
||||
/*virtual*/ BOOL postBuild(void);
|
||||
|
||||
void enableControls(BOOL own_avatar);
|
||||
|
||||
protected:
|
||||
LLPanelAvatar* mPanelAvatar;
|
||||
};
|
||||
|
||||
|
||||
class LLPanelAvatarSecondLife
|
||||
: public LLPanel
|
||||
: public LLPanelAvatarTab
|
||||
{
|
||||
public:
|
||||
LLPanelAvatarSecondLife(const std::string& name, const LLRect &rect, LLPanelAvatar* panel_avatar );
|
||||
/*virtual*/ ~LLPanelAvatarSecondLife();
|
||||
|
||||
/*virtual*/ BOOL postBuild(void);
|
||||
/*virtual*/ void draw();
|
||||
/*virtual*/ BOOL postBuild(void);
|
||||
/*virtual*/ void refresh();
|
||||
|
||||
static void onClickImage( void *userdata);
|
||||
static void onClickFriends( void *userdata);
|
||||
|
|
@ -80,15 +104,14 @@ public:
|
|||
|
||||
void setPartnerID(LLUUID id) { mPartnerID = id; }
|
||||
|
||||
protected:
|
||||
LLPanelAvatar* mPanelAvatar;
|
||||
|
||||
private:
|
||||
LLUUID mPartnerID;
|
||||
};
|
||||
|
||||
|
||||
// WARNING! The order of the inheritance here matters!! Do not change. - KLW
|
||||
class LLPanelAvatarWeb :
|
||||
public LLPanel
|
||||
public LLPanelAvatarTab
|
||||
#if LL_LIBXUL_ENABLED
|
||||
, public LLWebBrowserCtrlObserver
|
||||
#endif
|
||||
|
|
@ -115,17 +138,17 @@ public:
|
|||
virtual void onLocationChange( const EventType& eventIn );
|
||||
#endif
|
||||
|
||||
protected:
|
||||
LLPanelAvatar* mPanelAvatar;
|
||||
private:
|
||||
std::string mURL;
|
||||
LLWebBrowserCtrl* mWebBrowser;
|
||||
};
|
||||
|
||||
class LLPanelAvatarAdvanced : public LLPanel
|
||||
|
||||
class LLPanelAvatarAdvanced : public LLPanelAvatarTab
|
||||
{
|
||||
public:
|
||||
LLPanelAvatarAdvanced(const std::string& name, const LLRect& rect, LLPanelAvatar* panel_avatar);
|
||||
/*virtual*/ ~LLPanelAvatarAdvanced();
|
||||
|
||||
/*virtual*/ BOOL postBuild(void);
|
||||
|
||||
void enableControls(BOOL own_avatar);
|
||||
|
|
@ -136,8 +159,7 @@ public:
|
|||
U32* skills_mask, std::string& skills_text,
|
||||
std::string& languages_text);
|
||||
|
||||
protected:
|
||||
LLPanelAvatar* mPanelAvatar;
|
||||
private:
|
||||
S32 mWantToCount;
|
||||
S32 mSkillsCount;
|
||||
LLCheckBoxCtrl *mWantToCheck[8];
|
||||
|
|
@ -147,35 +169,31 @@ protected:
|
|||
};
|
||||
|
||||
|
||||
class LLPanelAvatarNotes : public LLPanel
|
||||
class LLPanelAvatarNotes : public LLPanelAvatarTab
|
||||
{
|
||||
public:
|
||||
LLPanelAvatarNotes(const std::string& name, const LLRect& rect, LLPanelAvatar* panel_avatar);
|
||||
/*virtual*/ ~LLPanelAvatarNotes();
|
||||
|
||||
/*virtual*/ BOOL postBuild(void);
|
||||
|
||||
void enableControls(BOOL own_avatar);
|
||||
/*virtual*/ void refresh();
|
||||
|
||||
void clearControls();
|
||||
|
||||
static void onCommitNotes(LLUICtrl* field, void* userdata);
|
||||
|
||||
protected:
|
||||
LLPanelAvatar* mPanelAvatar;
|
||||
};
|
||||
|
||||
|
||||
class LLPanelAvatarClassified : public LLPanel
|
||||
class LLPanelAvatarClassified : public LLPanelAvatarTab
|
||||
{
|
||||
public:
|
||||
LLPanelAvatarClassified(const LLString& name, const LLRect& rect, LLPanelAvatar* panel_avatar);
|
||||
/*virtual*/ ~LLPanelAvatarClassified();
|
||||
|
||||
/*virtual*/ BOOL postBuild(void);
|
||||
/*virtual*/ void draw();
|
||||
/*virtual*/ BOOL postBuild(void);
|
||||
|
||||
void refresh();
|
||||
/*virtual*/ void refresh();
|
||||
|
||||
void apply();
|
||||
void enableControls(BOOL own_avatar);
|
||||
|
||||
BOOL titleIsValid();
|
||||
|
||||
|
|
@ -192,23 +210,17 @@ private:
|
|||
|
||||
static void callbackDelete(S32 option, void* data);
|
||||
static void callbackNew(S32 option, void* data);
|
||||
|
||||
private:
|
||||
LLPanelAvatar* mPanelAvatar;
|
||||
};
|
||||
|
||||
class LLPanelAvatarPicks : public LLPanel
|
||||
|
||||
class LLPanelAvatarPicks : public LLPanelAvatarTab
|
||||
{
|
||||
public:
|
||||
LLPanelAvatarPicks(const std::string& name, const LLRect& rect, LLPanelAvatar* panel_avatar);
|
||||
/*virtual*/ ~LLPanelAvatarPicks();
|
||||
|
||||
/*virtual*/ BOOL postBuild(void);
|
||||
/*virtual*/ void draw();
|
||||
|
||||
void refresh();
|
||||
|
||||
void enableControls(BOOL own_avatar);
|
||||
/*virtual*/ void refresh();
|
||||
|
||||
// Delete all the pick sub-panels from the tab container
|
||||
void deletePickPanels();
|
||||
|
|
@ -223,9 +235,6 @@ private:
|
|||
static void onClickDelete(void* data);
|
||||
|
||||
static void callbackDelete(S32 option, void* data);
|
||||
|
||||
private:
|
||||
LLPanelAvatar* mPanelAvatar;
|
||||
};
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -743,7 +743,7 @@ void LLPanelClassified::onClickSet(void* data)
|
|||
self->mPosGlobal = gAgent.getPositionGlobal();
|
||||
|
||||
LLString location_text;
|
||||
location_text.assign("(will update after save)");
|
||||
location_text.assign("(will update after publish)");
|
||||
location_text.append(", ");
|
||||
|
||||
S32 region_x = llround((F32)self->mPosGlobal.mdV[VX]) % REGION_WIDTH_UNITS;
|
||||
|
|
|
|||
|
|
@ -190,7 +190,13 @@ void LLStatusBar::draw()
|
|||
{
|
||||
refresh();
|
||||
|
||||
LLView::draw();
|
||||
if (mBgVisible)
|
||||
{
|
||||
gl_drop_shadow(0, mRect.getHeight(), mRect.getWidth(), 0,
|
||||
LLUI::sColorsGroup->getColor("ColorDropShadow"),
|
||||
LLUI::sConfigGroup->getS32("DropShadowFloater") );
|
||||
}
|
||||
LLPanel::draw();
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -243,6 +249,12 @@ void LLStatusBar::refresh()
|
|||
const S32 MENU_RIGHT = gMenuBarView->getRightmostMenuEdge();
|
||||
S32 x = MENU_RIGHT + MENU_PARCEL_SPACING;
|
||||
S32 y = 0;
|
||||
|
||||
// reshape menu bar to its content's width
|
||||
if (MENU_RIGHT != gMenuBarView->getRect().getWidth())
|
||||
{
|
||||
gMenuBarView->reshape(MENU_RIGHT, gMenuBarView->getRect().getHeight());
|
||||
}
|
||||
|
||||
LLViewerRegion *region = gAgent.getRegion();
|
||||
LLParcel *parcel = gParcelMgr->getAgentParcel();
|
||||
|
|
@ -429,6 +441,7 @@ void LLStatusBar::setVisibleForMouselook(bool visible)
|
|||
mSGBandwidth->setVisible(visible);
|
||||
mSGPacketLoss->setVisible(visible);
|
||||
mBtnBuyCurrency->setVisible(visible);
|
||||
setBackgroundVisible(visible);
|
||||
}
|
||||
|
||||
void LLStatusBar::debitBalance(S32 debit)
|
||||
|
|
|
|||
|
|
@ -43,6 +43,7 @@
|
|||
LLToolPie *gToolPie = NULL;
|
||||
|
||||
LLViewerObject* LLToolPie::sClickActionObject = NULL;
|
||||
LLHandle<LLObjectSelection> LLToolPie::sLeftClickSelection = NULL;
|
||||
|
||||
extern void handle_buy(void*);
|
||||
|
||||
|
|
@ -169,19 +170,19 @@ BOOL LLToolPie::pickAndShowMenu(S32 x, S32 y, MASK mask, BOOL always_show)
|
|||
|| parent && parent->flagTakesMoney())
|
||||
{
|
||||
sClickActionObject = parent;
|
||||
LLToolSelect::handleObjectSelection(parent, MASK_NONE, FALSE, TRUE);
|
||||
sLeftClickSelection = LLToolSelect::handleObjectSelection(parent, MASK_NONE, FALSE, TRUE);
|
||||
return TRUE;
|
||||
}
|
||||
break;
|
||||
case CLICK_ACTION_BUY:
|
||||
sClickActionObject = parent;
|
||||
LLToolSelect::handleObjectSelection(parent, MASK_NONE, FALSE, TRUE);
|
||||
sLeftClickSelection = LLToolSelect::handleObjectSelection(parent, MASK_NONE, FALSE, TRUE);
|
||||
return TRUE;
|
||||
case CLICK_ACTION_OPEN:
|
||||
if (parent && parent->allowOpen())
|
||||
{
|
||||
sClickActionObject = parent;
|
||||
LLToolSelect::handleObjectSelection(parent, MASK_NONE, FALSE, TRUE);
|
||||
sLeftClickSelection = LLToolSelect::handleObjectSelection(parent, MASK_NONE, FALSE, TRUE);
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
|
|
@ -396,10 +397,11 @@ void LLToolPie::selectionPropertiesReceived()
|
|||
return;
|
||||
}
|
||||
|
||||
if (sClickActionObject
|
||||
&& !sClickActionObject->isDead())
|
||||
if (!sLeftClickSelection->isEmpty())
|
||||
{
|
||||
LLViewerObject* root = gSelectMgr->getSelection()->getFirstRootObject();
|
||||
LLViewerObject* root = sLeftClickSelection->getFirstRootObject();
|
||||
// since we don't currently have a way to lock a selection, it could have changed
|
||||
// after we initially clicked on the object
|
||||
if (root == sClickActionObject)
|
||||
{
|
||||
U8 action = root->getClickAction();
|
||||
|
|
@ -419,6 +421,7 @@ void LLToolPie::selectionPropertiesReceived()
|
|||
}
|
||||
}
|
||||
}
|
||||
sLeftClickSelection = NULL;
|
||||
sClickActionObject = NULL;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -13,6 +13,7 @@
|
|||
#include "lluuid.h"
|
||||
|
||||
class LLViewerObject;
|
||||
class LLObjectSelection;
|
||||
|
||||
class LLToolPie
|
||||
: public LLTool
|
||||
|
|
@ -53,6 +54,7 @@ protected:
|
|||
LLUUID mHitObjectID;
|
||||
BOOL mMouseOutsideSlop; // for this drag, has mouse moved outside slop region
|
||||
static LLViewerObject* sClickActionObject;
|
||||
static LLHandle<LLObjectSelection> sLeftClickSelection;
|
||||
};
|
||||
|
||||
extern LLToolPie *gToolPie;
|
||||
|
|
|
|||
|
|
@ -74,7 +74,7 @@ BOOL LLToolSelect::handleDoubleClick(S32 x, S32 y, MASK mask)
|
|||
}
|
||||
|
||||
// static
|
||||
void LLToolSelect::handleObjectSelection(LLViewerObject *object, MASK mask, BOOL ignore_group, BOOL temp_select)
|
||||
LLHandle<LLObjectSelection> LLToolSelect::handleObjectSelection(LLViewerObject *object, MASK mask, BOOL ignore_group, BOOL temp_select)
|
||||
{
|
||||
BOOL select_owned = gSavedSettings.getBOOL("SelectOwnedOnly");
|
||||
BOOL select_movable = gSavedSettings.getBOOL("SelectMovableOnly");
|
||||
|
|
@ -203,6 +203,8 @@ void LLToolSelect::handleObjectSelection(LLViewerObject *object, MASK mask, BOOL
|
|||
gSavedSettings.setBOOL("SelectMovableOnly", select_movable);
|
||||
gSelectMgr->setForceSelection(FALSE);
|
||||
}
|
||||
|
||||
return gSelectMgr->getSelection();
|
||||
}
|
||||
|
||||
BOOL LLToolSelect::handleMouseUp(S32 x, S32 y, MASK mask)
|
||||
|
|
|
|||
|
|
@ -13,6 +13,8 @@
|
|||
#include "v3math.h"
|
||||
#include "lluuid.h"
|
||||
|
||||
class LLObjectSelection;
|
||||
|
||||
class LLToolSelect : public LLTool
|
||||
{
|
||||
public:
|
||||
|
|
@ -24,7 +26,7 @@ public:
|
|||
|
||||
virtual void stopEditing();
|
||||
|
||||
static void handleObjectSelection(LLViewerObject *object, MASK mask, BOOL ignore_group, BOOL temp_select);
|
||||
static LLHandle<LLObjectSelection> handleObjectSelection(LLViewerObject *object, MASK mask, BOOL ignore_group, BOOL temp_select);
|
||||
|
||||
virtual void onMouseCaptureLost();
|
||||
virtual void handleDeselect();
|
||||
|
|
|
|||
|
|
@ -549,44 +549,6 @@ void init_menus()
|
|||
// Initialize actions
|
||||
initialize_menu_actions();
|
||||
|
||||
gMenuBarView = (LLMenuBarGL*)gUICtrlFactory->buildMenu("menu_viewer.xml", gMenuHolder);
|
||||
gMenuBarView->setRect(LLRect(0, top, width, top - MENU_BAR_HEIGHT));
|
||||
gViewerWindow->getRootView()->addChild(gMenuBarView);
|
||||
|
||||
// menu holder appears on top of menu bar so you can see the menu title
|
||||
// flash when an item is triggered (the flash occurs in the holder)
|
||||
gViewerWindow->getRootView()->addChild(gMenuHolder);
|
||||
|
||||
gMenuHolder->childSetLabelArg("Upload Image", "[COST]", "10");
|
||||
gMenuHolder->childSetLabelArg("Upload Sound", "[COST]", "10");
|
||||
gMenuHolder->childSetLabelArg("Upload Animation", "[COST]", "10");
|
||||
gMenuHolder->childSetLabelArg("Bulk Upload", "[COST]", "10");
|
||||
|
||||
gAFKMenu = (LLMenuItemCallGL*)gMenuBarView->getChildByName("Set Away", TRUE);
|
||||
gBusyMenu = (LLMenuItemCallGL*)gMenuBarView->getChildByName("Set Busy", TRUE);
|
||||
gAttachSubMenu = gMenuBarView->getChildMenuByName("Attach Object", TRUE);
|
||||
gDetachSubMenu = gMenuBarView->getChildMenuByName("Detach Object", TRUE);
|
||||
|
||||
if (gAgent.mAccess < SIM_ACCESS_MATURE)
|
||||
{
|
||||
gMenuBarView->getChildByName("Menu Underpants", TRUE)->setVisible(FALSE);
|
||||
gMenuBarView->getChildByName("Menu Undershirt", TRUE)->setVisible(FALSE);
|
||||
}
|
||||
|
||||
// TomY TODO convert these two
|
||||
LLMenuGL*menu;
|
||||
menu = new LLMenuGL(CLIENT_MENU_NAME);
|
||||
init_client_menu(menu);
|
||||
gMenuBarView->appendMenu( menu );
|
||||
menu->updateParent(LLMenuGL::sMenuContainer);
|
||||
|
||||
menu = new LLMenuGL(SERVER_MENU_NAME);
|
||||
init_server_menu(menu);
|
||||
gMenuBarView->appendMenu( menu );
|
||||
menu->updateParent(LLMenuGL::sMenuContainer);
|
||||
|
||||
gMenuBarView->createJumpKeys();
|
||||
|
||||
///
|
||||
/// Popup menu
|
||||
///
|
||||
|
|
@ -629,18 +591,6 @@ void init_menus()
|
|||
///
|
||||
LLColor4 color;
|
||||
|
||||
// If we are not in production, use a different color to make it apparent.
|
||||
if (gInProductionGrid)
|
||||
{
|
||||
color = gColors.getColor( "MenuBarBgColor" );
|
||||
}
|
||||
else
|
||||
{
|
||||
color = gColors.getColor( "MenuNonProductionBgColor" );
|
||||
}
|
||||
|
||||
gMenuBarView->setBackgroundColor( color );
|
||||
|
||||
LLColor4 pie_color = gColors.getColor("PieMenuBgColor");
|
||||
gPieSelf->setBackgroundColor( pie_color );
|
||||
gPieAvatar->setBackgroundColor( pie_color );
|
||||
|
|
@ -651,6 +601,55 @@ void init_menus()
|
|||
color = gColors.getColor( "MenuPopupBgColor" );
|
||||
gPopupMenuView->setBackgroundColor( color );
|
||||
|
||||
// If we are not in production, use a different color to make it apparent.
|
||||
if (gInProductionGrid)
|
||||
{
|
||||
color = gColors.getColor( "MenuBarBgColor" );
|
||||
}
|
||||
else
|
||||
{
|
||||
color = gColors.getColor( "MenuNonProductionBgColor" );
|
||||
}
|
||||
gMenuBarView = (LLMenuBarGL*)gUICtrlFactory->buildMenu("menu_viewer.xml", gMenuHolder);
|
||||
gMenuBarView->setRect(LLRect(0, top, 0, top - MENU_BAR_HEIGHT));
|
||||
gMenuBarView->setBackgroundColor( color );
|
||||
|
||||
gMenuHolder->addChild(gMenuBarView);
|
||||
|
||||
// menu holder appears on top of menu bar so you can see the menu title
|
||||
// flash when an item is triggered (the flash occurs in the holder)
|
||||
gViewerWindow->getRootView()->addChild(gMenuHolder);
|
||||
|
||||
gMenuHolder->childSetLabelArg("Upload Image", "[COST]", "10");
|
||||
gMenuHolder->childSetLabelArg("Upload Sound", "[COST]", "10");
|
||||
gMenuHolder->childSetLabelArg("Upload Animation", "[COST]", "10");
|
||||
gMenuHolder->childSetLabelArg("Bulk Upload", "[COST]", "10");
|
||||
|
||||
gAFKMenu = (LLMenuItemCallGL*)gMenuBarView->getChildByName("Set Away", TRUE);
|
||||
gBusyMenu = (LLMenuItemCallGL*)gMenuBarView->getChildByName("Set Busy", TRUE);
|
||||
gAttachSubMenu = gMenuBarView->getChildMenuByName("Attach Object", TRUE);
|
||||
gDetachSubMenu = gMenuBarView->getChildMenuByName("Detach Object", TRUE);
|
||||
|
||||
if (gAgent.mAccess < SIM_ACCESS_MATURE)
|
||||
{
|
||||
gMenuBarView->getChildByName("Menu Underpants", TRUE)->setVisible(FALSE);
|
||||
gMenuBarView->getChildByName("Menu Undershirt", TRUE)->setVisible(FALSE);
|
||||
}
|
||||
|
||||
// TomY TODO convert these two
|
||||
LLMenuGL*menu;
|
||||
menu = new LLMenuGL(CLIENT_MENU_NAME);
|
||||
init_client_menu(menu);
|
||||
gMenuBarView->appendMenu( menu );
|
||||
menu->updateParent(LLMenuGL::sMenuContainer);
|
||||
|
||||
menu = new LLMenuGL(SERVER_MENU_NAME);
|
||||
init_server_menu(menu);
|
||||
gMenuBarView->appendMenu( menu );
|
||||
menu->updateParent(LLMenuGL::sMenuContainer);
|
||||
|
||||
gMenuBarView->createJumpKeys();
|
||||
|
||||
// Let land based option enable when parcel changes
|
||||
gMenuParcelObserver = new LLMenuParcelObserver();
|
||||
|
||||
|
|
@ -2549,10 +2548,12 @@ void set_god_level(U8 god_level)
|
|||
if (gInProductionGrid)
|
||||
{
|
||||
gMenuBarView->setBackgroundColor( gColors.getColor( "MenuBarGodBgColor" ) );
|
||||
gStatusBar->setBackgroundColor( gColors.getColor( "MenuBarGodBgColor" ) );
|
||||
}
|
||||
else
|
||||
{
|
||||
gMenuBarView->setBackgroundColor( gColors.getColor( "MenuNonProductionGodBgColor" ) );
|
||||
gStatusBar->setBackgroundColor( gColors.getColor( "MenuNonProductionGodBgColor" ) );
|
||||
}
|
||||
LLNotifyBox::showXml("EnteringGodMode", args);
|
||||
}
|
||||
|
|
@ -2562,10 +2563,12 @@ void set_god_level(U8 god_level)
|
|||
if (gInProductionGrid)
|
||||
{
|
||||
gMenuBarView->setBackgroundColor( gColors.getColor( "MenuBarBgColor" ) );
|
||||
gStatusBar->setBackgroundColor( gColors.getColor( "MenuBarBgColor" ) );
|
||||
}
|
||||
else
|
||||
{
|
||||
gMenuBarView->setBackgroundColor( gColors.getColor( "MenuNonProductionBgColor" ) );
|
||||
gStatusBar->setBackgroundColor( gColors.getColor( "MenuNonProductionBgColor" ) );
|
||||
}
|
||||
LLNotifyBox::showXml("LeavingGodMode", args);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1613,6 +1613,9 @@ void LLViewerWindow::initWorldUI()
|
|||
|
||||
gStatusBar->reshape(root_rect.getWidth(), gStatusBar->getRect().getHeight(), TRUE);
|
||||
gStatusBar->translate(0, root_rect.getHeight() - gStatusBar->getRect().getHeight());
|
||||
// sync bg color with menu bar
|
||||
gStatusBar->setBackgroundColor( gMenuBarView->getBackgroundColor() );
|
||||
|
||||
|
||||
gViewerWindow->getRootView()->addChild(gStatusBar);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue