mirror of
https://github.com/Ed94/Cog.git
synced 2026-08-05 23:28:46 +00:00
CogEngine: Fix Console window context menu appearing when it shouldn't
This commit is contained in:
@@ -68,16 +68,22 @@ void FCogEngineWindow_Console::RenderMainMenuWidget()
|
|||||||
TooltipPos.y += Window->MenuBarHeight;
|
TooltipPos.y += Window->MenuBarHeight;
|
||||||
|
|
||||||
ImGui::SetNextItemWidth(Config->WidgetWidth);
|
ImGui::SetNextItemWidth(Config->WidgetWidth);
|
||||||
RenderInput();
|
|
||||||
|
|
||||||
|
RenderInput();
|
||||||
|
const bool IsTextInputActive = ImGui::IsItemActive();
|
||||||
|
|
||||||
if (Config->FocusWidgetWhenAppearing && ImGui::IsWindowAppearing())
|
if (Config->FocusWidgetWhenAppearing && ImGui::IsWindowAppearing())
|
||||||
{
|
{
|
||||||
SelectedCommandIndex = -1;
|
SelectedCommandIndex = -1;
|
||||||
RefreshCommandList();
|
RefreshCommandList();
|
||||||
ImGui::ActivateItemByID(InputIdOnWidgetMode);
|
ImGui::ActivateItemByID(InputIdOnWidgetMode);
|
||||||
}
|
}
|
||||||
|
|
||||||
const bool IsTextInputActive = ImGui::IsItemActive();
|
if (ImGui::BeginPopupContextItem())
|
||||||
|
{
|
||||||
|
RenderMenu();
|
||||||
|
ImGui::EndPopup();
|
||||||
|
}
|
||||||
|
|
||||||
if (bPopupCommandListOnWidgetMode)
|
if (bPopupCommandListOnWidgetMode)
|
||||||
{
|
{
|
||||||
@@ -111,12 +117,6 @@ void FCogEngineWindow_Console::RenderMainMenuWidget()
|
|||||||
ImGui::End();
|
ImGui::End();
|
||||||
ImGui::PopStyleVar();
|
ImGui::PopStyleVar();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ImGui::BeginPopupContextWindow())
|
|
||||||
{
|
|
||||||
RenderMenu();
|
|
||||||
ImGui::EndPopup();
|
|
||||||
}
|
|
||||||
|
|
||||||
bIsRenderingWidget = false;
|
bIsRenderingWidget = false;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user