diff options
Diffstat (limited to 'indra/newview')
-rwxr-xr-x | indra/newview/llconversationmodel.h | 2 | ||||
-rwxr-xr-x | indra/newview/llconversationview.cpp | 50 | ||||
-rwxr-xr-x | indra/newview/llconversationview.h | 6 | ||||
-rwxr-xr-x | indra/newview/llviewerfoldertype.cpp | 2 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/floater_pathfinding_console.xml | 2 | ||||
-rwxr-xr-x | indra/newview/skins/default/xui/en/widgets/conversation_view_participant.xml | 8 |
6 files changed, 59 insertions, 11 deletions
diff --git a/indra/newview/llconversationmodel.h b/indra/newview/llconversationmodel.h index 954543f91a..dbc04223af 100755 --- a/indra/newview/llconversationmodel.h +++ b/indra/newview/llconversationmodel.h @@ -68,7 +68,7 @@ public: virtual const std::string& getSearchableName() const { return mName; } virtual const LLUUID& getUUID() const { return mUUID; } virtual time_t getCreationDate() const { return 0; } - virtual LLPointer<LLUIImage> getIcon() const { return LLUI::getUIImage(LLViewerFolderType::lookupIconName(LLFolderType::FT_PROFILEXXXGGG, FALSE)); } + virtual LLPointer<LLUIImage> getIcon() const { return NULL; } virtual LLPointer<LLUIImage> getOpenIcon() const { return getIcon(); } virtual LLFontGL::StyleFlags getLabelStyle() const { return LLFontGL::NORMAL; } virtual std::string getLabelSuffix() const { return LLStringUtil::null; } diff --git a/indra/newview/llconversationview.cpp b/indra/newview/llconversationview.cpp index d5d4fc13da..721abd5892 100755 --- a/indra/newview/llconversationview.cpp +++ b/indra/newview/llconversationview.cpp @@ -41,7 +41,7 @@ // static LLDefaultChildRegistry::Register<LLConversationViewSession> r_conversation_view_session("conversation_view_session"); - +const LLColor4U DEFAULT_WHITE(255, 255, 255); LLConversationViewSession::Params::Params() : container() @@ -90,7 +90,6 @@ void LLConversationViewSession::draw() // *TODO Seth PE: remove the code duplicated from LLFolderViewItem::draw() // ***** LLFolderViewItem::draw() code begin ***** - const LLColor4U DEFAULT_WHITE(255, 255, 255); static LLUIColor sFgColor = LLUIColorTable::instance().getColor("MenuItemEnabledColor", DEFAULT_WHITE); static LLUIColor sHighlightBgColor = LLUIColorTable::instance().getColor("MenuItemHighlightBgColor", DEFAULT_WHITE); @@ -317,21 +316,27 @@ S32 LLConversationViewParticipant::sChildrenWidths[LLConversationViewParticipant LLConversationViewParticipant::Params::Params() : container(), participant_id(), +avatar_icon("avatar_icon"), info_button("info_button"), output_monitor("output_monitor") {} LLConversationViewParticipant::LLConversationViewParticipant( const LLConversationViewParticipant::Params& p ): LLFolderViewItem(p), + mAvatarIcon(NULL), mInfoBtn(NULL), mSpeakingIndicator(NULL), mUUID(p.participant_id) { - } void LLConversationViewParticipant::initFromParams(const LLConversationViewParticipant::Params& params) { + LLAvatarIconCtrl::Params avatar_icon_params(params.avatar_icon()); + applyXUILayout(avatar_icon_params, this); + LLAvatarIconCtrl * avatarIcon = LLUICtrlFactory::create<LLAvatarIconCtrl>(avatar_icon_params); + addChild(avatarIcon); + LLButton::Params info_button_params(params.info_button()); applyXUILayout(info_button_params, this); LLButton * button = LLUICtrlFactory::create<LLButton>(info_button_params); @@ -345,6 +350,8 @@ void LLConversationViewParticipant::initFromParams(const LLConversationViewParti BOOL LLConversationViewParticipant::postBuild() { + mAvatarIcon = getChild<LLAvatarIconCtrl>("avatar_icon"); + mInfoBtn = getChild<LLButton>("info_btn"); mInfoBtn->setClickedCallback(boost::bind(&LLConversationViewParticipant::onInfoBtnClick, this)); mInfoBtn->setVisible(false); @@ -363,6 +370,36 @@ BOOL LLConversationViewParticipant::postBuild() return LLFolderViewItem::postBuild(); } +void LLConversationViewParticipant::draw() +{ + static LLUIColor sFgColor = LLUIColorTable::instance().getColor("MenuItemEnabledColor", DEFAULT_WHITE); + static LLUIColor sHighlightFgColor = LLUIColorTable::instance().getColor("MenuItemHighlightFgColor", DEFAULT_WHITE); + static LLUIColor sHighlightBgColor = LLUIColorTable::instance().getColor("MenuItemHighlightBgColor", DEFAULT_WHITE); + static LLUIColor sFocusOutlineColor = LLUIColorTable::instance().getColor("InventoryFocusOutlineColor", DEFAULT_WHITE); + static LLUIColor sMouseOverColor = LLUIColorTable::instance().getColor("InventoryMouseOverColor", DEFAULT_WHITE); + + const BOOL show_context = (getRoot() ? getRoot()->getShowSelectionContext() : FALSE); + const BOOL filled = show_context || (getRoot() ? getRoot()->getParentPanel()->hasFocus() : FALSE); // If we have keyboard focus, draw selection filled + + const LLFolderViewItem::Params& default_params = LLUICtrlFactory::getDefaultParams<LLFolderViewItem>(); + const S32 TOP_PAD = default_params.item_top_pad; + + const LLFontGL* font = getLabelFontForStyle(mLabelStyle); + F32 right_x = 0; + + //TEXT_PAD, TOP_PAD, ICON_PAD and mIndentation are temporary values and will non-const eventually since they don't + //apply to every single layout + F32 y = (F32)getRect().getHeight() - font->getLineHeight() - (F32)TEXT_PAD - (F32)TOP_PAD; + F32 text_left = (F32)(mAvatarIcon->getRect().mRight + ICON_PAD + mIndentation); + LLColor4 color = (mIsSelected && filled) ? sHighlightFgColor : sFgColor; + + drawHighlight(show_context, filled, sHighlightBgColor, sFocusOutlineColor, sMouseOverColor); + drawLabel(font, text_left, y, color, right_x); + + LLView::draw(); +} + + void LLConversationViewParticipant::refresh() { // Refresh the participant view from its model data @@ -384,8 +421,11 @@ void LLConversationViewParticipant::addToFolder(LLFolderViewFolder* folder) LLConversationItem* vmi = this->getParentFolder() ? dynamic_cast<LLConversationItem*>(this->getParentFolder()->getViewModelItem()) : NULL; if(vmi) { - mSpeakingIndicator->setSpeakerId(mUUID, - vmi->getUUID()); //set the session id + //Allows speaking icon image to be loaded based on mUUID + mAvatarIcon->setValue(mUUID); + + //Allows the speaker indicator to be activated based on the user and conversation + mSpeakingIndicator->setSpeakerId(mUUID, vmi->getUUID()); } } diff --git a/indra/newview/llconversationview.h b/indra/newview/llconversationview.h index 3dbc36e811..075ad09d5b 100755 --- a/indra/newview/llconversationview.h +++ b/indra/newview/llconversationview.h @@ -29,6 +29,7 @@ #include "llfolderviewitem.h" +#include "llavatariconctrl.h" #include "llbutton.h" #include "lloutputmonitorctrl.h" @@ -84,7 +85,8 @@ public: struct Params : public LLInitParam::Block<Params, LLFolderViewItem::Params> { Optional<LLIMFloaterContainer*> container; - Optional<LLUUID> participant_id; + Optional<LLUUID> participant_id; + Optional<LLAvatarIconCtrl::Params> avatar_icon; Optional<LLButton::Params> info_button; Optional<LLOutputMonitorCtrl::Params> output_monitor; @@ -104,10 +106,12 @@ protected: LLConversationViewParticipant( const Params& p ); void initFromParams(const Params& params); BOOL postBuild(); + /*virtual*/ void draw(); void onInfoBtnClick(); private: + LLAvatarIconCtrl* mAvatarIcon; LLButton * mInfoBtn; LLOutputMonitorCtrl* mSpeakingIndicator; LLUUID mUUID; // UUID of the participant diff --git a/indra/newview/llviewerfoldertype.cpp b/indra/newview/llviewerfoldertype.cpp index 0a402d8c42..a179b61cff 100755 --- a/indra/newview/llviewerfoldertype.cpp +++ b/indra/newview/llviewerfoldertype.cpp @@ -147,8 +147,6 @@ LLViewerFolderDictionary::LLViewerFolderDictionary() addEntry((LLFolderType::EType)type, new ViewerFolderEntry("New Folder", "Inv_FolderOpen", "Inv_FolderClosed", FALSE, false)); } #endif - - addEntry(LLFolderType::FT_PROFILEXXXGGG, new ViewerFolderEntry("Profile", "Generic_Person", "Generic_Person", FALSE, false, "default")); } bool LLViewerFolderDictionary::initEnsemblesFromFile() diff --git a/indra/newview/skins/default/xui/en/floater_pathfinding_console.xml b/indra/newview/skins/default/xui/en/floater_pathfinding_console.xml index 2629313069..79f2027c31 100644 --- a/indra/newview/skins/default/xui/en/floater_pathfinding_console.xml +++ b/indra/newview/skins/default/xui/en/floater_pathfinding_console.xml @@ -152,7 +152,7 @@ </text> <check_box height="19" - label="World" + label="Test" layout="topleft" name="show_world" top_pad="4" diff --git a/indra/newview/skins/default/xui/en/widgets/conversation_view_participant.xml b/indra/newview/skins/default/xui/en/widgets/conversation_view_participant.xml index b00e8aaeee..7ddcfe3b03 100755 --- a/indra/newview/skins/default/xui/en/widgets/conversation_view_participant.xml +++ b/indra/newview/skins/default/xui/en/widgets/conversation_view_participant.xml @@ -1,13 +1,19 @@ <?xml version="1.0" encoding="utf-8" standalone="yes" ?> <conversation_view_participant folder_arrow_image="ForSale_Badge" - folder_indentation="8" + folder_indentation="0" item_height="24" item_top_pad="4" selection_image="Rounded_Square" mouse_opaque="true" follows="left|top|right" > +<avatar_icon + follows="left" + height="20" + default_icon_name="Generic_Person" + left="50" + width="20" /> <info_button follows="right" height="16" |