mirror of
https://github.com/ddnet/ddnet.git
synced 2024-09-20 01:24:18 +00:00
Fix demo seekbar tooltip not shown while seekbar is active
The tooltip was not shown if the seekbar is the active item, i.e. when the first mouse button is held down and the seekbar is currently updating the demo player.
This commit is contained in:
parent
d34fc96049
commit
7d0774a00d
|
@ -487,7 +487,12 @@ void CMenus::RenderDemoPlayer(CUIRect MainView)
|
|||
{
|
||||
Ui()->SetActiveItem(pId);
|
||||
}
|
||||
else
|
||||
}
|
||||
|
||||
if(Inside)
|
||||
Ui()->SetHotItem(pId);
|
||||
|
||||
if(Ui()->HotItem() == pId)
|
||||
{
|
||||
const int HoveredTick = (int)(clamp((Ui()->MouseX() - SeekBar.x - Rounding) / (float)(SeekBar.w - 2 * Rounding), 0.0f, 1.0f) * TotalTicks);
|
||||
static char s_aHoveredTime[32];
|
||||
|
@ -496,10 +501,6 @@ void CMenus::RenderDemoPlayer(CUIRect MainView)
|
|||
}
|
||||
}
|
||||
|
||||
if(Inside)
|
||||
Ui()->SetHotItem(pId);
|
||||
}
|
||||
|
||||
bool IncreaseDemoSpeed = false, DecreaseDemoSpeed = false;
|
||||
|
||||
// do buttons
|
||||
|
|
Loading…
Reference in a new issue