Can haz groups left count in groups list.
Translators, this is in panel_groups.xml and panel_groups_horiz.xml called groupcount Inspired by Alchemy<3
This commit is contained in:
@@ -182,20 +182,27 @@ LLPanelGroups::~LLPanelGroups()
|
||||
gAgent.removeListener(this);
|
||||
}
|
||||
|
||||
void LLPanelGroups::setTexts()
|
||||
{
|
||||
LLUICtrl* ctrl(getChild<LLUICtrl>("groupcount"));
|
||||
size_t count(gAgent.mGroups.size());
|
||||
ctrl->setTextArg("[COUNT]", llformat("%d", count));
|
||||
int maxgroups(gHippoLimits->getMaxAgentGroups());
|
||||
ctrl->setTextArg("[MAX]", llformat("%d", maxgroups));
|
||||
ctrl->setTextArg("[LEFT]", llformat("%d", maxgroups - count));
|
||||
}
|
||||
|
||||
// clear the group list, and get a fresh set of info.
|
||||
void LLPanelGroups::reset()
|
||||
{
|
||||
getChild<LLUICtrl>("groupcount")->setTextArg("[COUNT]", llformat("%d",gAgent.mGroups.size()));
|
||||
getChild<LLUICtrl>("groupcount")->setTextArg("[MAX]", llformat("%d", gHippoLimits->getMaxAgentGroups()));
|
||||
|
||||
setTexts();
|
||||
init_group_list(getChild<LLScrollListCtrl>("group list"), gAgent.getGroupID());
|
||||
enableButtons();
|
||||
}
|
||||
|
||||
BOOL LLPanelGroups::postBuild()
|
||||
{
|
||||
getChild<LLUICtrl>("groupcount")->setTextArg("[COUNT]", llformat("%d",gAgent.mGroups.size()));
|
||||
getChild<LLUICtrl>("groupcount")->setTextArg("[MAX]", llformat("%d",gHippoLimits->getMaxAgentGroups()));
|
||||
setTexts();
|
||||
|
||||
LLScrollListCtrl *list = getChild<LLScrollListCtrl>("group list");
|
||||
if (list)
|
||||
|
||||
@@ -106,6 +106,9 @@ protected:
|
||||
// initialize based on the type
|
||||
BOOL postBuild();
|
||||
|
||||
// set the text displays
|
||||
void setTexts();
|
||||
|
||||
// highlight_id is a group id to highlight
|
||||
void enableButtons();
|
||||
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
bottom="5" drop_shadow_visible="true" enabled="true" follows="left|bottom"
|
||||
font="SansSerifSmall" h_pad="0" halign="left" height="16" left="12"
|
||||
mouse_opaque="false" name="groupcount" v_pad="0" width="248">
|
||||
You belong to [COUNT] groups (of [MAX] maximum).
|
||||
You belong to [COUNT] groups (of [MAX] max, [LEFT] left).
|
||||
</text>
|
||||
<pad bottom="-7" height="0" left="-90" width="1" />
|
||||
<button bottom_delta="-25" follows="top|right" font="SansSerif" height="22"
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
bottom_delta="-13" drop_shadow_visible="true" enabled="true" follows="left|bottom"
|
||||
font="SansSerifSmall" h_pad="0" halign="left" height="16" left="12"
|
||||
mouse_opaque="false" name="groupcount" v_pad="0" width="280">
|
||||
You belong to [COUNT] groups (of [MAX] maximum).
|
||||
You belong to [COUNT] groups (of [MAX] max, [LEFT] left).
|
||||
</text>
|
||||
<button bottom_delta="-24" follows="left|bottom" font="SansSerif" height="22"
|
||||
label="IM/Call" left="5" name="IM"
|
||||
|
||||
Reference in New Issue
Block a user