Merge branch 'ryzom/ui/improvements' into atys

fix-media-player
Ulukyn 5 years ago
commit 2c9193fa74

@ -461,22 +461,29 @@ CGroupInSceneUserInfo *CGroupInSceneUserInfo::build (CEntityCL *entity)
if (rpTags) if (rpTags)
{ {
CPlayerCL * pPlayer = dynamic_cast<CPlayerCL*>(entity); CPlayerCL * pPlayer = dynamic_cast<CPlayerCL*>(entity);
CViewBitmap *bitmap; CViewBitmap *rp1 = dynamic_cast<CViewBitmap*>(leftGroup->getView ("rp_logo_1"));
CViewBitmap *rp2 = dynamic_cast<CViewBitmap*>(leftGroup->getView ("rp_logo_2"));
CViewBitmap *rp3 = dynamic_cast<CViewBitmap*>(leftGroup->getView ("rp_logo_3"));
CViewBitmap *rp4 = dynamic_cast<CViewBitmap*>(leftGroup->getView ("rp_logo_4"));
if (pPlayer == NULL || (pPlayer != NULL && pPlayer->getPvpMode() & PVP_MODE::PvpFaction)) if (pPlayer == NULL || (pPlayer != NULL && pPlayer->getPvpMode() & PVP_MODE::PvpFaction))
{ {
bitmap = dynamic_cast<CViewBitmap*>(leftGroup->getView ("rp_logo_1")); if (rp1) rp1->setTexture(entityTag1.toString());
if (bitmap) if (rp2) rp2->setTexture(entityTag2.toString());
bitmap->setTexture(entityTag1.toString()); }
bitmap = dynamic_cast<CViewBitmap*>(leftGroup->getView ("rp_logo_2")); else
if (bitmap) {
bitmap->setTexture(entityTag2.toString()); entityTag1.clear();
entityTag2.clear();
} }
bitmap = dynamic_cast<CViewBitmap*>(leftGroup->getView ("rp_logo_3")); if (rp3) rp3->setTexture(entityTag3.toString());
if (bitmap) if (rp4) rp4->setTexture(entityTag4.toString());
bitmap->setTexture(entityTag3.toString());
bitmap = dynamic_cast<CViewBitmap*>(leftGroup->getView ("rp_logo_4")); // hide if texture is empty
if (bitmap) if (rp1) rp1->setActive(!entityTag1.empty());
bitmap->setTexture(entityTag4.toString()); if (rp2) rp2->setActive(!entityTag2.empty());
if (rp3) rp3->setActive(!entityTag3.empty());
if (rp4) rp4->setActive(!entityTag4.empty());
} }
// Get the permanent content bitmap // Get the permanent content bitmap

Loading…
Cancel
Save