Skip to content

Commit

Permalink
* UPD: [xrUICore] Account for display_scale
Browse files Browse the repository at this point in the history
  • Loading branch information
yohjimane committed May 24, 2024
1 parent c836677 commit b56e9a4
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/xrUICore/TrackBar/UITrackBar.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -341,14 +341,15 @@ void CUITrackBar::UpdatePos()

if (m_static->IsEnabled())
{
float displayModifier = GetDisplayModifier();
string256 buff;
if (m_b_is_float)
{
xr_sprintf(buff, (m_static_format == nullptr ? "%.1f" : m_static_format.c_str()), m_f_val);
xr_sprintf(buff, (m_static_format == nullptr ? "%.1f" : m_static_format.c_str()), m_f_val * displayModifier);
}
else
{
xr_sprintf(buff, (m_static_format == nullptr ? "%d" : m_static_format.c_str()), m_i_val);
xr_sprintf(buff, (m_static_format == nullptr ? "%d" : m_static_format.c_str()), m_i_val * displayModifier);
}
m_static->TextItemControl()->SetTextST(buff);
}
Expand Down

0 comments on commit b56e9a4

Please sign in to comment.