Skip to content

Commit b56e9a4

Browse files
committed
* UPD: [xrUICore] Account for display_scale
1 parent c836677 commit b56e9a4

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/xrUICore/TrackBar/UITrackBar.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -341,14 +341,15 @@ void CUITrackBar::UpdatePos()
341341

342342
if (m_static->IsEnabled())
343343
{
344+
float displayModifier = GetDisplayModifier();
344345
string256 buff;
345346
if (m_b_is_float)
346347
{
347-
xr_sprintf(buff, (m_static_format == nullptr ? "%.1f" : m_static_format.c_str()), m_f_val);
348+
xr_sprintf(buff, (m_static_format == nullptr ? "%.1f" : m_static_format.c_str()), m_f_val * displayModifier);
348349
}
349350
else
350351
{
351-
xr_sprintf(buff, (m_static_format == nullptr ? "%d" : m_static_format.c_str()), m_i_val);
352+
xr_sprintf(buff, (m_static_format == nullptr ? "%d" : m_static_format.c_str()), m_i_val * displayModifier);
352353
}
353354
m_static->TextItemControl()->SetTextST(buff);
354355
}

0 commit comments

Comments
 (0)