fix: Main menu not appearing for the first 200ms

This commit is contained in:
WerWolv 2024-02-19 22:23:17 +01:00
parent 74d59705ad
commit ca35c90cbb
1 changed files with 7 additions and 9 deletions

View File

@ -312,9 +312,8 @@ namespace hex::plugin::builtin {
}
};
if (ImGui::GetTime() > 0.2F) {
static u32 menuEndPos = 0;
if (menuEndPos < s_searchBarPosition) {
if (menuEndPos <= s_searchBarPosition || ImGui::GetTime() < 0.2F) {
drawMenu();
menuEndPos = ImGui::GetCursorPosX();
} else {
@ -323,7 +322,6 @@ namespace hex::plugin::builtin {
ImGui::EndMenu();
}
}
}
drawTitleBar();