Merge remote-tracking branch 'remotes/origin/ryzom/ui/improvements' into yubo

merge-requests/7/merge
Riasan 4 years ago
commit 62e633dd36

@ -67,6 +67,7 @@ NLMISC_REGISTER_OBJECT(CViewBase, CDBGroupListAscensor, std::string, "list_sheet
#define VIEW_TEXT_GUILD_QUIT "ui:interface:guild:content:tab_guild_info:quit_guild" #define VIEW_TEXT_GUILD_QUIT "ui:interface:guild:content:tab_guild_info:quit_guild"
#define CTRL_SHEET_GUILD_BLASON "ui:interface:guild:content:tab_guild_info:blason" #define CTRL_SHEET_GUILD_BLASON "ui:interface:guild:content:tab_guild_info:blason"
#define VIEW_TEXT_GUILD_MEMBER_COUNT "ui:interface:guild:content:tab_guild_info:member_count" #define VIEW_TEXT_GUILD_MEMBER_COUNT "ui:interface:guild:content:tab_guild_info:member_count"
#define VIEW_TEXT_GUILD_MEMBER_COUNT_ONLINE "ui:interface:guild:content:tab_guild_info:member_count_online"
#define LIST_GUILD_MEMBERS "ui:interface:guild:content:tab_guild:list_member:guild_members" #define LIST_GUILD_MEMBERS "ui:interface:guild:content:tab_guild:list_member:guild_members"
@ -817,6 +818,7 @@ class CAHGuildSheetOpen : public IActionHandler
if (pParent == NULL) return; if (pParent == NULL) return;
pParent->clearGroups(); pParent->clearGroups();
pParent->setDynamicDisplaySize(false); pParent->setDynamicDisplaySize(false);
uint member_online = 0;
for (uint i = 0; i < rGuildMembers.size(); i++) for (uint i = 0; i < rGuildMembers.size(); i++)
{ {
// create the member line // create the member line
@ -855,11 +857,13 @@ class CAHGuildSheetOpen : public IActionHandler
switch(rGuildMembers[i].Online) switch(rGuildMembers[i].Online)
{ {
case ccs_online: case ccs_online:
member_online++;
onlineView->setTexture("w_online.tga"); onlineView->setTexture("w_online.tga");
if (toolTip) if (toolTip)
toolTip->setDefaultContextHelp(CI18N::get("uittGuildMemberOnline")); toolTip->setDefaultContextHelp(CI18N::get("uittGuildMemberOnline"));
break; break;
case ccs_online_abroad: case ccs_online_abroad:
member_online++;
onlineView->setTexture("w_online_abroad.tga"); onlineView->setTexture("w_online_abroad.tga");
if (toolTip) if (toolTip)
toolTip->setDefaultContextHelp(CI18N::get("uittGuildMemberOnlineAbroad")); toolTip->setDefaultContextHelp(CI18N::get("uittGuildMemberOnlineAbroad"));
@ -895,6 +899,12 @@ class CAHGuildSheetOpen : public IActionHandler
pLine->setParent (pParent); pLine->setParent (pParent);
pParent->addChild (pLine); pParent->addChild (pLine);
} }
// update member online count view
CViewText *pOnlineMember = dynamic_cast<CViewText*>(CWidgetManager::getInstance()->getElementFromId(VIEW_TEXT_GUILD_MEMBER_COUNT_ONLINE));
if (pOnlineMember)
pOnlineMember->setText(toString(member_online));
} }
} }
}; };

Loading…
Cancel
Save