Skip to content

Commit

Permalink
Fix misplaced community name in actor statistics window in CS (#382)
Browse files Browse the repository at this point in the history
  • Loading branch information
Xottab-DUTY committed Feb 22, 2024
1 parent 9c5d572 commit 04cc8e1
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/xrGame/ui/UIRankingWnd.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,17 @@ bool CUIRankingWnd::Init()
AttachChild(m_actor_ch_info);
m_actor_ch_info->InitCharacterInfo(&xml, "actor_ch_info");

auto* community = m_actor_ch_info->GetIcon(CUICharacterInfo::eCommunity);
auto* communityCaption = m_actor_ch_info->GetIcon(CUICharacterInfo::eCommunityCaption);

if (community && communityCaption)
{
communityCaption->AdjustWidthToText();
pos = community->GetWndPos();
pos.x = communityCaption->GetWndPos().x + communityCaption->GetWndSize().x + 10.0f;
community->SetWndPos(pos);
}

std::ignore = UIHelper::CreateFrameWindow(xml, "actor_icon_over", this, false);
auto* money_caption = UIHelper::CreateStatic(xml, "money_caption", this);
m_money_value = UIHelper::CreateStatic(xml, "money_value", this);
Expand Down

0 comments on commit 04cc8e1

Please sign in to comment.