mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 01:58:19 +00:00
Merge pull request #8479 from Robyt3/Demo-Seekbar-Tooltip-Fix
Fix demo seekbar tooltip not showing correct hovered time
This commit is contained in:
commit
4fa55b3463
|
@ -494,7 +494,7 @@ void CMenus::RenderDemoPlayer(CUIRect MainView)
|
|||
|
||||
if(Ui()->HotItem() == pId)
|
||||
{
|
||||
const int HoveredTick = (int)(clamp((Ui()->MouseX() - SeekBar.x - Rounding) / SeekBar.w - 2 * Rounding, 0.0f, 1.0f) * TotalTicks);
|
||||
const int HoveredTick = (int)(clamp((Ui()->MouseX() - SeekBar.x - Rounding) / (SeekBar.w - 2 * Rounding), 0.0f, 1.0f) * TotalTicks);
|
||||
static char s_aHoveredTime[32];
|
||||
str_time((int64_t)HoveredTick / Client()->GameTickSpeed() * 100, TIME_HOURS, s_aHoveredTime, sizeof(s_aHoveredTime));
|
||||
GameClient()->m_Tooltips.DoToolTip(pId, &SeekBar, s_aHoveredTime);
|
||||
|
|
Loading…
Reference in a new issue