diff --git a/src/game/client/components/menus_demo.cpp b/src/game/client/components/menus_demo.cpp index 28a95b2ac..73ccb8388 100644 --- a/src/game/client/components/menus_demo.cpp +++ b/src/game/client/components/menus_demo.cpp @@ -337,10 +337,6 @@ void CMenus::RenderDemoPlayer(CUIRect MainView) ButtonBar.HSplitTop(Margins, 0, &ButtonBar); ButtonBar.HSplitBottom(NameBarHeight, &ButtonBar, &NameBar); NameBar.HSplitTop(4.0f, 0, &NameBar); - SpeedBar.HSplitBottom(NameBarHeight, &SpeedBar, &NameBar); - ButtonBar.HSplitTop(0.0f, 0, &SpeedBar); - SpeedBar.VSplitLeft(123.0f, 0, &SpeedBar); - SpeedBar.VSplitLeft(133.0f, &SpeedBar, 0); // do seekbar { @@ -484,7 +480,7 @@ void CMenus::RenderDemoPlayer(CUIRect MainView) if(DoButton_FontIcon(&s_ResetButton, "\xEF\x81\x8D", false, &Button, IGraphics::CORNER_ALL)) { DemoPlayer()->Pause(); - DemoPlayer()->SeekPercent(0.0f); + PositionToSeek = 0.0f; } GameClient()->m_Tooltips.DoToolTip(&s_ResetButton, &Button, Localize("Stop the current demo")); @@ -521,13 +517,12 @@ void CMenus::RenderDemoPlayer(CUIRect MainView) GameClient()->m_Tooltips.DoToolTip(&s_FastForwardButton, &Button, Localize("Speed up the demo")); // speed meter - ButtonBar.VSplitLeft(Margins * 3, 0, &ButtonBar); + ButtonBar.VSplitLeft(Margins * 12, &SpeedBar, &ButtonBar); char aBuffer[64]; str_format(aBuffer, sizeof(aBuffer), "×%g", pInfo->m_Speed); UI()->DoLabel(&SpeedBar, aBuffer, Button.h * 0.7f, TEXTALIGN_CENTER); // slice begin button - ButtonBar.VSplitLeft(Margins * 7, 0, &ButtonBar); ButtonBar.VSplitLeft(ButtonbarHeight, &Button, &ButtonBar); static CButtonContainer s_SliceBeginButton; if(DoButton_FontIcon(&s_SliceBeginButton, "\xEF\x8B\xB5", 0, &Button, IGraphics::CORNER_ALL)) @@ -575,10 +570,10 @@ void CMenus::RenderDemoPlayer(CUIRect MainView) { if((pInfo->m_aTimelineMarkers[i] - pInfo->m_FirstTick) < CurrentTick && absolute(((pInfo->m_aTimelineMarkers[i] - pInfo->m_FirstTick) - CurrentTick)) > Threshold) { - DemoPlayer()->SeekPercent((float)(pInfo->m_aTimelineMarkers[i] - pInfo->m_FirstTick) / TotalTicks); + PositionToSeek = (float)(pInfo->m_aTimelineMarkers[i] - pInfo->m_FirstTick) / TotalTicks; break; } - DemoPlayer()->SeekPercent(0.0f); + PositionToSeek = 0.0f; } GameClient()->m_Tooltips.DoToolTip(&s_OneMarkerBackButton, &Button, Localize("Go back one marker")); @@ -591,10 +586,10 @@ void CMenus::RenderDemoPlayer(CUIRect MainView) { if((pInfo->m_aTimelineMarkers[i] - pInfo->m_FirstTick) > CurrentTick && absolute(((pInfo->m_aTimelineMarkers[i] - pInfo->m_FirstTick) - CurrentTick)) > Threshold) { - DemoPlayer()->SeekPercent((float)(pInfo->m_aTimelineMarkers[i] - pInfo->m_FirstTick) / TotalTicks); + PositionToSeek = (float)(pInfo->m_aTimelineMarkers[i] - pInfo->m_FirstTick) / TotalTicks; break; } - DemoPlayer()->SeekPercent(1.0f); + PositionToSeek = 1.0f; } GameClient()->m_Tooltips.DoToolTip(&s_OneMarkerForwardButton, &Button, Localize("Go forward one marker"));