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:
Inusaito Sayori
2014-12-28 13:33:21 -05:00
parent 5257eec81e
commit 0eba34d5a8
4 changed files with 17 additions and 7 deletions

View File

@@ -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)

View File

@@ -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();

View File

@@ -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"

View File

@@ -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"