Skip to content

Commit 04cc8e1

Browse files
committed
Fix misplaced community name in actor statistics window in CS (#382)
1 parent 9c5d572 commit 04cc8e1

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

src/xrGame/ui/UIRankingWnd.cpp

+11
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,17 @@ bool CUIRankingWnd::Init()
8585
AttachChild(m_actor_ch_info);
8686
m_actor_ch_info->InitCharacterInfo(&xml, "actor_ch_info");
8787

88+
auto* community = m_actor_ch_info->GetIcon(CUICharacterInfo::eCommunity);
89+
auto* communityCaption = m_actor_ch_info->GetIcon(CUICharacterInfo::eCommunityCaption);
90+
91+
if (community && communityCaption)
92+
{
93+
communityCaption->AdjustWidthToText();
94+
pos = community->GetWndPos();
95+
pos.x = communityCaption->GetWndPos().x + communityCaption->GetWndSize().x + 10.0f;
96+
community->SetWndPos(pos);
97+
}
98+
8899
std::ignore = UIHelper::CreateFrameWindow(xml, "actor_icon_over", this, false);
89100
auto* money_caption = UIHelper::CreateStatic(xml, "money_caption", this);
90101
m_money_value = UIHelper::CreateStatic(xml, "money_value", this);

0 commit comments

Comments
 (0)