mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 01:58:19 +00:00
Merge pull request #8353 from Robyt3/Client-Demo-Seekbar-UX-Fixes
Fix demo seekbar tooltip not shown while seekbar is active, fix demo seekbar being activated by held button press
This commit is contained in:
commit
0562be67f4
|
@ -487,7 +487,12 @@ void CMenus::RenderDemoPlayer(CUIRect MainView)
|
|||
{
|
||||
Ui()->SetActiveItem(pId);
|
||||
}
|
||||
else
|
||||
}
|
||||
|
||||
if(Inside && !Ui()->MouseButton(0))
|
||||
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