diff options
Diffstat (limited to 'indra/newview')
-rw-r--r-- | indra/newview/llpersonfolderview.cpp | 1 | ||||
-rw-r--r-- | indra/newview/llpersontabview.cpp | 64 | ||||
-rw-r--r-- | indra/newview/llpersontabview.h | 35 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/widgets/person_view.xml | 81 |
4 files changed, 172 insertions, 9 deletions
diff --git a/indra/newview/llpersonfolderview.cpp b/indra/newview/llpersonfolderview.cpp index 8141eecc35..636d093e0e 100644 --- a/indra/newview/llpersonfolderview.cpp +++ b/indra/newview/llpersonfolderview.cpp @@ -104,7 +104,6 @@ LLPersonView * LLPersonFolderView::createConversationViewParticipant(LLPersonMod //24 should be loaded from .xml somehow params.rect = LLRect (0, 24, getRect().getWidth(), 0); params.tool_tip = params.name; - params.folder_indentation = 2; return LLUICtrlFactory::create<LLPersonView>(params); } diff --git a/indra/newview/llpersontabview.cpp b/indra/newview/llpersontabview.cpp index e0bda32308..eaa112e051 100644 --- a/indra/newview/llpersontabview.cpp +++ b/indra/newview/llpersontabview.cpp @@ -117,16 +117,32 @@ void LLPersonTabView::drawHighlight() static LLDefaultChildRegistry::Register<LLPersonView> r_person_view("person_view"); LLPersonView::Params::Params() : -avatar_icon("avatar_icon") +avatar_icon("avatar_icon"), +last_interaction_time_textbox("last_interaction_time_textbox"), +permission_edit_theirs_icon("permission_edit_theirs_icon"), +permission_edit_mine_icon("permission_edit_mine_icon"), +permission_map_icon("permission_map_icon"), +permission_online_icon("permission_online_icon"), +info_btn("info_btn"), +profile_btn("profile_btn"), +output_monitor("output_monitor") {} LLPersonView::LLPersonView(const LLPersonView::Params& p) : LLFolderViewItem(p), mImageOver(LLUI::getUIImage("ListItem_Over")), mImageSelected(LLUI::getUIImage("ListItem_Select")), -mAvatarIcon(NULL) +mAvatarIcon(NULL), +mLastInteractionTimeTextbox(NULL), +mPermissionEditTheirsIcon(NULL), +mPermissionEditMineIcon(NULL), +mPermissionMapIcon(NULL), +mPermissionOnlineIcon(NULL), +mInfoBtn(NULL), +mProfileBtn(NULL), +mOutputMonitorCtrl(NULL) { - + initChildrenWidths(this); } S32 LLPersonView::getLabelXPos() @@ -175,7 +191,7 @@ void LLPersonView::drawHighlight() if(mIsSelected) { mImageSelected->draw(x, y, width, height); - //Need to find a better color that matches the outline in avatarlistitem + //Draw outline gl_rect_2d(x, height, width, @@ -195,4 +211,44 @@ void LLPersonView::initFromParams(const LLPersonView::Params & params) applyXUILayout(avatar_icon_params, this); mAvatarIcon = LLUICtrlFactory::create<LLAvatarIconCtrl>(avatar_icon_params); addChild(mAvatarIcon); + + LLTextBox::Params last_interaction_time_textbox(params.last_interaction_time_textbox()); + applyXUILayout(last_interaction_time_textbox, this); + mLastInteractionTimeTextbox = LLUICtrlFactory::create<LLTextBox>(last_interaction_time_textbox); + addChild(mLastInteractionTimeTextbox); + + LLIconCtrl::Params permission_edit_theirs_icon(params.permission_edit_theirs_icon()); + applyXUILayout(permission_edit_theirs_icon, this); + mPermissionEditTheirsIcon = LLUICtrlFactory::create<LLIconCtrl>(permission_edit_theirs_icon); + addChild(mPermissionEditTheirsIcon); + + LLIconCtrl::Params permission_map_icon(params.permission_map_icon()); + applyXUILayout(permission_map_icon, this); + mPermissionMapIcon = LLUICtrlFactory::create<LLIconCtrl>(permission_map_icon); + addChild(mPermissionMapIcon); + + LLIconCtrl::Params permission_online_icon(params.permission_online_icon()); + applyXUILayout(permission_online_icon, this); + mPermissionOnlineIcon = LLUICtrlFactory::create<LLIconCtrl>(permission_online_icon); + addChild(mPermissionOnlineIcon); + + LLButton::Params info_btn(params.info_btn()); + applyXUILayout(info_btn, this); + mInfoBtn = LLUICtrlFactory::create<LLButton>(info_btn); + addChild(mInfoBtn); + + LLButton::Params profile_btn(params.profile_btn()); + applyXUILayout(profile_btn, this); + mProfileBtn = LLUICtrlFactory::create<LLButton>(profile_btn); + addChild(mProfileBtn); + + LLOutputMonitorCtrl::Params output_monitor(params.output_monitor()); + applyXUILayout(output_monitor, this); + mOutputMonitorCtrl = LLUICtrlFactory::create<LLOutputMonitorCtrl>(output_monitor); + addChild(mOutputMonitorCtrl); +} + +void LLPersonView::initChildrenWidths(LLPersonView* self) +{ + } diff --git a/indra/newview/llpersontabview.h b/indra/newview/llpersontabview.h index e1b34e1da4..d8d1a65df6 100644 --- a/indra/newview/llpersontabview.h +++ b/indra/newview/llpersontabview.h @@ -28,7 +28,10 @@ #define LL_LLPERSONTABVIEW_H #include "llavatariconctrl.h" +#include "llbutton.h" #include "llfolderviewitem.h" +#include "lloutputmonitorctrl.h" +#include "lltextbox.h" class LLPersonTabView : public LLFolderViewFolder { @@ -70,6 +73,14 @@ public: { Params(); Optional<LLAvatarIconCtrl::Params> avatar_icon; + Optional<LLTextBox::Params> last_interaction_time_textbox; + Optional<LLIconCtrl::Params> permission_edit_theirs_icon; + Optional<LLIconCtrl::Params> permission_edit_mine_icon; + Optional<LLIconCtrl::Params> permission_map_icon; + Optional<LLIconCtrl::Params> permission_online_icon; + Optional<LLButton::Params> info_btn; + Optional<LLButton::Params> profile_btn; + Optional<LLOutputMonitorCtrl::Params> output_monitor; }; LLPersonView(const LLPersonView::Params& p); @@ -89,18 +100,34 @@ private: LLPointer<LLUIImage> mImageSelected; LLAvatarIconCtrl* mAvatarIcon; + LLTextBox * mLastInteractionTimeTextbox; + LLIconCtrl * mPermissionEditTheirsIcon; + LLIconCtrl * mPermissionEditMineIcon; + LLIconCtrl * mPermissionMapIcon; + LLIconCtrl * mPermissionOnlineIcon; LLButton * mInfoBtn; + LLButton * mProfileBtn; + LLOutputMonitorCtrl * mOutputMonitorCtrl; + + typedef enum e_avatar_item_child { ALIC_SPEAKER_INDICATOR, + ALIC_PROFILE_BUTTON, ALIC_INFO_BUTTON, + ALIC_PERMISSION_ONLINE, + ALIC_PERMISSION_MAP, + ALIC_PERMISSION_EDIT_MINE, + ALIC_PERMISSION_EDIT_THEIRS, + ALIC_INTERACTION_TIME, ALIC_COUNT, } EAvatarListItemChildIndex; - static bool sStaticInitialized; // this variable is introduced to improve code readability - static S32 sChildrenWidths[ALIC_COUNT]; - //static void initChildrenWidths(LLConversationViewParticipant* self); - //void updateChildren(); + static bool sStaticInitialized; + static S32 sMouseOverChildrenWidths[ALIC_COUNT]; + static S32 sMouseOverChildren[ALIC_COUNT]; + static void initChildrenWidths(LLPersonView* self); + void updateChildren(); //LLView* getItemChildView(EAvatarListItemChildIndex child_view_index); }; diff --git a/indra/newview/skins/default/xui/en/widgets/person_view.xml b/indra/newview/skins/default/xui/en/widgets/person_view.xml index 84ad807b83..d257a5114f 100644 --- a/indra/newview/skins/default/xui/en/widgets/person_view.xml +++ b/indra/newview/skins/default/xui/en/widgets/person_view.xml @@ -21,5 +21,86 @@ left="5" top="2" width="20" /> + <last_interaction_time_textbox + layout="topleft" + follows="right" + font="SansSerifSmall" + height="15" + left_pad="5" + right="-164" + name="last_interaction_time_textbox" + text_color="LtGray_50" + value="0s" + width="35" /> + <permission_edit_theirs_icon + layout="topleft" + height="16" + follows="right" + image_name="Permission_Edit_Objects_Theirs" + left_pad="3" + right="-129" + name="permission_edit_theirs_icon" + tool_tip="You can edit this friend's objects" + top="4" + width="16" /> + <permission_edit_mine_icon + layout="topleft" + height="16" + follows="right" + image_name="Permission_Edit_Objects_Mine" + left_pad="3" + right="-110" + name="permission_edit_mine_icon" + tool_tip="This friend can edit, delete or take your objects" + width="16" /> + <permission_map_icon + height="16" + follows="right" + image_name="Permission_Visible_Map" + left_pad="3" + tool_tip="This friend can locate you on the map" + right="-91" + name="permission_map_icon" + width="16" /> + <permission_online_icon + height="16" + follows="right" + image_name="Permission_Visible_Online" + left_pad="3" + right="-72" + name="permission_online_icon" + tool_tip="This friend can see when you're online" + width="16" /> + <info_btn + follows="right" + height="16" + image_pressed="Info_Press" + image_unselected="Info_Over" + left_pad="3" + right="-53" + name="info_btn" + tool_tip="More info" + tab_stop="false" + width="16" /> + <profile_btn + follows="right" + height="20" + image_overlay="Web_Profile_Off" + left_pad="5" + right="-28" + name="profile_btn" + tab_stop="false" + tool_tip="View profile" + top_delta="-2" + width="20" /> + <output_monitor + auto_update="true" + follows="right" + draw_border="false" + height="16" + right="-3" + mouse_opaque="true" + name="speaking_indicator" + width="20" /> </person_view> |