CogEngine: Fix selection widget not updating the selection after clicking on the actor name

This commit is contained in:
Arnaud Jamin
2025-01-13 02:05:14 -05:00
parent 2f1361a412
commit 37b041051b
@@ -369,7 +369,18 @@ void FCogEngineWindow_Selection::RenderMainMenuWidget(int32 SubWidgetIndex, floa
{ {
ImGui::SetNextItemWidth(Width); ImGui::SetNextItemWidth(Width);
AActor* NewSelection = nullptr; AActor* NewSelection = nullptr;
FCogWindowWidgets::MenuActorsCombo("MenuActorSelection", NewSelection, *GetWorld(), ActorClasses, Config->SelectedClassIndex, &Filter, GetLocalPlayerPawn(), [this](AActor& Actor) { RenderActorContextMenu(Actor); }); if (FCogWindowWidgets::MenuActorsCombo(
"MenuActorSelection",
NewSelection,
*GetWorld(),
ActorClasses,
Config->SelectedClassIndex,
&Filter,
GetLocalPlayerPawn(),
[this](AActor& Actor) { RenderActorContextMenu(Actor); }))
{
SetGlobalSelection(NewSelection);
}
} }
else if (SubWidgetIndex == 2) else if (SubWidgetIndex == 2)
{ {