Skip to content

Commit

Permalink
extras: draw overlay hotkey tip before fps graph
Browse files Browse the repository at this point in the history
  • Loading branch information
megai2 committed Sep 29, 2020
1 parent 978d3f8 commit ae53e8b
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions d912pxy/d912pxy_extras.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -415,6 +415,15 @@ void d912pxy_extras::DrawMainWindow()
ImGui::Text("%s", d912pxy_s.render.db.psoMTCompiler.getQueueInfoStr());
}

UINT ctick = GetTickCount();
if (!startupTime)
startupTime = ctick;
else if ((startupTime + hkTipShowTime) > ctick)
{
char keyChar = MapVirtualKeyA(d912pxy_s.config.GetValueUI32(PXY_CFG_EXTRAS_OVERLAY_TOGGLE_KEY), MAPVK_VK_TO_CHAR);
ImGui::Text("Use Ctrl+Alt+%c to toggle overlay mode (hide/show/allow input)", keyChar);
}

if (bShowFpsGraph)
{
if (!fpsGraph.Data->HaveFreeSpace())
Expand All @@ -431,15 +440,6 @@ void d912pxy_extras::DrawMainWindow()
bShowConfigEditor = !bShowConfigEditor;
}

UINT ctick = GetTickCount();
if (!startupTime)
startupTime = ctick;
else if ((startupTime + hkTipShowTime) > ctick)
{
char keyChar = MapVirtualKeyA(d912pxy_s.config.GetValueUI32(PXY_CFG_EXTRAS_OVERLAY_TOGGLE_KEY), MAPVK_VK_TO_CHAR);
ImGui::Text("Use Ctrl+Alt+%c to toggle overlay mode (hide/show/allow input)", keyChar);
}

ImGui::End();
}

Expand Down

0 comments on commit ae53e8b

Please sign in to comment.