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)